Mandare — Claude Code MCP server: what it does, how to install
Local-first control layer for AI agents that verifies a tamper-evident audit ledger, checks token spend caps, and stops runaway tasks mid-execution.
claude mcp add --env MANDARE_LEDGER_DB=<MANDARE_LEDGER_DB> --env MANDARE_MCP_HOME=<MANDARE_MCP_HOME> --env MANDARE_WITNESS_URL=<MANDARE_WITNESS_URL> --env MANDARE_WITNESS_PUBLIC_KEY=<MANDARE_WITNESS_PUBLIC_KEY> --env MANDARE_GATEWAY_URL=<MANDARE_GATEWAY_URL> --transport stdio mcp-server -- npx -y @mandarelabs/mcp-serverWhat Mandare does
Mandare exposes fleet management tools over standard I/O for AI coding clients. It lets models inspect spend records, verify append-only ledger integrity, issue agent credentials, and trigger an immediate kill switch when loops exceed designated financial limits. Prompts and raw model replies stay strictly on your local machine.
Under the hood, the server reads the ledger from ./mandare-ledger.db by default or takes the path via MANDARE_LEDGER_DB. Without configuring MANDARE_WITNESS_URL and MANDARE_GATEWAY_URL, verification runs only against the local file and cannot detect truncated log endings.
What it helps with
- halt runaway agent loops that breach set expenditure caps
- verify cryptographic audit chains in an append-only ledger
- monitor allocated budget counters across local tasks
- issue and revoke signed credentials for agent instances
Example prompts for the agent
- Verify the Mandare ledger chain and display current spend counters
- Trigger the kill switch on the active agent process
- Check if the budget cap was exceeded on the last execution
How to install Mandare
Platform CLI
claude mcp add --env MANDARE_LEDGER_DB=<MANDARE_LEDGER_DB> --env MANDARE_MCP_HOME=<MANDARE_MCP_HOME> --env MANDARE_WITNESS_URL=<MANDARE_WITNESS_URL> --env MANDARE_WITNESS_PUBLIC_KEY=<MANDARE_WITNESS_PUBLIC_KEY> --env MANDARE_GATEWAY_URL=<MANDARE_GATEWAY_URL> --transport stdio mcp-server -- npx -y @mandarelabs/mcp-serverReplace <…> with your own values. 1 more environment variable is in the server README
Platform CLI
codex mcp add mcp-server --env MANDARE_LEDGER_DB=<MANDARE_LEDGER_DB> --env MANDARE_MCP_HOME=<MANDARE_MCP_HOME> --env MANDARE_WITNESS_URL=<MANDARE_WITNESS_URL> --env MANDARE_WITNESS_PUBLIC_KEY=<MANDARE_WITNESS_PUBLIC_KEY> --env MANDARE_GATEWAY_URL=<MANDARE_GATEWAY_URL> -- npx -y @mandarelabs/mcp-serverReplace <…> with your own values. 1 more environment variable is in the server README
Config file
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@mandarelabs/mcp-server"
],
"env": {
"MANDARE_LEDGER_DB": "<MANDARE_LEDGER_DB>",
"MANDARE_MCP_HOME": "<MANDARE_MCP_HOME>",
"MANDARE_WITNESS_URL": "<MANDARE_WITNESS_URL>",
"MANDARE_WITNESS_PUBLIC_KEY": "<MANDARE_WITNESS_PUBLIC_KEY>",
"MANDARE_GATEWAY_URL": "<MANDARE_GATEWAY_URL>"
}
}
}
}Replace <…> with your own values. 1 more environment variable is in the server README
Config file
{
"servers": {
"mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@mandarelabs/mcp-server"
],
"env": {
"MANDARE_LEDGER_DB": "<MANDARE_LEDGER_DB>",
"MANDARE_MCP_HOME": "<MANDARE_MCP_HOME>",
"MANDARE_WITNESS_URL": "<MANDARE_WITNESS_URL>",
"MANDARE_WITNESS_PUBLIC_KEY": "<MANDARE_WITNESS_PUBLIC_KEY>",
"MANDARE_GATEWAY_URL": "<MANDARE_GATEWAY_URL>"
}
}
}
}Replace <…> with your own values. 1 more environment variable is in the server README
Platform CLI
gemini mcp add -e MANDARE_LEDGER_DB=<MANDARE_LEDGER_DB> -e MANDARE_MCP_HOME=<MANDARE_MCP_HOME> -e MANDARE_WITNESS_URL=<MANDARE_WITNESS_URL> -e MANDARE_WITNESS_PUBLIC_KEY=<MANDARE_WITNESS_PUBLIC_KEY> -e MANDARE_GATEWAY_URL=<MANDARE_GATEWAY_URL> mcp-server npx -y @mandarelabs/mcp-serverReplace <…> with your own values. 1 more environment variable is in the server README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Mandare
How to install Mandare in Claude Code?
Register the tool by running claude mcp add mandare -e MANDARE_LEDGER_DB=<MANDARE_LEDGER_DB> -- npx -y @mandarelabs/mcp-server in your terminal. Replace <MANDARE_LEDGER_DB> with your actual ledger path.
What does the Mandare MCP server do?
It equips coding assistants with tools to inspect ledger records, verify budget counters, manage identity keys, and kill runaway agents.
Does Mandare send agent prompts to external servers?
No, raw prompt data never leaves your workstation. Only cryptographic proofs and tree hashes reach external witness services if configured.