Feature request: Parameter masking for sensitive MCP tool inputs in transcript display

Resolved 💬 2 comments Opened Mar 31, 2026 by alexkravets Closed May 5, 2026

Summary

When calling MCP tools that accept sensitive parameters (e.g. authorization tokens, API keys, JWTs), the full parameter values are displayed in the Claude Code transcript/tool call display. There is no way to redact or mask specific parameters from being shown.

Use case

MCP tools often require bearer tokens or API keys passed as explicit parameters (e.g. an authorization field). These tokens are sensitive credentials that should not be exposed in the UI transcript, conversation history, or logs — but currently there is no mechanism to suppress them.

Current workarounds

None that work cleanly:

  • suppressOutput on a PreToolUse hook hides the hook's own stdout, not the tool input display
  • updatedInput in hookSpecificOutput modifies what is actually sent to the tool — stripping the auth field would break the call
  • No maskedParameters or equivalent setting exists in settings.json

Proposed solution

Add a way to declare specific MCP tool parameter keys as sensitive so their values are redacted in the UI (shown as [REDACTED] or ••••••) while still being passed through to the tool. This could be configured in settings.json, for example:

{
  "mcpParameterMasks": {
    "api-persona": ["authorization", "authentication"]
  }
}

Or as part of the MCP server definition itself.

Impact

Any team using MCP tools with token-based auth is currently forced to expose secrets in the conversation transcript. This is a real security/privacy gap for production usage.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗