Feature request: Parameter masking for sensitive MCP tool inputs in transcript display
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:
suppressOutputon aPreToolUsehook hides the hook's own stdout, not the tool input displayupdatedInputinhookSpecificOutputmodifies what is actually sent to the tool — stripping the auth field would break the call- No
maskedParametersor equivalent setting exists insettings.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.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗