# mcpcost

> mcpcost is an open-source MCP server for developer tools. Look up daily health and token cost of MCP registry servers, or measure your own config. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** Web, CLI, API
- **Website:** https://mcpcost.ulehla.dev
- **Repository:** https://github.com/ondraulehla/mcpcost
- **MCP Registry name:** io.github.ondraulehla/mcpcost
- **Categories:** developer tools
- **Listing updated:** 2026-11-15

## About

The live board probes every remote server in the official MCP registry each day, 62,493 of them at the last probe shown. For each it records whether initialize and tools/list answer and how fast, the negotiated protocol version, whether auth is needed and by what route (OAuth with dynamic registration, a publisher-issued client id, or a key), whether it returns HTTP 402 for payment, and how many tools it has and how many tokens their definitions cost.

The token figure matters because every connected server hands its tool definitions to the model at the start of a session, and that cost is paid on every turn. The same project ships an npx command that reads configs for Claude Code, Claude Desktop, Cursor, VS Code, Windsurf and Gemini CLI, starts each server and prints the cost, with a budget flag that fails CI and a GitHub Action that does the same on pull requests.

For servers that return 401, stored credentials let later runs measure them, and where a publisher's npm or PyPI package exists the board can measure that instead. A monthly report and a CC BY 4.0 dataset are published.

## Features

- **Daily registry probe:** Checks whether each registry server answers and how fast.
- **Token cost per server:** Counts tokens used by tool definitions, as Claude counts them.
- **Auth detection:** Identifies OAuth, key or payment requirements.
- **Config measurement:** npx mcpcost reads common client configs and prices each server.
- **CI budget check:** A flag and GitHub Action fail builds over a token budget.
- **Credential storage:** Stored tokens allow measuring auth-gated servers.

## Good for

- Check whether an MCP server is alive before installing it
- Find out how much context a server's tools consume
- Fail a pull request that adds an expensive server
- Compare tool counts across registry servers

## Install

### Claude Code (Terminal)

```sh
claude mcp add --transport http mcpcost https://mcpcost.ulehla.dev/mcp
```

### Claude Desktop (Settings → Connectors → Add custom connector)

```sh
https://mcpcost.ulehla.dev/mcp
```

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

```json
{
  "mcpServers": {
    "mcpcost": {
      "url": "https://mcpcost.ulehla.dev/mcp"
    }
  }
}
```

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

```json
{
  "servers": {
    "mcpcost": {
      "type": "http",
      "url": "https://mcpcost.ulehla.dev/mcp"
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "mcpcost": {
      "serverUrl": "https://mcpcost.ulehla.dev/mcp"
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "mcpcost": {
      "type": "http",
      "url": "https://mcpcost.ulehla.dev/mcp"
    }
  }
}
```

## FAQ

### How do I measure my own servers?

Run npx mcpcost; it reads configs for several clients, starts each server and prints cost per server.

### Can it enforce a limit in CI?

Yes. --budget exits with 1 above the limit, and a GitHub Action is available.

### Are the token counts exact?

The default is an estimate; --claude uses Anthropic's count_tokens endpoint and needs ANTHROPIC_API_KEY.

### Does it handle servers that need login?

Yes, after you store credentials with npx mcpcost auth.

### Is mcpcost free?

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

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

Run this command in your terminal: claude mcp add --transport http mcpcost https://mcpcost.ulehla.dev/mcp

### What are the best alternatives to mcpcost?

The closest alternatives to mcpcost are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

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