Integration · Model Context Protocol
Protect MCP tool calls
Protect tool results at the client boundary without coupling detection to an MCP SDK implementation.
01 · MCP
Install
The MCP adapter builds on the AI-context boundary and uses released packages.
npm install @redact-secret/core@0.1.0-beta.13 @redact-secret/adapter-mcp@0.1.502 · MCP
Protect a result
The supported boundary covers tools/call and resources/read results and can include tool arguments. Binary or encoded values block by default rather than being decoded speculatively.
import { createMcpBoundary, toCallToolResult } from "@redact-secret/adapter-mcp";
const boundary = await createMcpBoundary();
const outcome = await boundary.sanitizeToolCall(({ signal }) =>
client.callTool(params, undefined, { signal }),
);
const safeResult = toCallToolResult(outcome);