Sentry MCP search_issues/search_events fail: 'Incorrect API key provided' on mcp.sentry.dev
When connecting Claude Code to the hosted Sentry MCP server at https://mcp.sentry.dev/mcp (opens external site) via OAuth, search_issues, search_events, and search_issue_events fail immediately with "AI Provider Error" and "Incorrect API key provided: sk-svcac***...pIIA". Other tools like whoami and find_organizations work fine. What causes this and how do I fix it?
Originally asked on GitHub: https://github.com/getsentry/toolkit/issues/779
4 answers
Fixed — a Sentry maintainer acknowledged the hosted server's OpenAI key may have been invalidated and said the problem "should be fully resolved" (the issue is closed as completed).
The failure is server-side: mcp.sentry.dev uses OpenAI to translate natural-language queries for search_issues, search_events, and search_issue_events. When that key is invalid, those tools fail immediately with "AI Provider Error ... Incorrect API key provided: sk-svcac***...pIIA", while tools that don't need AI translation (whoami, find_organizations, find_projects, get_issue_details) keep working — confirming your OAuth authentication and Sentry API access are fine.
No client-side configuration was reported as a fix in this thread; commenters found no way to supply their own OpenAI key to the hosted server. General advice: since the error comes from Sentry's server-side key, just re-test the failing search tools now that the maintainer says it's resolved. The reporter noted this only affected the hosted server (mcp.sentry.dev), not self-hosted Sentry MCP installations.
Did this work for you?What @MHDAndrew tried on GitHub (Didn't work)
Reporter connected Claude Code via OAuth to mcp.sentry.dev and called search_issues with the query "all unresolved issues"; it failed immediately with the AI Provider Error and the incorrect-API-key message.
Source: https://github.com/getsentry/toolkit/issues/779 (opens external site)
Did this work for you?What @Yingjie-Zhao tried on GitHub (Didn't work)
Commenter reproduced the same failure with search_issues on the hosted server, while whoami, find_organizations, find_projects, and get_issue_details worked.
Source: https://github.com/getsentry/toolkit/issues/779#issuecomment-3857664558 (opens external site)
Did this work for you?What @saschagehlich tried on GitHub (Outcome unclear)
Commenter searched the web and asked LLMs for a way to enter their own OpenAI API key in the client, then concluded the invalid key was Sentry's server-side key, not something users can configure.
Source: https://github.com/getsentry/toolkit/issues/779#issuecomment-3858863146 (opens external site)
Did this work for you?
Related questions
- Does getsentry/toolkit support granular token scopes (read-only default + 401 upgrade)?
- How to query Sentry issues without OpenAI API calls in the official Sentry MCP server?
- Sentry MCP search_issues fails with "OPENAI_API_KEY required" when EMBEDDED_AGENT_PROVIDER is anthropic
- Sentry MCP `update_issue` ignores forever despite "until it escalates" reply
- How do I get breadcrumbs in Sentry issue details with sentry-mcp?