About InferCPI
InferCPI publishes data on AI inference prices and costs for analysts and agents. Its free API and MCP server cover model pricing, capability-adjusted costs, hosting, speed, and cost per task.
Key features
- 01Read inference price indexes
- 02Compare model prices and capabilities
- 03Review open and closed models
- 04Explore hosting and self-hosting costs
- 05Check speed and cost per task
Use cases
- 01Compare model prices before selection
- 02Track price changes over time
- 03Assess hosted versus self-hosted costs
- 04Estimate inference cost for a task
MCP support
The MCP server provides ten read-only tools over the InferCPI API, hosted at https://infercpi.com/mcp with no key required. It can also be run locally.
Configuration
Remote servers need no local install. Pick your client, then copy the config or install in one click.
https://infercpi.com/mcpclaude mcp add --transport http com-infercpi-api https://infercpi.com/mcp{"mcpServers":{"com-infercpi-api":{"type":"http","url":"https://infercpi.com/mcp"}}}Open in Cursor{"servers":{"com-infercpi-api":{"type":"http","url":"https://infercpi.com/mcp"}}}Open in VS Code{"mcpServers":{"com-infercpi-api":{"type":"http","url":"https://infercpi.com/mcp"}}}{"mcpServers":{"com-infercpi-api":{"serverUrl":"https://infercpi.com/mcp"}}}Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.
Tools
Details
From the project READMEInferCPI API
InferCPI tracks what AI inference costs: list prices, what buyers actually pay, the cost of a fixed level of capability, open vs closed models, third-party hosts, self-hosting, and cost per completed task. Site: https://infercpi.com.
This repo holds the public API docs, examples and the MCP server. The data is free, needs no key, and is licensed CC BY 4.0: cite as InferCPI, infercpi.com.
API
Static JSON at https://infercpi.com/v1/. Full reference: https://infercpi.com/api.html.
| File | What |
|---|---|
latest.json | Last value of every series, plus the weekly editorial note |
index.json | Catalogue of every series: point count, dates, method string, URL |
series/<signal>/<key>.json | Full history: points: [[unix_ts, value], ...] and method |
basket.json | Every model priced this week: input, output and blended $/1M, context, Epoch ECI, open or closed |
events.json | Launches, price cuts, increases and removals since Sep 2023 |
speed.json | Our daily speed run: time to first token, tokens per second |
token_mix.json | Tokens routed through OpenRouter per week, by lab and region |
capex.json | Hyperscaler capex, chip and cloud revenue by quarter (SEC filings) |
curl -s https://infercpi.com/v1/latest.json | jq '.latest["weighted_index/paid_usd_1m"]'
More in examples/.
MCP server
mcp_server.py gives agents ten read-only tools over the API: index_latest, index_series, index_catalogue, basket, model_price, events, speed, open_vs_closed, self_hosting, cost_per_task.
Hosted, no key: https://infercpi.com/mcp (streamable HTTP).
claude mcp add --transport http infercpi https://infercpi.com/mcp # Claude Code
Claude.ai and Claude Desktop: Settings → Connectors → Add custom connector, paste the URL.
Or run it yourself:
mkdir -p ~/.local/share/infercpi
curl -so ~/.local/share/infercpi/mcp_server.py https://raw.githubusercontent.com/Infer-CPI/api/main/mcp_server.py
pip install mcp # mcp 1.x or 2.x both work
claude mcp add infercpi -s user -- python3 ~/.local/share/infercpi/mcp_server.py # Claude Code
python3 ~/.local/share/infercpi/mcp_server.py --http # or: streamable HTTP on :8765
Claude Desktop (claude_desktop_config.json):
{ "mcpServers": { "infercpi": { "command": "python3", "args": ["/home/YOU/.local/share/infercpi/mcp_server.py"] } } }
It reads https://infercpi.com by default; set INFERCPI_BASE to point elsewhere.
Method and sources
How every series is built: https://infercpi.com/methodology.html. Inputs: LiteLLM and pydantic/genai-prices (MIT), Epoch AI Capabilities Index (CC BY 4.0), OpenRouter rankings (CC BY 4.0), SEC filings (public domain). Speed and cost per task are our own measurements.
Licence
Code in this repo: MIT. Index data: CC BY 4.0. Questions, corrections or a series you need: open an issue.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.