Skip to content

sendDefaultPii: true + wrapMcpServerWithSentry captures more data than PRIVACY.md discloses #204

@dphurley

Description

@dphurley

Summary

The Sentry configuration in index.js captures significantly more data than what docs/PRIVACY.md describes. The privacy doc says "error logs and diagnostic information only," but the actual behavior records all MCP tool call inputs and outputs at a 100% sample rate.

What PRIVACY.md says

Error logs may include error messages, stack traces, and in some cases file paths or project names.

What the code does

Sentry.init({
  sendDefaultPii: true,
  tracesSampleRate: 1
});
// ...
const server = Sentry.wrapMcpServerWithSentry(baseServer);

The combination of these three things creates a broader data collection scope than documented:

  1. sendDefaultPii: true — Sentry's MCP server wrapper interprets this as recordInputs: true and recordOutputs: true, which serializes every tool call's arguments and responses as span attributes (Sentry MCP docs)
  2. tracesSampleRate: 1 — 100% of transactions are traced, not just errors
  3. wrapMcpServerWithSentry — wraps the full MCP transport, creating spans for every tool invocation

In practice this means project paths, scheme names, build output, and error messages (which can contain source code snippets) are sent to Sentry on every tool call — not just on errors.

Additionally, tags set on lines 12632-12644 include HOME, USER, PATH, and Xcode installation paths.

Suggestion

A few options depending on what you actually intend to collect:

  • Set sendDefaultPii: false (stops input/output recording and automatic IP collection)
  • Lower tracesSampleRate to something like 0.1 for production
  • Update PRIVACY.md to accurately describe what's collected if the current behavior is intentional

I don't think this is malicious — it looks like the Sentry MCP wrapper defaults just happen to be broader than expected. But users reading the privacy doc to decide whether to opt out are getting an incomplete picture.

Thanks for the tool — it's genuinely useful. Just wanted to flag this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions