Repository Public Research preview
1{2 "schemaVersion": "1.0",3 "name": "@spboucher/claude-api-mcp",4 "version": "1.0.2",5 "type": "mcp-server",6 "description": "MCP server for building with the Claude API: probe-verified model reference, request linter and fixer, cost estimates, agent scaffolding, plus live messages, token counting, batches, files and Managed Agents.",7 "license": "MIT",8 "keywords": [9 "claude",10 "anthropic",11 "claude-api",12 "mcp",13 "agents",14 "linter",15 "cost",16 "managed-agents"17 ],18 "compatibility": [19 "claude-code",20 "codex",21 "cursor",22 "generic-mcp"23 ],24 "permissions": [25 "network",26 "env",27 "filesystem:read",28 "shell"29 ],30 "mcp": {31 "transport": "stdio",32 "command": "node",33 "args": [34 "server.mjs"35 ],36 "env": [37 {38 "name": "ANTHROPIC_API_KEY",39 "description": "Claude API key. Needed only by the live tools; offline tools work without it.",40 "required": false,41 "secret": true42 },43 {44 "name": "CLAUDE_API_MCP_MAX_OUTPUT_TOKENS",45 "description": "Spend guard: largest max_tokens the server will send (default 32000).",46 "required": false,47 "secret": false48 },49 {50 "name": "CLAUDE_API_MCP_FILE_ROOT",51 "description": "Directory file_upload may read from (default: working directory).",52 "required": false,53 "secret": false54 }55 ],56 "tools": [57 {58 "name": "model_reference",59 "description": "Probe-verified facts about every Claude model (offline)"60 },61 {62 "name": "recommend_model",63 "description": "Pick a model and effort level for a task (offline)"64 },65 {66 "name": "lint_request",67 "description": "Check a Messages request against what the API accepts (offline)"68 },69 {70 "name": "fix_request",71 "description": "Apply mechanical fixes to a request (offline)"72 },73 {74 "name": "migrate_request",75 "description": "Rewrite a request for another model (offline)"76 },77 {78 "name": "estimate_cost",79 "description": "Cost from token counts, with caching, batch and fast mode (offline)"80 },81 {82 "name": "compare_costs",83 "description": "Rank models by cost for a workload (offline)"84 },85 {86 "name": "scaffold_agent",87 "description": "Runnable starter code in TypeScript or Python (offline)"88 },89 {90 "name": "explain_error",91 "description": "Explain an API error and its fix (offline)"92 },93 {94 "name": "feature_guide",95 "description": "Concise guidance per API feature (offline)"96 },97 {98 "name": "list_models",99 "description": "Models visible to the key (live)"100 },101 {102 "name": "get_model",103 "description": "Live metadata of one model"104 },105 {106 "name": "count_tokens",107 "description": "Exact input-token count (live, free)"108 },109 {110 "name": "create_message",111 "description": "Send a Messages request, linted first (live, billed)"112 },113 {114 "name": "extract_structured",115 "description": "JSON matching a schema (live, billed)"116 },117 {118 "name": "batch_create",119 "description": "Submit a message batch (live, billed)"120 },121 {122 "name": "batch_get",123 "description": "Batch status"124 },125 {126 "name": "batch_list",127 "description": "Recent batches"128 },129 {130 "name": "batch_results",131 "description": "Batch results keyed by custom_id"132 },133 {134 "name": "batch_cancel",135 "description": "Cancel a batch (confirmation required)"136 },137 {138 "name": "file_upload",139 "description": "Upload a file to the Files API"140 },141 {142 "name": "file_list",143 "description": "List uploaded files"144 },145 {146 "name": "file_get",147 "description": "File metadata"148 },149 {150 "name": "file_delete",151 "description": "Delete a file (confirmation required)"152 },153 {154 "name": "agent_create",155 "description": "Create a Managed Agent (beta)"156 },157 {158 "name": "agent_list",159 "description": "List Managed Agents"160 },161 {162 "name": "agent_get",163 "description": "Managed Agent configuration"164 },165 {166 "name": "agent_archive",167 "description": "Archive a Managed Agent (confirmation required)"168 },169 {170 "name": "environment_create",171 "description": "Create a sandbox environment (beta)"172 },173 {174 "name": "environment_list",175 "description": "List environments"176 },177 {178 "name": "environment_archive",179 "description": "Archive an environment (confirmation required)"180 },181 {182 "name": "session_run",183 "description": "Send a message to a Managed Agent and wait for it (billed)"184 },185 {186 "name": "session_respond",187 "description": "Approve, deny or answer a paused tool call"188 },189 {190 "name": "session_get",191 "description": "Session status"192 },193 {194 "name": "session_list",195 "description": "Recent sessions"196 },197 {198 "name": "session_events",199 "description": "Session event log"200 },201 {202 "name": "session_archive",203 "description": "Archive a session (confirmation required)"204 }205 ]206 },207 "examples": [208 {209 "title": "Lint a request, then send the corrected one (Claude Code)",210 "client": "claude-code",211 "image": "examples/claude-code.png",212 "alt": "Terminal screenshot of a Claude Code session using claude-api-mcp: the prompt, the tool or script calls, and the agent's answer.",213 "prompt": "With the claude-api MCP tools: (1) lint this Messages request and list what the API would reject: model claude-opus-5-5, max_tokens 1024, temperature 0.2, thinking {type: enabled, budget_tokens: 4000}. (2) Send the corrected request live with the user message 'Reply with the single word ready' and report the reply, the token usage and the cost. Answer in at most 10 lines.",214 "caption": "The linter names the two parameters the API rejects for this model; the corrected request is then sent live and its usage and cost reported. Real session, Claude Code 2.1.322 with Fable 5.2, with version 1.0.1 installed from this registry; inputs are test fixtures.",215 "capturedAt": "2026-11-10"216 },217 {218 "title": "Lint a request, then send the corrected one (Codex)",219 "client": "codex",220 "image": "examples/codex.png",221 "alt": "Terminal screenshot of a Codex session using claude-api-mcp: the prompt, the tool or script calls, and the agent's answer.",222 "prompt": "With the claude-api MCP tools: (1) lint this Messages request and list what the API would reject: model claude-opus-5-5, max_tokens 1024, temperature 0.2, thinking {type: enabled, budget_tokens: 4000}. (2) Send the corrected request live with the user message 'Reply with the single word ready' and report the reply, the token usage and the cost. Answer in at most 10 lines.",223 "caption": "The linter names the two parameters the API rejects for this model; the corrected request is then sent live and its usage and cost reported. Real session, Codex CLI 0.167.1 with GPT-6.1-Sol, with version 1.0.1 installed from this registry; inputs are test fixtures.",224 "capturedAt": "2026-11-10"225 }226 ]227}228