MCP Tool Review

When an MCP server changes a tool you approved, shows the word-by-word diff and highlights poisoned instructions before the agent uses it.

StopsHelps catch an MCP server swapping in poisoned tools

Installation

pnpm dlx shadcn@latest add https://bollard-ui.vercel.app/r/mcp-tool-review.json

The files land in your project. They're yours to edit.

Usage

mcp-tool-review-usage.tsx
import { McpToolReview, type McpTool } from "@/components/ui/mcp-tool-review"

<McpToolReview
  server="weather-mcp"
  approved={APPROVED}
  current={CURRENT}
  otherTools={OTHERS}
  onResolve={async () => {
    await new Promise((r) => setTimeout(r, 300))
  }}
/>

What it catches

  • Tool definitions changed since approval (fingerprint mismatch)
  • Injected instructions such as <IMPORTANT> blocks or "do not tell the user"
  • References to secrets or config such as ~/.ssh and mcp.json, or to another server's tools
  • New free-text parameters that could carry data out
  • Invisible characters and read-only annotations that flipped

Props

McpToolReview props
PropTypeDefault
server* (required)

Server name as the person knows it.

string—
approved* (required)

Tool definitions as they were when the person approved the server (pinned).

McpTool[] | null | undefined—
current* (required)

Tool definitions the server lists now.

McpTool[] | null | undefined—
otherTools

Tools from the person's other servers, to catch shadowing and name clashes.

{ server: string; name: string }[]—
onResolve

Called per tool. May return a Promise; the card shows a pending state and can't fire twice.

(name: string, resolution: ToolResolution) => void | Promise<void>—
messages

Override any visible string, including change, risk and resolved texts.

Partial<Omit<Messages, "change" | "risk" | "resolved">> & { change?: Partial<Messages["change"]>; risk?: Partial<Messages["risk"]>; resol…—

* required. Also accepts the native props of <div> (className, aria-*, data-*…), passed through to it.

Accessibility

  • Each tool card expands with aria-expanded and aria-controls
  • Focus moves to the open card's first action
  • Risk is shown in text with icons aria-hidden
  • Animations are skipped under reduced motion

Only what the source does. Test with your own screen reader and content before shipping.

Limitations

This is a UX guard rail. Enforce on the server: Pin approved tool definitions in the MCP host and refuse calls to tools whose fingerprint changed until re-approved.

  • Phrase-based detection; a reworded injection can slip through
  • Only sees definitions the host passes in; it doesn't talk to MCP servers
  • Keep, disable or accept is passed to onResolve; enforcing it is the host's job

What it stops

Helps catch an MCP server swapping in poisoned tools

Also known as

mcp · model context protocol · tool pinning · ai agent · claude desktop · cursor · tools/list · supply chain

Field type

Dependencies

Pairs well with