You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PUT /api/experimental/mcp/:server returns 404 for server names over 100 chars (router maxParamLength) #53401
PUT /api/experimental/mcp/:server returns 404 when the server name is longer than 100 characters, so the handler never runs. Effect's HttpRouter uses find-my-way, whose maxParamLength defaults to 100, and packages/server/src/routes.ts doesn't set HttpRouter.RouterConfig. T3 Code hits this for delegated threads: its server name t3-code-<threadId> is over 100 chars there, so those sessions get no MCP tools.
Possible one-line fix in routes.ts (untested), the same thing HttpRouter.serve({ routerConfig }) does:
Thanks for the clear report. I reproduced this on 2.0.22, and it still happens on the latest dev (f7d0ce1), run from source.
The script below starts opencode serve and sends PUT /api/experimental/mcp/<name> with names of 100, 101 and 150 characters. On both versions the 100-character name returns 204 and the longer ones return 404. On dev, packages/server/src/routes.ts still doesn't set HttpRouter.RouterConfig, so the router's default maxParamLength of 100 applies, as you described.
Activity
opencodejr commentedon Oct 27, 2026
Thanks for the clear report. I reproduced this on 2.0.22, and it still happens on the latest
dev(f7d0ce1), run from source.The script below starts
opencode serveand sendsPUT /api/experimental/mcp/<name>with names of 100, 101 and 150 characters. On both versions the 100-character name returns 204 and the longer ones return 404. Ondev,packages/server/src/routes.tsstill doesn't setHttpRouter.RouterConfig, so the router's defaultmaxParamLengthof 100 applies, as you described.Related:
Reproduction script (repro.sh)
Run it:
bash repro.sh