Measure every server in a config file
measure_configCalculates the context-token cost of every MCP server in a config file, probing local and remote servers and reporting per-server and total usage, including failure statuses.
Instructions
Measures every server in one MCP config file (.mcp.json, Claude Desktop, Cursor, VS Code or Windsurf format): starts each local server the way the client would and stops it after tools/list, connects to each remote one, and reports the tokens per server and the total. Use it to see what a whole config costs the context window; use measure_server for one server. A server that fails to start or needs credentials is reported with its status, never thrown. Up to about 15 s per server.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "measure_config"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the config file, absolute or relative to the working directory | |
| window | No | Context window in tokens for shareOfWindow; default 200000 (Claude) | |
| noStdio | No | true = measure the remote servers only and start no local process; default false |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | The config file that was read | |
| total | No | Over the servers that answered: how many, their tokens (exact when a Claude count exists, else the estimate) and the share of the window | |
| servers | No | One entry per configured server: name, kind (remote or stdio) and the same fields as measure_server; or name and skipped, with the reason |