# Mandare

Local-first control layer for AI agents that verifies a tamper-evident audit ledger, checks token spend caps, and stops runaway tasks mid-execution.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: mandarelabs
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/mandarelabs/mandare/tree/HEAD/packages/mcp-server
- Updated: 2026-10-11
- HTML: https://affpapa.org/en/nevibecode/mcp/mandare

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `MANDARE_LEDGER_DB`, `MANDARE_MCP_HOME`, `MANDARE_WITNESS_URL`, `MANDARE_WITNESS_PUBLIC_KEY`, `MANDARE_GATEWAY_URL`, `MANDARE_MCP_ALLOW_REINSTATE` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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-server
```
Replace <…> with your own values. 1 more environment variable is in the server README

### Codex

**Platform CLI**
```bash
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-server
```
Replace <…> with your own values. 1 more environment variable is in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

**Platform CLI**
```bash
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-server
```
Replace <…> with your own values. 1 more environment variable is in the server README

## When to use it
- 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
- 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

## Similar
- [SatGate – Economic Firewall for AI Agents](https://affpapa.org/en/nevibecode/mcp/satgate-economic-firewall-for-ai-agents.md) — MCP server · ★ 11
- [skill-security](https://affpapa.org/en/nevibecode/skills/skill-security.md) — skill · 8000 installs
- [cosmos-vulnerability-scanner](https://affpapa.org/en/nevibecode/skills/cosmos-vulnerability-scanner.md) — skill · 5300 installs
- [api-security-audit](https://affpapa.org/en/nevibecode/agents/api-security-audit.md) — subagent · 3202 installs
- [codex-memory-curator](https://affpapa.org/en/nevibecode/skills/codex-memory-curator.md) — skill · 2700 installs
- [dependencies-audit](https://affpapa.org/en/nevibecode/skills/dependencies-audit.md) — skill · 1900 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
