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
Move MCP error hints onto the SDK's server.use('tools/call') middleware once it's stable #27142
addErrorHints appends the feedback hint by wrapping the SDK's private tools/call handler in server.server._requestHandlers. MCP TypeScript SDK v2 now has public request middleware, server.use(method, middleware) (typescript-sdk#2820, merged 2026-11-18), which can wrap tools/call and replace its result. That's the same job without the private map.
It comes from SEP-3371 (accepted 2026-11-28, not Final), which requires public JSON-RPC middleware in official SDKs.
Blocked until:
use() ships in a @modelcontextprotocol/server release (2.4.0 doesn't have it)
On v2 servers, append the hint in a tools/call middleware instead of replacing the entry in _requestHandlers
Keep the tool callback record, since middleware doesn't see the thrown error (needed for the 4xx filter) or whether the callback ran (needed to tell input validation errors apart)
Keep the current wrapper for SDK v1, which has no use()
The nightly canary on SDK main (#27135) will flag changes around it before a release. Part of #27140.
Activity
linear-code commentedon Dec 3, 2026
JS-4224