trackmcp
All posts
EngineeringAug 1, 2025·5 min read

MCP server security: redacting sensitive data

How to get analytics on your MCP server without letting sensitive arguments or results leave your process.

Krishna GoyalKrishna GoyalFounder, TrackMCP
Key takeaways
  • Redact sensitive fields in-process, before anything is sent.
  • You rarely need actual values to learn from usage.
  • Fail open: capture must never block a tool call.

Tool calls often carry sensitive data: emails, tokens, query contents. You can still measure usage without shipping any of it, as long as redaction happens locally, before anything leaves your process.

Redact in-process

Good MCP analytics strips sensitive fields on your server, not on a remote pipeline. You name the paths to remove, and the raw values never travel.

withTrackMCP(server, {
  apiKey: process.env.TRACKMCP_KEY,
  redact: ["args.email", "args.api_key", "result.raw_response"],
});

Prefer shape over content

You rarely need the actual values to learn from usage. Knowing that a call happened, which tool, which client, and whether it succeeded is enough for adoption, workflows, and reliability.

Other safeguards

  • Sample high-volume calls to reduce data footprint
  • Fail open: capture must never block a tool call
  • Scope API keys to a workspace and keep them server-side

Done right, you get the full analytics picture while sensitive data stays inside your infrastructure.

See this on your own server

TrackMCP turns your MCP server's calls into adoption, workflows, and outcomes. One line to install.

Keep reading