Skip to content
SKILLS
MCP ServerPublisher identity verifiedNo findings from static checks

@spboucher/claude-api-mcpv1.0.1

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.

  • downloadable
  • installable
  • executable

claude-api-mcp

An MCP server for building with the Claude API. It gives an agent two things:

  1. Knowledge that was measured, not remembered. Model rules changed a lot between generations (thinking modes, effort levels, forced tool choice, prefill, sampling parameters). This server ships a knowledge base built by sending 46 request shapes to each of 15 models and recording what the API accepted. A linter turns that into findings and fixes before a request is sent.
  2. Hands on the API. Messages, token counting, structured extraction, batches, files and Managed Agents, with a spend guard, lint-before-send and confirmation on destructive calls.

Not affiliated with Anthropic. "Claude" is a trademark of Anthropic, PBC.

Install

Requires Node.js 20 or newer.

skills download @spboucher/claude-api-mcp --extract ./claude-api-mcp   # or download the archive and verify its SHA-256
cd claude-api-mcp
npm ci            # installs @anthropic-ai/sdk, @modelcontextprotocol/sdk and zod from the lockfile
npm test          # offline tests, no key needed

Register it (use the absolute path of server.mjs):

# Claude Code
claude mcp add --transport stdio --env ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY claude-api -- node /abs/path/claude-api-mcp/server.mjs
# Codex: ~/.codex/config.toml
[mcp_servers.claude-api]
command = "node"
args = ["/abs/path/claude-api-mcp/server.mjs"]
env_vars = ["ANTHROPIC_API_KEY"]
// Cursor: .cursor/mcp.json
{ "mcpServers": { "claude-api": { "type": "stdio", "command": "node", "args": ["/abs/path/claude-api-mcp/server.mjs"], "env": { "ANTHROPIC_API_KEY": "${env:ANTHROPIC_API_KEY}" } } } }

The key is optional: the ten offline tools work without it.

VariablePurposeDefault
ANTHROPIC_API_KEYKey for the live tools. Read from the environment, never returned in any outputnone
CLAUDE_API_MCP_MAX_OUTPUT_TOKENSSpend guard: largest max_tokens the server will send32000
CLAUDE_API_MCP_FILE_ROOTOnly directory file_upload may read fromworking directory

Tools

Offline (no key, no cost)

ToolWhat it does
model_referenceContext window, output cap, prices, thinking modes, effort levels, forced tool choice, prefill, sampling, betas, server tools — per model or as a table
recommend_modelModel and effort for a task, honouring hard requirements
lint_requestFindings for a Messages request, each with a fix and the API error text observed
fix_requestApplies the mechanical fixes and reports what changed
migrate_requestRewrites a request for another model and lists what to review
estimate_cost, compare_costsCost with cache reads/writes, batch discount, fast mode, long-prompt rates
scaffold_agentRunnable starters: single call, streaming, structured output, manual tool loop, tool runner, batch, Managed Agent — TypeScript or Python
explain_errorMaps a status or message to a cause and a fix
feature_guideShort guidance on 15 topics

Live

ToolNotes
list_models, get_model, count_tokensFree
create_messageBilled. Linted first; nothing is sent if the API would reject it. auto_fix applies fixes. Betas go in request.betas
extract_structuredBilled. Returns parsed JSON matching your schema
batch_create, batch_get, batch_list, batch_results, batch_cancelHalf price; results keyed by custom_id
file_upload, file_list, file_get, file_deleteUploads are confined to the file root
agent_*, environment_*, session_*Managed Agents (beta). session_run never approves a tool call by itself

Destructive tools (file_delete, batch_cancel, *_archive) refuse to act without confirm: true.

What "verified" means here

  • probes/probe.mjs and probes/probe2.mjs send small requests to every model the key can see. Raw results: probes/matrix.json, probes/matrix2.json. probes/build-knowledge.mjs derives knowledge.json from them. Prices come from the official pricing page (read 2026-11-10 UTC).
  • test/offline.test.mjs asserts that the linter predicts accept/reject exactly as the API did for every recorded outcome (30 shapes × 15 models), and that the fixer yields acceptable requests.
  • test/run-scaffolds.mjs executes every scaffold template against the API in both languages.
  • test/live.test.mjs drives the server through the MCP protocol with the official client: messages, tools, vision, PDF, citations, caching, web search, betas, files, batches, Managed Agents.

Refresh the knowledge base yourself: ANTHROPIC_API_KEY=… npm run probe (costs a few cents to a few dollars depending on the models your key can see), then npm test.

Limits — read these

  • A snapshot. Behaviour was observed on 2026-11-10 (UTC) under API version 2026-10-21 (the SDK default) with two legacy probes under 2023-06-01. APIs change; model_reference reports the observation date. Re-run the probes when in doubt.
  • Only models the probing key could see. Mythos models and any model released later are absent; the linter reports them as unknown rather than guessing.
  • Not probed: computer use, the advisor tool, memory stores, message threads, preserved-thinking replay rules, Bedrock / Vertex / Foundry differences. The linter is silent on these.
  • Cost figures are estimates from list prices; server-tool charges are not included. Check response.usage and your invoice.
  • recommend_model is a heuristic. Evaluate on your own data.
  • Model output returned by tools is untrusted text. Do not let it trigger actions unreviewed.

Security

The server reads the key from its environment and scrubs key-shaped strings from error messages. It executes no model output, opens no listening port, and reads local files only for file_upload inside the configured root. Managed Agent tool calls that need approval are surfaced, never auto-approved.

Install

  1. 1Register the local server

    claude mcp add --transport stdio --env ANTHROPIC_API_KEY=<value> --env CLAUDE_API_MCP_MAX_OUTPUT_TOKENS=<value> --env CLAUDE_API_MCP_FILE_ROOT=<value> claude-api-mcp -- node server.mjs
  2. 2Set the required environment variables locally

    ANTHROPIC_API_KEY, CLAUDE_API_MCP_MAX_OUTPUT_TOKENS, CLAUDE_API_MCP_FILE_ROOT — configured on your machine only; never sent to the registry.

  3. 3Optional: download the listing's source archive for review

    skills download @spboucher/claude-api-mcp@1.0.1
.mcp.json (project scope)
{
  "mcpServers": {
    "claude-api-mcp": {
      "command": "node",
      "args": [
        "server.mjs"
      ],
      "env": {
        "ANTHROPIC_API_KEY": "${ANTHROPIC_API_KEY}",
        "CLAUDE_API_MCP_MAX_OUTPUT_TOKENS": "${CLAUDE_API_MCP_MAX_OUTPUT_TOKENS}",
        "CLAUDE_API_MCP_FILE_ROOT": "${CLAUDE_API_MCP_FILE_ROOT}"
      }
    }
  }
}

Environment variables (set locally, never sent to the registry)

  • ANTHROPIC_API_KEY · optional · secret — Claude API key. Needed only by the live tools; offline tools work without it.
  • CLAUDE_API_MCP_MAX_OUTPUT_TOKENS · optional — Spend guard: largest max_tokens the server will send (default 32000).
  • CLAUDE_API_MCP_FILE_ROOT · optional — Directory file_upload may read from (default: working directory).
  • Declared permissions: network, env, filesystem:read, shell.
  • This server runs locally on your machine with your user's privileges. Review the source before running it; the registry does not execute or host it.

Installing only copies or configures. Nothing is executed for you. The Skills CLI verifies the checksum before writing files.

Files

22 files · 496 kB unpacked

Select a file to preview it. Files are shown as plain text and never executed.

Security & permissions

Declared permissions

  • network
  • env
  • filesystem:read
  • shell

Static checks

  • lowscript spawns other processestest/run-scaffolds.mjs

Static checks are advisory. They never certify that a package is safe. Compatibility entries are publisher claims unless marked verified.

Compatibility

  • claude-code · claimed
  • codex · claimed
  • cursor · claimed
  • generic-mcp · claimed

Versions

2 releases · immutable
VersionPublishedSizeSHA-256State
1.0.1latestNov 10, 202676 kB60448ca13633…published
1.0.0Nov 10, 202675 kB6067c33278a6…published

Release notes for v1.0.1

Fix: server exited when launched through a symlinked path. Use this version instead of 1.0.0.

Publication history

  1. release.publish@spboucher/claude-api-mcp@1.0.1by Simon-Pierre Boucher
  2. release.publish@spboucher/claude-api-mcp@1.0.0by Simon-Pierre Boucher
  3. artifact.create@spboucher/claude-api-mcpby Simon-Pierre Boucher
  • MCP ServerVerified publisher

    @spboucher/safari-mcp

    MCP server that drives Safari on macOS through AppleScript: navigation, reading, forms, uploads, downloads with the page's session, screenshots. Works in its own window, with domain policy and sensitive-field guards.

    Latest version
    v1.0.0
    Licence
    MIT
    Updated
    1 h ago
  • MCP ServerVerified publisher

    @spboucher/openai-api-mcp

    MCP server for building with the OpenAI API: probe-verified model reference, request linter for Responses and Chat Completions, cost estimates, scaffolding, plus live responses, embeddings, batches, files, vector stores, speech and images.

    Latest version
    v1.0.0
    Licence
    MIT
    Updated
    1 h ago
  • MCP ServerVerified publisher

    @spboucher/echo-mcp-server

    Dependency-free local MCP server over stdio with a single echo tool, for testing client configuration.

    Latest version
    v1.0.0
    Licence
    MIT
    Updated
    4 h ago

↑↓ to navigate · enter to open · esc to close