---
phase: 34-fix-mcp-apps-chatgpt-compatibility
plan: 02
type: execute
wave: 1
depends_on: []
files_modified:
  - crates/mcp-preview/src/server.rs
autonomous: true
requirements:
  - CHATGPT-06

must_haves:
  truths:
    - "mcp-preview server starts without panicking on wildcard routes"
    - "WASM artifact serving works at /wasm/ paths"
    - "Static asset serving works at /assets/ paths"
  artifacts:
    - path: "crates/mcp-preview/src/server.rs"
      provides: "Fixed axum 0.8 wildcard route syntax"
      contains: "{*path}"
  key_links:
    - from: "crates/mcp-preview/src/server.rs"
      to: "axum 0.8 router"
      via: "wildcard route syntax {*path}"
      pattern: "\\{\\*path\\}"
---

<objective>
Fix mcp-preview server panic caused by axum 0.8 wildcard route syntax change.

Purpose: Axum 0.8 changed wildcard route syntax from `*path` to `{*path}`. The mcp-preview server uses the old syntax on lines 106 and 108, causing a panic at startup. This prevents any MCP Apps preview workflow.

Output: mcp-preview compiles and starts without panic.
</objective>

<execution_context>
@./.claude/get-shit-done/workflows/execute-plan.md
@./.claude/get-shit-done/templates/summary.md
</execution_context>

<context>
@.planning/phases/34-fix-mcp-apps-chatgpt-compatibility/34-CONTEXT.md
@crates/mcp-preview/src/server.rs

<interfaces>
<!-- Current broken code at lines 106-108 -->
```rust
.route("/wasm/*path", get(handlers::wasm::serve_artifact))
.route("/assets/*path", get(handlers::assets::serve))
```

<!-- Must become -->
```rust
.route("/wasm/{*path}", get(handlers::wasm::serve_artifact))
.route("/assets/{*path}", get(handlers::assets::serve))
```
</interfaces>
</context>

<tasks>

<task type="auto">
  <name>Task 1: Fix axum 0.8 wildcard route syntax in mcp-preview</name>
  <files>crates/mcp-preview/src/server.rs</files>
  <action>
Change lines 106 and 108 in server.rs:
- `"/wasm/*path"` to `"/wasm/{*path}"`
- `"/assets/*path"` to `"/assets/{*path}"`

This is a two-character change on each line. The handler functions using `Path<String>` extractors work unchanged since axum 0.8 still extracts the wildcard value the same way via `{*path}`.

Bump the mcp-preview version in `crates/mcp-preview/Cargo.toml` (patch increment).
  </action>
  <verify>
    <automated>cargo check -p mcp-preview && cargo clippy -p mcp-preview -- -D warnings</automated>
  </verify>
  <done>mcp-preview compiles without errors or warnings; wildcard routes use {*path} syntax.</done>
</task>

</tasks>

<verification>
```bash
cargo check -p mcp-preview
cargo clippy -p mcp-preview -- -D warnings
```
</verification>

<success_criteria>
- `cargo check -p mcp-preview` passes
- No clippy warnings
- Route strings contain `{*path}` not `*path`
</success_criteria>

<output>
After completion, create `.planning/phases/34-fix-mcp-apps-chatgpt-compatibility/34-02-SUMMARY.md`
</output>
