Sentry MCP gets 'str' object has no attribute 'message' when trying to fetch issue
Describe the bug When trying to fetch an issue using the Sentry mcp server, Claude gets a Python error:
'str' object has no attribute 'message'
To Reproduce Steps to reproduce the behavior:
- set up sentry MCP server in claude using the following config:
"sentry": {
"command": "/Users/REDACTED/.local/bin/uvx",
"args": [
"mcp-server-sentry",
"--auth-token",
"REDACTED"
]
}
- Ask claude to fetch an issue
Expected behavior It should fetch the issue details
Logs
nothing obviously useful in the logs:
2025-02-27T09:08:41.113Z [sentry] [info] Message from server: {"jsonrpc":"2.0","id":274,"result":{"prompts":[{"name":"sentry-issue","description":"Retrieve a Sentry issue by ID or URL","arguments":[{"name":"issue_id_or_url","description":"Sentry issue ID or URL","required":true}]}]}}
Further info on this: it happens in one Sentry account I have set up but not in another. Can't see any obvious way in which the two accounts could be set up differently that could cause this.
I have the exact same issue, but then running it from Cursor.
I ran into this when I tried adding an Auth Token, as it only has org ci scopes.
Solution: I had to go to the next section, Custom Integrations, and create an internal integration there and gave it a name and appropriate scopes. Once it was created, I used the "New Token" (NOT Client Secret) button to create the auth token that ended up working (NOT Client Secret).
I have the exact same issue, but then running it from Cursor.
i am using cursor and also i still have the same , can you give me more insights
@wirewalker Are you using a custom integration with a token from the integration page as described in my comment? Using that token instead of a standard token worked for me.
Disclaimer: I currently work at Sentry and we're aware of this MCP Sentry server implementation.
This pull request should hopefully address some of these issues: https://github.com/modelcontextprotocol/servers/pull/673
If anyone is motivated and ambitious to try to get this working, there is a "work in progress" MCP server implementation for Sentry in TypeScript at https://github.com/codyde/mcp-sentry-ts.
I was just recently looking into getting this to work for Cursor editor: https://github.com/codyde/mcp-sentry-ts/pull/1
Hopefully we'll get to a state where folks can use something like npx -y @sentry/mcp-server (but no promises 😄 )
@wirewalker Are you using a custom integration with a token from the integration page as described in my comment? Using that token instead of a standard token worked for me. @ziemkowski Unfortunately , i donot have access to the Custom Integration , so i was not able to create it :(
@tkapitein could you give me us details of the way you did it with Cursor that over come the issue of the [ str' object has no attribute 'message']
I ran into this when I tried adding an Auth Token, as it only has
org ciscopes.Solution: I had to go to the next section, Custom Integrations, and create an internal integration there and gave it a name and appropriate scopes. Once it was created, I used the "New Token" (NOT Client Secret) button to create the auth token that ended up working (NOT Client Secret).
I attempted this approach, but unfortunately, it didn't work out for me. I encountered the same error.
'str' object has no attribute 'message'
@dashed The mcp-sentry-ts repository is working well for me in Cursor! Thanks!
@dashed The
mcp-sentry-tsrepository is working well for me in Cursor! Thanks!
can you please tell me how you got it to work on cursor? nothing seems to work especially on cursor's side. i tried using mcp inspector and it works there, only giving me errors when i try to connect through cursor
mcp-sentry-ts works for me on Cursor 🔥
Thanks @dashed and Sentry for providing it ❤
Disclaimer: I currently work at Sentry and we're aware of this MCP Sentry server implementation.
If anyone is motivated and ambitious to try to get this working, there is a "work in progress" MCP server implementation for Sentry in TypeScript at https://github.com/codyde/mcp-sentry-ts.
And thanks to @ziemkowski 💯 for pointing out how to create the appropriate auth token:
I ran into this when I tried adding an Auth Token, as it only has
org ciscopes.Solution: I had to go to the next section, Custom Integrations, and create an internal integration there and gave it a name and appropriate scopes. Once it was created, I used the "New Token" (NOT Client Secret) button to create the auth token that ended up working (NOT Client Secret).
Thanks for reporting this. This server has been moved to the archived repository at https://github.com/modelcontextprotocol/servers-archived to reduce maintenance overhead, so we can focus our efforts on a smaller set of core servers. Since this server is no longer actively maintained, we recommend checking out the alternatives listed in the Readme.