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
Config errors should only surface details in STDIO mode #781
Errors like ConfigurationError and LLMProviderError (invalid keys, missing providers, conflicting config) currently show detailed configuration guidance to all users regardless of transport. In the hosted/Cloudflare deployment (mcp.sentry.dev), users have no ability to fix server-side configuration — these messages are confusing and unhelpful. They should see a generic "feature unavailable" message, while the detailed config error is logged server-side for operators.
In STDIO mode, the user controls their own environment, so detailed config messages are appropriate and should be preserved.
Proposed Solution
Add a field to ServerContext that indicates whether the user can fix config issues (e.g., transport: "stdio" | "http" or similar)
Set it in the STDIO entry point (packages/mcp-server/src/index.ts) and Cloudflare entry point (packages/mcp-cloudflare/src/server/lib/mcp-handler.ts)
Update formatErrorForUser() in packages/mcp-core/src/internal/error-handling.ts to accept this context:
For ConfigurationError and LLMProviderError in HTTP mode: return generic "Feature Unavailable" message, log details server-side
For ConfigurationError and LLMProviderError in STDIO mode: preserve current detailed guidance
For APICallError 4xx in HTTP mode: same generic treatment
Pass the context from server.ts tool error catch block into formatErrorForUser()
Activity
fix: Redact config error details in HTTP transport (#781)
fix: Redact config error details in HTTP transport (getsentry#783)