servers icon indicating copy to clipboard operation
servers copied to clipboard

Sentry MCP gets 'str' object has no attribute 'message' when trying to fetch issue

Open rsslldnphy opened this issue 1 year ago • 12 comments

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'

Image

To Reproduce Steps to reproduce the behavior:

  1. 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"
      ]
    }
  1. 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}]}]}}

rsslldnphy avatar Feb 27 '25 09:02 rsslldnphy

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.

rsslldnphy avatar Mar 03 '25 11:03 rsslldnphy

I have the exact same issue, but then running it from Cursor.

tkapitein avatar Mar 04 '25 20:03 tkapitein

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).

ziemkowski avatar Mar 05 '25 22:03 ziemkowski

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 avatar Mar 06 '25 10:03 wirewalker

@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 avatar Mar 06 '25 21:03 ziemkowski

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 😄 )

dashed avatar Mar 06 '25 21:03 dashed

@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']

wirewalker avatar Mar 09 '25 19:03 wirewalker

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 attempted this approach, but unfortunately, it didn't work out for me. I encountered the same error. 'str' object has no attribute 'message'

tkapitein avatar Mar 10 '25 10:03 tkapitein

@dashed The mcp-sentry-ts repository is working well for me in Cursor! Thanks!

tkapitein avatar Mar 10 '25 22:03 tkapitein

@dashed The mcp-sentry-ts repository 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

ronald0samuel avatar Mar 15 '25 21:03 ronald0samuel

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 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).

raoulcapello avatar Mar 16 '25 17:03 raoulcapello

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.

olaservo avatar May 29 '25 16:05 olaservo