ondraulehla

Mcpcost — Development skill for Claude Code

Development community

Is that MCP server alive, and what does it cost your context window.

How to install Mcpcost

This entry records only its repository, not the path inside it, so there is no exact command to give. Open ondraulehla/mcpcost and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Mcpcost does

Is that MCP server alive, and what does it cost your context window? Daily health and exact token cost of every server in the MCP registry.

Alternatives in Development

  • Ccusage — CLI for analyzing Claude Code/Codex usage from local JSONL files 11.8k ★
  • Claude Context Mode — An MCP server that sits between Claude Code and these outputs 5.3k ★
  • Storybloq — Cross-session context for Claude Code 696 ★

README

mcpcost

[![CI](https://github.com/ondraulehla/mcpcost/actions/workflows/ci.yml/badge.svg)](https://github.com/ondraulehla/mcpcost/actions/workflows/ci.yml) [![npm mcpcost](https://img.shields.io/npm/v/mcpcost?label=mcpcost)](https://www.npmjs.com/package/mcpcost) [![license](https://img.shields.io/github/license/ondraulehla/mcpcost)](LICENSE) [![Glama](https://glama.ai/mcp/servers/ondraulehla/mcpcost/badges/score.svg)](https://glama.ai/mcp/servers/ondraulehla/mcpcost)

**Is that MCP server alive, and what does it cost your context window?**

**Live board: [mcpcost.ulehla.dev](https://mcpcost.ulehla.dev)**

mcpcost probes every remote server in the [official MCP registry](https://registry.modelcontextprotocol.io) and records, for each one:

  • whether it answers initialize and tools/list, and how fast
  • the protocol version it negotiates
  • whether it needs auth, which scheme (from WWW-Authenticate), and how a client gets in: OAuth with dynamic client registration, OAuth with a client id from the publisher, or a key, read from the server's public OAuth metadata
  • whether it asks for payment (HTTP 402)
  • how many tools it has and how many tokens their definitions cost

mcpcost: what do your own servers cost?

npx mcpcost                     # reads Claude Code, Claude Desktop, Cursor, VS Code, Windsurf and Gemini CLI configs
npx mcpcost --config .mcp.json  # one file
npx mcpcost --budget 30000      # exit 1 when the total is above the budget, for CI
npx mcpcost --claude            # exact counts from the Anthropic count_tokens endpoint (free, needs ANTHROPIC_API_KEY)
npx mcpcost mcp                 # the same measurements as an MCP server over stdio, for your agent

It starts every configured server the way your client does, lists the tools and prints the token cost per server and in total. See [packages/mcpcost](packages/mcpcost/README.md).

Servers that need auth

A server that answers 401 is reachable but not measured until it gets credent