Title: `wrapMcpServerWithSentry` defaults `recordInputs` / `recordOutputs` to `true` (via `dataCollection.genAI`) | · Issue #24604 · getsentry/sentry-javascript · GitHub
Open Graph Title: `wrapMcpServerWithSentry` defaults `recordInputs` / `recordOutputs` to `true` (via `dataCollection.genAI`) | · Issue #24604 · getsentry/sentry-javascript
X Title: `wrapMcpServerWithSentry` defaults `recordInputs` / `recordOutputs` to `true` (via `dataCollection.genAI`) | · Issue #24604 · getsentry/sentry-javascript
Description: Static review of public source at commit b633c8153250. No traffic was sent to any Sentry environment. MCP server instrumentation resolves capture flags like this: packages/core/src/integrations/mcp-server/transport.ts: function resolveMc...
Open Graph Description: Static review of public source at commit b633c8153250. No traffic was sent to any Sentry environment. MCP server instrumentation resolves capture flags like this: packages/core/src/integrations/mcp...
X Description: Static review of public source at commit b633c8153250. No traffic was sent to any Sentry environment. MCP server instrumentation resolves capture flags like this: packages/core/src/integrations/mcp...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/24604
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`wrapMcpServerWithSentry` defaults `recordInputs` / `recordOutputs` to `true` (via `dataCollection.genAI`) |","articleBody":"Static review of public source at commit `b633c8153250`. No traffic was sent to any Sentry environment.\n\nMCP server instrumentation resolves capture flags like this:\n\n`packages/core/src/integrations/mcp-server/transport.ts`:\n\n```ts\nfunction resolveMcpOptions(options: McpServerWrapperOptions): ResolvedMcpOptions {\n // ...\n const genAI = getClient()?.getDataCollectionOptions().genAI;\n return {\n recordInputs: options.recordInputs ?? genAI?.inputs ?? true,\n recordOutputs: options.recordOutputs ?? genAI?.outputs ?? true,\n };\n}\n```\n\n`dataCollection.genAI` itself documents `{ inputs: true, outputs: true }` as the default. So a bare `Sentry.wrapMcpServerWithSentry(server)` will put tool/prompt **arguments and results** on spans (tokens, file paths, user content, etc.) unless the operator remembers to pass `{ recordInputs: false, recordOutputs: false }` or tighten `dataCollection.genAI`.\n\nThat is great for AI debugging; it is a surprising default for MCP servers that often proxy secrets and private data.\n\n**Suggested change:**\n- Default MCP wrapper capture to `false` / metadata-only unless `recordInputs`/`recordOutputs` or `dataCollection.genAI` is explicitly enabled; or\n- Keep genAI defaults but make `wrapMcpServerWithSentry()` document and prefer explicit `{ recordInputs, recordOutputs }` with a one-time startup log when both resolve to `true`.\n- Mirror the scrubbing posture already used for network PII in `piiFiltering.ts`.\n\n**Severity:** low–medium / privacy & data-minimization defense-in-depth (parallel to the Python SDK EventScrubber recursive default discussion). Not claiming a Sentry platform vulnerability. No proof-of-concept.\n\nHappy to send a focused PR if useful.","author":{"url":"https://github.com/tiagovilasboas","@type":"Person","name":"tiagovilasboas"},"datePublished":"2026-09-22T19:06:54Z","url":"https://github.com/getsentry/sentry-javascript/issues/24604"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c9920cf7-2e8d-deda-1a53-2c95d25e084e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CF88:94BF4:24D65:33BBD:6B0415CC |
| html-safe-nonce | 3e7205b20478b8e460499172f9735779cc062d54dedb8105b5c7d7d77e99d18b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjg4Ojk0QkY0OjI0RDY1OjMzQkJEOjZCMDQxNUNDIiwidmlzaXRvcl9pZCI6IjMyMjQ1OTU0NTU0NTk3MjY3OTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f07a78a9740ff9a81fd9fe11c34528f78f04aa73b64a08054a88e0efe4da9703 |
| hovercard-subject-tag | issue:5543975424 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/24604/issue_layout |
| twitter:image | https://opengraph.githubassets.com/986748008d28e782fcc19c05430f68565f9664c3ca44c5d490a6417568d53393/getsentry/sentry-javascript/issues/24604 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/986748008d28e782fcc19c05430f68565f9664c3ca44c5d490a6417568d53393/getsentry/sentry-javascript/issues/24604 |
| og:image:alt | Static review of public source at commit b633c8153250. No traffic was sent to any Sentry environment. MCP server instrumentation resolves capture flags like this: packages/core/src/integrations/mcp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tiagovilasboas |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width