# costwright — agent budget analysis

> costwright — agent budget analysis is an open-source MCP server. Static worst-case token-budget analysis for LLM-agent workflows + signed budget certificates. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Repository:** https://github.com/hernaninverso/costwright-mcp
- **MCP Registry name:** io.github.hernaninverso/costwright-mcp
- **Listing updated:** 2026-11-13

## About

Static worst-case token-budget analysis for LLM-agent workflows + signed budget certificates.

## Install

### Claude Code (Terminal)

```sh
claude mcp add costwright-mcp --env COSTWRIGHT_API_KEY='<COSTWRIGHT_API_KEY>' -- npx -y costwright-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "costwright-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "costwright-mcp"
      ],
      "env": {
        "COSTWRIGHT_API_KEY": "<COSTWRIGHT_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "costwright-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "costwright-mcp"
      ],
      "env": {
        "COSTWRIGHT_API_KEY": "<COSTWRIGHT_API_KEY>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "costwright-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "costwright-mcp"
      ],
      "env": {
        "COSTWRIGHT_API_KEY": "<COSTWRIGHT_API_KEY>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "costwright-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "costwright-mcp"
      ],
      "env": {
        "COSTWRIGHT_API_KEY": "<COSTWRIGHT_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "costwright-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "costwright-mcp"
      ],
      "env": {
        "COSTWRIGHT_API_KEY": "<COSTWRIGHT_API_KEY>"
      }
    }
  }
}
```

## FAQ

### Is costwright — agent budget analysis free?

Yes. costwright — agent budget analysis is open source, so you can use and self-host it for free.

### How do I add costwright — agent budget analysis to Claude Code?

Run this command in your terminal: claude mcp add costwright-mcp --env COSTWRIGHT_API_KEY='<COSTWRIGHT_API_KEY>' -- npx -y costwright-mcp

## Where this comes from

- Description: from the official MCP Registry entry.
- Install steps: from the official MCP Registry entry.

---
Source: https://ai-powered.com/mcp/costwright-agent-budget-analysis
