Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.118 Home All releases olderv2.1.117 v2.1.119newer
Claude Code v2.1.118

MCP Tool Hooks (mcp_tool)

What

A new hook type that invokes an MCP server tool as the hook action, as an alternative to bash/command hooks.

Details
  • Configure with type: "mcp_tool" in hook definitions
  • Specify server (name of an already-configured MCP server) and tool (tool name on that server)
  • Supports arguments object with ${path} interpolation from hook input JSON
  • Optional timeout field for per-call timeout in seconds
  • Reads X-Mcp-Error-Code header from 401 responses for better error diagnostics
  • Not available for all hook events — logs "mcp_tool hooks are not available for the '<event>' hook event" when unsupported
Evidence

Hook type definition (search for "mcp_tool") and MCP tool schema fields (search for "Name of an already-configured MCP server to invoke").

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.118 →