Skip to content

About

See how many tokens your MCP servers burn before you type a word - Rust port of mcp-tax. stdio JSON-RPC client, config discovery, o200k counts.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mcp-tax-rs

See how many tokens your MCP servers burn before you type a word. Rust port of mcp-tax.

Discovers MCP servers from Claude Desktop, Claude Code, Cursor, .mcp.json, and .vscode/mcp.json; spawns each one over stdio, does the initialize handshake, lists tools, prompts, and resources, then counts what clients serialize into the model context (o200k approximation). Prints a per-server table, the share of a 200k/128k/32k context window your setup consumes, and the five most expensive tools.

Usage

cargo install --path .

mcp-tax                  # scan every discovered server
mcp-tax --json           # machine-readable output
mcp-tax --dump schemas.json   # write all tool schemas for trimming
mcp-tax --config /path/to/mcp.json   # audit one config file

Layout

  • src/config.rs - config discovery across client paths
  • src/mcp.rs - minimal stdio JSON-RPC client (initialize, tools/list, prompts/list, resources/list, 15s deadline)
  • src/tokens.rs - o200k token counting
  • src/report.rs - measurement and the console table
  • tests/ - a fake MCP server fixture exercising the full handshake

About

See how many tokens your MCP servers burn before you type a word - Rust port of mcp-tax. stdio JSON-RPC client, config discovery, o200k counts.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages