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
MCP client doesn't send Accept header required by Context7 (causes 406 Not Acceptable error) #6972
The OpenCode MCP client fails to connect to Context7's MCP server because it doesn't send the required Accept: application/json, text/event-stream HTTP header. Context7 requires both content types to be accepted, and returns HTTP 406 "Not Acceptable" when this header is missing or incorrect.
Context7 returns: {"jsonrpc":"2.0","error":{"code":-32000,"message":"Not Acceptable: Client must accept both application/json and text/event-stream"},"id":null}
The server also sends these CORS headers indicating acceptable headers:
Access-Control-Allow-Headers: Content-Type, MCP-Session-Id, MCP-Protocol-Version, X-Context7-API-Key, Context7-API-Key, X-API-Key, Authorization
Environment:
OpenCode version: v1.1.2 (released Jan 5, 2026)
Operating System: Windows
MCP Server: Context7 (https://mcp.context7.com/mcp)
Suggested Fix:
Update the OpenCode MCP client to send Accept: application/json, text/event-stream header when making requests to remote MCP servers, or at minimum, allow configuring custom Accept headers in the MCP server configuration.
Activity
github-actions commentedon Jan 5, 2026
This issue might be a duplicate of existing issues. Please check:
You may also want to review:
Feel free to ignore if none of these address your specific case.
Shivansh-Khunger commentedon Jan 9, 2026
@kamusis are you still encountering this bug in the latest version ?
kamusis commentedon Jan 9, 2026
Just wanted to update this - that issue isn't happening anymore. Context7 is working smoothly now, no problems at all! 🎉"
Shivansh-Khunger commentedon Jan 9, 2026
actually was gonna work on this issue, but saw context7 connected by default in dev mode 😅
github-actions commentedon Mar 25, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.
tanin47 commentedon Apr 1, 2026
I still encounter this in the Opencode desktop app.