MCP Toolcall Policy MCP
Writes and tests policies that decide which MCP tool calls Claude Code permits
MCP Toolcall Policy MCP is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, Self-hosted
- Runs
- Locally
- Version
- 0.1.0
- Listing updated
Similar MCP servers
Install
You install MCP servers on a computer. Send yourself the link.
Add with the CLI
Run in a terminal
claude mcp add mcp-toolcall-policy-mcp -- uvx mcp-toolcall-policy-mcpAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"mcp-toolcall-policy-mcp": {
"command": "uvx",
"args": [
"mcp-toolcall-policy-mcp"
]
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"mcp-toolcall-policy-mcp": {
"command": "uvx",
"args": [
"mcp-toolcall-policy-mcp"
]
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.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.
Add to ~/.copilot/mcp-config.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.
Add with the CLI
Run in a terminal
codex mcp add mcp-toolcall-policy-mcp -- uvx mcp-toolcall-policy-mcpOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.mcp-toolcall-policy-mcp]
command = "uvx"
args = ["mcp-toolcall-policy-mcp"]Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"mcp-toolcall-policy-mcp": {
"command": "uvx",
"args": [
"mcp-toolcall-policy-mcp"
]
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.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
Antigravity
Add to ~/.gemini/config/mcp_config.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 (formerly Windsurf)
Add to ~/.config/devin/mcp_config.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
Add to cline_mcp_settings.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
Add to Zed settings.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
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "mcp-toolcall-policy-mcp": { "command": "uvx", "args": [ "mcp-toolcall-policy-mcp" ] } } }Junie
Add to ~/.junie/mcp/mcp.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
Add to ~/.kiro/settings/mcp.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.
Using several servers? Build one config file with the MCP config generator.
About MCP Toolcall Policy MCP
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.
Tools this server provides (3)
Taken from the project documentation; the running server may differ.
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_decisionName 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.
What it does
- 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
Pricing
Open source
Open source under the MIT licence; free to install.
MCP Toolcall Policy MCP 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.