# MCP Toolcall Policy MCP

> MCP Toolcall Policy MCP is an open-source MCP server for developer tools. Writes and tests policies that decide which MCP tool calls Claude Code permits. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted
- **Repository:** https://github.com/kimmawla/mcp-toolcall-policy/tree/HEAD/server
- **MCP Registry name:** io.github.kimmawla/mcp-toolcall-policy-mcp
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-29

## About

This server helps you author and check rules for the mcp-toolcall-policy engine without touching live tool calls. You paste a policy and a sample hook input, and it reports the decision the engine would reach, along with a per-rule trace or lint errors and warnings.

It is a dry-run workbench: it reads no files, opens no network connections, writes nothing and starts no subprocesses. Enforcement happens elsewhere, in the PreToolUse hook of the companion mcp-toolcall-policy package, so an "allow" here only means a rule in the pasted policy permits the call, not that the call is safe.

It suits developers who maintain Claude Code guardrails and want to iterate on policy files before wiring them into a hook. Installation is a single command through uv, and each release pins one engine version so the decisions it reports match that engine.

## Features

- **Policy decision evaluation:** Runs a pasted policy against a sample hook input and returns the resulting decision, matching rule id and exit code.
- **Per-rule decision trace:** Shows how each rule and predicate evaluated, so you can see why a call was allowed or denied.
- **Policy linting:** Reports validation errors with locations and warnings tied to rule ids before a policy is deployed.
- **Paste-only operation:** Accepts text only, with no file path access, network calls or writes, keeping testing isolated from live tools.
- **Fail-closed responses:** Unparseable or unverifiable input returns a deny decision with a fixed code instead of passing silently.
- **Version-pinned engine:** Each release is tied to one exact engine version so reported decisions match the enforcing package.

## Good for

- Draft a tool-call policy for Claude Code and check it against sample hook inputs
- Lint a policy file for errors and warnings before rolling it out
- Trace which rule and predicate produced a particular allow or deny decision
- Debug why a legitimate tool call is being blocked by a policy

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add mcp-toolcall-policy-mcp -- uvx mcp-toolcall-policy-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "mcp-toolcall-policy-mcp": {
      "command": "uvx",
      "args": [
        "mcp-toolcall-policy-mcp"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-toolcall-policy-mcp": {
      "command": "uvx",
      "args": [
        "mcp-toolcall-policy-mcp"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp-toolcall-policy-mcp": {
      "command": "uvx",
      "args": [
        "mcp-toolcall-policy-mcp"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "mcp-toolcall-policy-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-toolcall-policy-mcp"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add mcp-toolcall-policy-mcp -- uvx mcp-toolcall-policy-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.mcp-toolcall-policy-mcp]
command = "uvx"
args = ["mcp-toolcall-policy-mcp"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "mcp-toolcall-policy-mcp": {
      "command": "uvx",
      "args": [
        "mcp-toolcall-policy-mcp"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user mcp-toolcall-policy-mcp uvx -- mcp-toolcall-policy-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-toolcall-policy-mcp": {
      "command": "uvx",
      "args": [
        "mcp-toolcall-policy-mcp"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-toolcall-policy-mcp": {
      "command": "uvx",
      "args": [
        "mcp-toolcall-policy-mcp"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "mcp-toolcall-policy-mcp": {
      "command": "uvx",
      "args": [
        "mcp-toolcall-policy-mcp"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "mcp-toolcall-policy-mcp": {
      "command": "uvx",
      "args": [
        "mcp-toolcall-policy-mcp"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "mcp-toolcall-policy-mcp": {
      "command": "uvx",
      "args": [
        "mcp-toolcall-policy-mcp"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "mcp-toolcall-policy-mcp": {
      "command": "uvx",
      "args": [
        "mcp-toolcall-policy-mcp"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "mcp-toolcall-policy-mcp": {
      "command": "uvx",
      "args": [
        "mcp-toolcall-policy-mcp"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp-toolcall-policy-mcp": {
      "command": "uvx",
      "args": [
        "mcp-toolcall-policy-mcp"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 3 tools reads data; 2 names don't say. From the server's own tool labels and tool names; not verified by us.

- `evaluate_policy`: Returns the decision, rule id, reason and hook exit code for a pasted policy and hook input.
- `explain_decision` (name suggests: reads): Returns the decision plus a per-rule, per-predicate trace.
- `lint_policy`: Returns validity, errors with code and location, and warnings with code and rule id.

## FAQ

### Does MCP Toolcall Policy MCP block or monitor tool calls?

No. It only evaluates pasted policies and inputs. Enforcement is done by the PreToolUse hook in the mcp-toolcall-policy package.

### How do I install MCP Toolcall Policy MCP for Claude Code?

Run claude mcp add mcp-toolcall-policy-mcp -- uvx mcp-toolcall-policy-mcp, using uv. You can pin a version with uvx mcp-toolcall-policy-mcp@0.1.0.

### Does MCP Toolcall Policy MCP read files or use the network?

No. The tools take pasted text only and the server reads no files, opens no network connections, writes nothing and runs no subprocesses.

### What is the size limit for inputs?

Policies can be up to 256 KiB, and hook input is limited to the policy's max_input_bytes, at most 8 MiB.

### Is MCP Toolcall Policy MCP free?

Yes. MCP Toolcall Policy MCP is open source, so you can use and self-host it for free.

### How do I add MCP Toolcall Policy MCP to Claude Code?

Run this command in your terminal: claude mcp add mcp-toolcall-policy-mcp -- uvx mcp-toolcall-policy-mcp

### What are the best alternatives to MCP Toolcall Policy MCP?

The closest alternatives to MCP Toolcall Policy MCP are MCP Lab, Protect MCP, mcpcut, mcp-vol and MCP Security Guard.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [MCP Lab](https://ai-powered.com/mcp/mcp-lab): MCP Lab is an open-source MCP server for developer tools.
- [Protect MCP](https://ai-powered.com/mcp/protect-mcp): Protect MCP is an open-source MCP server for security.
- [mcpcut](https://ai-powered.com/mcp/mcpcut): mcpcut is an open-source MCP server for security.
- [mcp-vol](https://ai-powered.com/mcp/mcp-vol): mcp-vol is an open-source MCP server for developer tools.
- [MCP Security Guard](https://ai-powered.com/mcp/mcp-security-guard): MCP Security Guard is an open-source MCP server for security.
- [MCP Guardian](https://ai-powered.com/mcp/mcp-guardian): MCP Guardian is an open-source MCP server for developer tools.
- [Security Proxy](https://ai-powered.com/mcp/security-proxy-2): Security Proxy is an MCP server for security.
- [MCPProxy](https://ai-powered.com/mcp/mcpproxy): MCPProxy is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/mcp-toolcall-policy-mcp
