mcp-toolcall-policy-mcp
v0.1.0Authors and tests mcp-toolcall-policy policies from pasted text.
An MCP server for writing and testing mcp-toolcall-policy policies. You paste a policy and a sample hook input; it returns the decision the engine would make, a per-rule trace, or lint errors and warnings. To pin one version, use uvx mcp-toolcall-policy-mcp@0.1.0. Each server release pins one exact engine version, so the decisions it reports match that engine.
Summary extracted from the README.
mcp-toolcall-policy-mcp
Authors and tests mcp-toolcall-policy policies from pasted text. Enforces nothing; the hook does.
An MCP server for writing and testing mcp-toolcall-policy policies. You paste a policy and a sample hook input; it returns the decision the engine would make, a per-rule trace, or lint errors and warnings.
It does not enforce anything. It does not watch, block, or change calls to any other tool or MCP
server. Enforcement is the Claude Code PreToolUse hook in the mcp-toolcall-policy package (see
its README). "allow" means "a rule in this policy permits the call". It is not a safety verdict.
Install
For Claude Code, with uv:
claude mcp add mcp-toolcall-policy-mcp -- uvx mcp-toolcall-policy-mcp
To pin one version, use uvx mcp-toolcall-policy-mcp@0.1.0. Each server release pins one exact
engine version, so the decisions it reports match that engine.
Tools
| Tool | Takes | Returns |
|---|---|---|
evaluate_policy |
policy_yaml, hook_input_json (pasted text) |
decision, rule_id, reason, hook_exit_code |
explain_decision |
policy_yaml, hook_input_json |
the decision plus a per-rule, per-predicate trace |
lint_policy |
policy_yaml |
valid, errors (code and location), warnings (code and rule id) |
- Paste only. Tools take text, never file paths. The server reads no files, opens no network connections, writes nothing, and runs no subprocesses.
- Same caps as the CLI. Policies up to 256 KiB; hook input up to the policy's
max_input_bytes(at most 8 MiB). - No echo. Responses never contain argument values or input keys: only decisions, rule ids,
policy-authored reasons, fixed codes, and policy
argnames. - Fails closed. Anything that cannot be parsed or checked returns
denywith rule id_fail_closedand a fixed code. - Every response includes two notes: "allow" is not a safety verdict, and this server does not enforce anything on other tools.
License
MIT