Skip to content

Don't redact MCP tool output (trusted integrations) - #1992

Merged
Aaronontheweb merged 2 commits into
netclaw-dev:devfrom
Aaronontheweb:fix/mcp-output-not-redacted
Aug 18, 2026
Merged

Don't redact MCP tool output (trusted integrations)#1992
Aaronontheweb merged 2 commits into
netclaw-dev:devfrom
Aaronontheweb:fix/mcp-output-not-redacted

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Collaborator

MCP servers are trusted, user-configured integrations — the model can only call them because the operator added and granted them — and every other MCP harness (Claude Code, Cursor, …) passes their output to the model verbatim.

McpToolAdapter didn't override SuppressOutputRedaction, so it inherited the false default and SecretOutputRedactor ran on MCP results. That corrupts legitimate payloads whose content looks credential-like — most notably presigned upload URLs (the X-Amz-Signature/X-Amz-Credential query params), which came back ***REDACTED*** and unusable, silently breaking a standard MCP upload pattern that works in every other harness.

This overrides SuppressOutputRedaction => true on McpToolAdapter so MCP output flows to the model unmodified. Redaction stays fully on for genuinely-untrusted sources (shell, file reads, web fetch, background-job tails). Adds a unit test.

Security posture: treats MCP servers as trusted-by-configuration (matching the ecosystem). MCP tool calls remain gated by the existing grant/approval system; only the output-redaction step changes.

@Aaronontheweb
Aaronontheweb force-pushed the fix/mcp-output-not-redacted branch from ba42d3a to bc18f28 Compare August 18, 2026 18:26
@Aaronontheweb Aaronontheweb added the mcp Model context protocol server / client issues. label Aug 18, 2026
MCP servers are trusted extensions the operator explicitly added and granted;
the model only reaches them because they were configured, and every other MCP
harness (Claude Code, Cursor, ...) passes their results to the model verbatim.
McpToolAdapter inherited SuppressOutputRedaction=false, so SecretOutputRedactor
ran on MCP output and corrupted legitimate payloads whose content looks
credential-like — e.g. presigned upload URLs (X-Amz-Signature / X-Amz-Credential
query params), which came back redacted and unusable.

Override SuppressOutputRedaction => true on McpToolAdapter so MCP output flows to
the model unmodified. Redaction stays on for genuinely-untrusted sources (shell,
file reads, web fetch, background jobs).

Tests: a unit test on the adapter flag, plus an end-to-end DispatchingToolExecutor
test that runs a presigned URL through an MCP adapter and asserts the credential
survives to the model — with a guard asserting SecretOutputRedactor would
otherwise strip it.
@Aaronontheweb
Aaronontheweb force-pushed the fix/mcp-output-not-redacted branch from e4f0845 to 73a4507 Compare August 18, 2026 19:35

@Aaronontheweb Aaronontheweb left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aaronontheweb
Aaronontheweb enabled auto-merge (squash) August 18, 2026 20:08
@Aaronontheweb
Aaronontheweb disabled auto-merge August 18, 2026 20:09
@Aaronontheweb
Aaronontheweb merged commit e4c47b0 into netclaw-dev:dev Aug 18, 2026
14 checks passed
@Aaronontheweb
Aaronontheweb deleted the fix/mcp-output-not-redacted branch August 18, 2026 20:09
@Aaronontheweb Aaronontheweb mentioned this pull request Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mcp Model context protocol server / client issues.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant