# Kamanu

> Kamanu is an open-source MCP server for agent testing. Checks whether an AI agent's spending limit really holds, and how sure it is. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Linux, macOS, Windows, Self-hosted
- **Repository:** https://github.com/nkamoah17/kamanu
- **MCP Registry name:** io.github.nkamoah17/kamanu
- **Categories:** [agent testing](https://ai-powered.com/categories/agent-testing)
- **Listing updated:** 2026-11-27

## About

Kamanu tests a spending cap, rate limit or approval gate by working out the most money that can actually be spent under it and the most budget that can be stranded when a payment that fits is refused. It replays the shortest event sequence behind each figure, so a result can be inspected rather than taken on trust.

Each verdict carries a confidence level tied to its weakest link, from a machine-checked proof of the model down to a plain test pass or an assumed constant. Results are written to a chained receipt on the user's disk, and signed records can be checked offline later.

It suits teams building payment controls for autonomous agents, card-program designers and developers who want to lint a single-threshold policy before it goes live. It runs as a Python command-line tool and as MCP servers that agents can call directly.

## Features

- **Maximum spendable amount:** Reports the most that can really be spent under a limit, printed beside the stated cap.
- **Stranded budget measurement:** Shows how much headroom is left unused when a payment that should fit is refused.
- **Replayable failure traces:** Produces the shortest event sequence that reproduces each counted result.
- **Confidence levels on verdicts:** Labels every verdict with a level set by its weakest supporting assumption.
- **Signed, verifiable records:** Issues receipts that can be rechecked offline with the included verifier.
- **Single-threshold policy linting:** Decides one-threshold policies quickly without installing a model checker.

## Good for

- Check whether a per-agent spending cap can be exceeded under retries and concurrent payments
- Find cases where a correct spending limit wrongly blocks a legitimate agent payment
- Let an agent ask whether a payment fits its remaining budget before attempting it
- Review card-program spending limits against their issuer-style configuration
- Gate pull requests that change payment policy files in a GitHub workflow

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add kamanu -- uvx kamanu
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "kamanu": {
      "command": "uvx",
      "args": [
        "kamanu"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "kamanu": {
      "command": "uvx",
      "args": [
        "kamanu"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "kamanu": {
      "command": "uvx",
      "args": [
        "kamanu"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "kamanu": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "kamanu"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add kamanu -- uvx kamanu
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.kamanu]
command = "uvx"
args = ["kamanu"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "kamanu": {
      "command": "uvx",
      "args": [
        "kamanu"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user kamanu uvx -- kamanu

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "kamanu": {
      "command": "uvx",
      "args": [
        "kamanu"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "kamanu": {
      "command": "uvx",
      "args": [
        "kamanu"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "kamanu": {
      "command": "uvx",
      "args": [
        "kamanu"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "kamanu": {
      "command": "uvx",
      "args": [
        "kamanu"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "kamanu": {
      "command": "uvx",
      "args": [
        "kamanu"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "kamanu": {
      "command": "uvx",
      "args": [
        "kamanu"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "kamanu": {
      "command": "uvx",
      "args": [
        "kamanu"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "kamanu": {
      "command": "uvx",
      "args": [
        "kamanu"
      ]
    }
  }
}
```

## FAQ

### Does Kamanu move or hold money?

No. It reports what a limit allows and does not enforce anything at runtime.

### Does Kamanu need a network connection?

Scans run locally and upload nothing. Verifying the proofs and running the scan need only Python and a clone of the repository.

### How is Kamanu installed?

With pip install . from a clone, or pip install kamanu. Requires Python 3.11 or later; the only dependency is PyYAML.

### How are MCP servers run?

Through uvx kamanu mcp lint, uvx kamanu mcp coach or uvx kamanu mcp serve, configured in any MCP client that uses an mcpServers file.

### Is Kamanu free?

Yes. Kamanu is open source, so you can use and self-host it for free.

### How do I add Kamanu to Claude Code?

Run this command in your terminal: claude mcp add kamanu -- uvx kamanu

### What are the best alternatives to Kamanu?

The closest alternatives to Kamanu are Kamanu lint, Kamanu coach and Knos.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Kamanu lint](https://ai-powered.com/mcp/kamanu-lint): Kamanu lint is an open-source MCP server for agent payments.
- [Kamanu coach](https://ai-powered.com/mcp/kamanu-coach): Kamanu coach is an open-source MCP server for agent payments.
- [Knos](https://ai-powered.com/mcp/knos): Knos is an open-source MCP server for agent testing.

---
Source: https://ai-powered.com/mcp/kamanu
