About guardian-mcp
guardian-mcp is an MCP server that places Guardian authorization checks before agent tool calls. It supports approval holds, policy denials, execution receipts, and proxying existing stdio MCP servers.
Key features
- 01Gate calls with ALLOW, ASK, or DENY
- 02Hold ASK calls for human approval
- 03Claim approved calls and execute them
- 04Retrieve machine-readable receipts
- 05Proxy existing stdio MCP servers
Use cases
- 01Require approval before a tool performs a sensitive action
- 02Block calls that Guardian denies or cannot authorize
- 03Add Guardian checks to an existing stdio MCP server
- 04Inspect suggested modes before governing server tools
MCP support
The server exposes `guardian_invoke_tool`, `guardian_claim`, and `guardian_receipt` to MCP clients. Its proxy mode forwards existing server tools only after Guardian decides; ASK calls wait for human approval and DENY calls are not forwarded.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
npx -y @odingard/guardian-mcpGUARDIAN_BASE_URLGuardian control-plane base URLGUARDIAN_AGENT_CREDENTIALSecretAgent credential (gak_…)GUARDIAN_CONNECTION_IDDefault tool connection id for invocationsGUARDIAN_ADAPTER_IDOptional adapter overrideLocal servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
Tools
3Saved tool list · updated today
| Parameter | Type | Required | Description |
|---|---|---|---|
| purpose | string | No | Human-readable reason for this action. |
| toolName | string | Yes | Registered tool name. |
| arguments | object | No | Arguments the tool would run with. |
| connectionId | string | No | Tool connection id. Defaults to GUARDIAN_CONNECTION_ID. |
Details
From the project README@odingard/guardian-mcp
MCP server that routes an agent's tool calls through Guardian — Human Authority Infrastructure for Autonomous AI. Every tool call gets a deterministic ALLOW / ASK / DENY decision before anything executes; DENY means the action never runs, and ASK holds it until a human approves.
Install
npm i -g @odingard/guardian-mcp
Configure your MCP client
{
"mcpServers": {
"guardian": {
"command": "guardian-mcp",
"env": {
"GUARDIAN_BASE_URL": "https://guardian-api.odingard.com",
"GUARDIAN_AGENT_CREDENTIAL": "gak_…",
"GUARDIAN_CONNECTION_ID": "con_…"
}
}
}
}
GUARDIAN_ADAPTER_ID optionally overrides the tool adapter.
Tools
| Tool | What it does |
|---|---|
guardian_invoke_tool | Propose a tool call. ALLOW executes and returns the receipt; ASK returns a requestId held for human approval; DENY refuses with a reason code. |
guardian_claim | Claim an approved ASK by requestId, execute, return the receipt. |
guardian_receipt | Fetch the machine-readable evidence receipts for a request. |
Nothing executes without a Guardian capability — the model's output is a proposal, never an action.
Govern an existing MCP server: guardian-mcp proxy (0.3)
Put Guardian in front of any stdio MCP server you already use, such as WhatsApp, Stripe, Shopify, a filesystem or a database. The client sees the upstream server's tools unchanged, and every call is decided first:
{
"mcpServers": {
"whatsapp-governed": {
"command": "guardian-mcp",
"args": ["proxy", "--", "npx", "-y", "your-whatsapp-mcp-server"],
"env": {
"GUARDIAN_BASE_URL": "https://guardian-api.odingard.com",
"GUARDIAN_AGENT_CREDENTIAL": "gac1.…",
"GUARDIAN_CONNECTION_ID": "con_…",
"WHATSAPP_TOKEN": "…"
}
}
}
}
| Decision | What happens |
|---|---|
| ALLOW | The call is forwarded to the upstream server, then the capability is redeemed and the receipt recorded. |
| ASK | Nothing is forwarded. The exact call is held under a requestId; after a human approves, guardian_claim forwards exactly that call, once. |
| DENY | Nothing is forwarded, ever. The same applies if Guardian is unreachable. |
guardian_claimandguardian_receiptare added to the tool list.- The upstream server never receives
GUARDIAN_*settings, so it never sees the agent credential. - Decision-gated: an allowed call runs upstream before the capability is
redeemed. A refusal at redemption is reported as an incident
(
localEffectRan: true), never as success. - First-run setup: in the Guardian console, connect a tool server and add
each upstream tool as "My own code (record-only)". Then allow those tools
for the agent.
- Since 0.3.1 the proxy does not try to register tools itself.
GUARDIAN_AUTO_REGISTER=trueturns that back on, but it is denied unless the agent's grant pinsmcp.install.- When Guardian refuses, the result says what to fix.
- Held calls live in the proxy process. Restarting the proxy drops them, and nothing is forwarded.
guardian-mcp --help prints usage. A missing setting prints a one-line
message naming it instead of a stack trace.
See what you are about to govern: guardian-mcp tools
Before putting a server behind the proxy, list its tools along with a suggested Guardian mode for each. This needs no Guardian credential:
npx -y @odingard/guardian-mcp tools -- npx -y @modelcontextprotocol/server-filesystem ./data
Tool Suggested Why
read_file Allow server marks it read-only
write_file Ask me first "write" may change something
delete_branch Ask me first server marks it destructive
createIssue Ask me first "create" may change something ⚠ name not accepted by Guardian
How the suggestions are made:
- The server's own MCP annotations (
readOnlyHint,destructiveHint) are used first. - Otherwise the tool's verb decides.
get,listandsearchsuggest Allow; everything else suggests Ask.
They are suggestions only: you set the real modes in the console. Tool names that break Guardian's naming rule are flagged, because every call to them would be denied. Add --json for machine-readable output.
License
Apache-2.0. Canonical development happens in the Odingard Guardian monorepo.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.