Sentry MCP server: 'str' object has no attribute 'message' when fetching an issue
When I use the Sentry MCP server (mcp-server-sentry) via uvx in Claude, and also in Cursor, fetching a Sentry issue fails with the Python error 'str' object has no attribute 'message'. The same setup works with one Sentry account but not another. Is there a known cause or workaround?
Originally asked on GitHub: https://github.com/modelcontextprotocol/servers/issues/689
5 answers
There is no fix in the original
mcp-server-sentryrepo: the issue was closed as NOT_PLANNED and the server has since been moved to the archivedmodelcontextprotocol/servers-archived. A Sentry employee said in the thread they are aware of this implementation and pointed tocodyde/mcp-sentry-tsas a work-in-progress TypeScript alternative.In the thread, one commenter traced the failure to the Sentry auth token. Their workaround: create an internal integration in Sentry's Custom Integrations section, give it a name and appropriate scopes, then click 'New Token' (NOT Client Secret) and use that token in the MCP server config. That worked for them. Another user tried the same approach and still got the identical
'str' object has no attribute 'message'error, so this is not a guaranteed fix.Several users reported that
codyde/mcp-sentry-tsworked well in Cursor.The original setup from the report was:
"command": "/Users/REDACTED/.local/bin/uvx", "args": ["mcp-server-sentry", "--auth-token", "REDACTED"]If you keep using the original server, start with the internal integration token instead of a regular auth token.
General advice: keep the token scoped to what the integration actually needs and do not paste it into config files that get committed or shared.
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
The reporter configured mcp-server-sentry in Claude with uvx and --auth-token (value redacted), then asked Claude to fetch a Sentry issue. The server returned the Python error 'str' object has no attribute 'message'.
Source: https://github.com/modelcontextprotocol/servers/issues/689 (opens external site)
Did this work for you?What @ziemkowski tried on GitHub (Worked)
A commenter reported the issue happened when using a Sentry Auth Token that only had 'org ci' scopes. They created an internal integration under Custom Integrations, gave it appropriate scopes, clicked 'New Token' (not Client Secret), and used that token in the MCP config. Fetching issues then worked for them.
Did this work for you?What @tkapitein tried on GitHub (Didn't work)
Another user followed the same Custom Integrations 'New Token' approach but still received the exact same error: 'str' object has no attribute 'message'.
Did this work for you?What @tkapitein tried on GitHub (Worked)
A user switched to the codyde/mcp-sentry-ts TypeScript MCP server in Cursor and reported it was working well.
Did this work for you?
Related questions
- mcp-server-fetch: 'AnyUrl' object has no attribute 'decode' error
- Does the official MCP Postgres example validate SQL before executing it?
- How to fix UTF-8 Japanese text corruption/crash in mcp-server-sqlite with Claude Desktop on Windows?
- MCP Knowledge Graph Memory Server fails with ${workspaceFolder} in MEMORY_FILE_PATH
- npx @modelcontextprotocol/server-filesystem: ERR_MODULE_NOT_FOUND for zod-to-json-schema