AI disclaimer: used Claude Code to generate as much useful context as possible.
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node - express
SDK Version
10.48.0
Framework Version
@modelcontextprotocol/sdk 2.x (Node StreamableHTTPServerTransport)
Link to Sentry event
N/A — no spans are emitted
Reproduction Example/SDK Setup
Sentry.init({ dsn: process.env.DSN, tracesSampleRate: 1.0 });
app.all('/mcp', auth, async (req, res) => {
const transport = new StreamableHTTPServerTransport({
sessionIdGenerator: undefined, // stateless
enableJsonResponse: true,
});
const server = Sentry.wrapMcpServerWithSentry(
new McpServer({ name: 'x', version: '1.0.0' }),
{ recordInputs: true, recordOutputs: true },
);
registerTools(server);
await server.connect(transport);
await transport.handleRequest(req, res, req.body);
});
Steps to Reproduce
- Use
@sentry/node ≥ 10.39.0 (post-#19172).
- Construct a per-request
McpServer + Node StreamableHTTPServerTransport with sessionIdGenerator: undefined (stateless mode, per the official MCP SDK simpleStatelessStreamableHttp.ts example).
- Wrap with
wrapMcpServerWithSentry, server.connect(transport), transport.handleRequest(...).
- Call any tool from a client.
Expected Result
An mcp.server span with mcp.tool.name attribute for each tools/call, visible on the MCP insights dashboard.
Actual Result
Zero mcp.server spans emitted. http.server transactions for POST /mcp are recorded fine, but tool-call correlation never resolves, so spans are created on onmessage and never .end()-ed on send.
Additional Context
This is the stateless follow-up to JS-1663 / PR #19172, which the reporter flagged in this comment and a maintainer acknowledged here ("about the stateless issue, we'll get that fixed, it slipped by").
I'm using stateless because I am deploying to a scale-to-zero Fly.io server.
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
AI disclaimer: used Claude Code to generate as much useful context as possible.
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node - express
SDK Version
10.48.0
Framework Version
@modelcontextprotocol/sdk 2.x (Node
StreamableHTTPServerTransport)Link to Sentry event
N/A — no spans are emitted
Reproduction Example/SDK Setup
Steps to Reproduce
@sentry/node≥ 10.39.0 (post-#19172).McpServer+ NodeStreamableHTTPServerTransportwithsessionIdGenerator: undefined(stateless mode, per the official MCP SDKsimpleStatelessStreamableHttp.tsexample).wrapMcpServerWithSentry,server.connect(transport),transport.handleRequest(...).Expected Result
An
mcp.serverspan withmcp.tool.nameattribute for eachtools/call, visible on the MCP insights dashboard.Actual Result
Zero
mcp.serverspans emitted.http.servertransactions forPOST /mcpare recorded fine, but tool-call correlation never resolves, so spans are created ononmessageand never.end()-ed onsend.Additional Context
This is the stateless follow-up to JS-1663 / PR #19172, which the reporter flagged in this comment and a maintainer acknowledged here ("about the stateless issue, we'll get that fixed, it slipped by").
I'm using stateless because I am deploying to a scale-to-zero Fly.io server.
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it.