@compute-finance/mcp
@compute-finance/mcp is a live AI compute pricing oracle that delivers real-time LLM model prices from major providers (Anthropic, OpenAI, Google, xAI) and tools to analyze cost, compare models, and audit Claude Code sessions.
Live Pricing Data
Full model basket (
data_get_basket): all tracked models with provider, family, input/output USD prices per million tokens, and cache pricing components.Single model price (
data_get_price): lookup by canonical name (e.g.,claude-opus-4.7,gpt-5.5) for basket and catalog-only models.Full model catalog (
data_get_catalog): every tracked model including non-index entries with current prices and cache/reasoning blocks.Compute Price Index (
data_get_cpi): raw oracle response with all pricing, SCU, and basket version data.
SCU (Standard Compute Unit) & Index
Current SCU (
data_get_scu): per-family blended-cost breakdown and inversecomputeIndexpurchasing-power view.Detailed breakdown (
data_get_breakdown): per-family blended costs attributed to model families.SCU at timestamp (
data_get_scu_at): step-function point lookup without interpolation.Baseline SCU (
data_get_baseline): frozen genesis denominator for thecomputeIndex.
Historical Data
SCU time series (
data_get_history): per-revision, daily, or weekly granularity over any date range.Model price history (
data_get_model_price_history): input/output USD price series for any basket model.Model price at date (
data_get_model_price_at): effective price at a specific timestamp.Basket reconstitutions (
data_get_reconstitutions): model swaps with SCU before/after values.Methodology changelog (
data_get_methodology): every methodology version with formula, family rules, and spec links.
Cost Estimation & Comparison
Estimate cost (
compute_estimate): nominal USD cost for any tracked model given input/output token counts.Compare models (
compute_compare): ranked list of basket models by cost for a workload, grouped by family.
Claude Code Session Analysis
Session cost report (
render_session_report): formatted report with prompts, tool calls, tokens, and cost for a session.Per-inference breakdown (
render_consumption_report): bar chart and per-reply cost breakdown with cache hit ratios.Active sessions overview (
render_active_sessions): table of recent sessions with cost summaries.Raw session JSON (
analyze_session): token totals, effective/nominal cost, cache breakdown, and counterfactual costs across all basket models.Raw inference JSON (
analyze_inferences): per-inference data including tool usage, cache hit ratio, and duration.
Aggregate Telemetry
Session history stats (
telemetry_get_history): cumulative cost, per-profile medians, and cache insights across all logged sessions.
Cost Hook Integration
Automatically injects session cost summaries into Claude's context for real-time display during conversations (Claude Code specific).
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@compute-finance/mcpcompare GPT-4o and Claude 3.5 Sonnet pricing"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@compute-finance/mcp
Live AI compute pricing oracle — real-time LLM model prices across providers (Anthropic, OpenAI, Google, xAI) via the Compute Finance Oracle.
A stdio MCP server. Works in any MCP client. Includes optional Claude Code skills for session cost analysis.
Quick start
Claude Code (recommended)
npx @compute-finance/mcp setupThis single command:
Registers the MCP server at user scope (
claude mcp add)Installs Claude Code skills (
/cf-session-management,/cf-session-consumption,/cf-active-sessions)Installs the cost hook — a
UserPromptSubmithook that injects session cost into Claude's context so every response can show how much you've spent
Restart Claude Code after setup.
Or register manually without skills/hook:
claude mcp add --scope user compute-finance -- npx @compute-finance/mcpCursor / VS Code / Any MCP client
Add to your MCP config (.cursor/mcp.json, VS Code settings, etc.):
{
"mcpServers": {
"compute-finance": {
"command": "npx",
"args": ["@compute-finance/mcp"]
}
}
}From source
git clone https://github.com/compute-finance/mcp.git
cd mcp
npm install && npm run build
npx . setupRelated MCP server: volthq-mcp-server
Tools
17 tools across five layers — no API key required. All tools are read-only.
Data (live oracle)
Tool | Description |
| All models with provider, family (e.g. |
| Price for a single model (e.g. |
| Current Standard Compute Unit — value plus a methodology-versioned |
| Per-family blended-cost breakdown alone — methodology-versioned discriminated union with one entry per family representative |
| Full Compute Price Index — basket with |
| Historical basket changes — model swaps, SCU before/after |
| Methodology changelog — every version with its formula summary and spec link, plus the version in force |
| SCU index time series over a date range — |
| Per-model input/output USD price time series for a model that has appeared in the SCU basket — same granularity semantics as |
Cache pricing comes from the Compute Finance Oracle. Session and consumption reports show effective (cache-aware) cost when the oracle has published the relevant cache components; otherwise they show nominal cost (input rate applied to every input variant) and label effective as unavailable for that model.
Every price is reported on two bases: base_* is the provider list price, identical for every model the oracle tracks, and billed_* is what compute.finance charges — base × (1 + routing_fee_rate). Compare models on base_*, budget on billed_*. The rate ships once per response and billed_* is null when the oracle does not publish it. Session and consumption reports are on the base basis throughout.
Compute
Tool | Description |
| Nominal USD cost for a model given input/output token counts — |
| Rank all basket models by cost for a workload, grouped by family — the same three cost figures per row |
Render (Claude Code skills)
Tool | Description |
| Pre-formatted session cost report — used by |
| Pre-formatted per-inference breakdown — used by |
| Overview of recent sessions across projects — used by |
Reports surface three orthogonal counts: prompts (what you typed), inferences (assistant replies — tool-loop sessions produce several per prompt), and tool calls (tool_use blocks). The triplet is identical across all three reports for the same session.
Analysis
Tool | Description |
| Raw JSON session analysis (for custom UI, not skills) |
| Raw JSON per-inference breakdown (for custom UI, not skills) |
History
Tool | Description |
| Aggregate stats across logged sessions — cumulative cost, per-profile medians, insights |
Cost hook
The setup command installs a UserPromptSubmit hook into ~/.claude/settings.json. Every time you send a message, the hook reads the current session transcript, prices it against the live oracle, and injects a cost summary into Claude's context via additionalContext. Claude then appends a 💰 Compute.Finance · … line at the end of its response.
Guards — the hook fires only when all three conditions are met:
Session cost exceeds $1
Session has at least 5 user prompts
At least 10 minutes since the last fire (per session)
On any failure (oracle down, transcript missing, parse error) the hook exits silently — it never blocks your prompt.
Manual installation
If setup can't write to settings.json, add the hook manually:
{
"hooks": {
"UserPromptSubmit": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "npx @compute-finance/mcp hook-prompt"
}
]
}
]
}
}Uninstall
Remove the UserPromptSubmit entry from ~/.claude/settings.json.
Privacy
All data stays on your machine. The only network calls are unauthenticated GETs to api.compute.finance/v1/oracle/*. Session logs (~/.compute-finance/sessions.jsonl, ~/.compute-finance/inferences.jsonl) are never uploaded.
Links
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceProvides real-time AI model pricing, cost estimation, and budget management tools to help agents understand and optimize their spending. It enables agents to compare costs across multiple providers and select the most cost-effective models for specific tasks.
- Alicense-qualityDmaintenanceCompare AI inference pricing across 9 providers in real time. Routing recommendations, spend tracking, and budget alerts for AI agents.108MIT
- Flicense-qualityDmaintenanceEnables AI cost calculation, comparison, and optimization across major providers like Anthropic, OpenAI, Google, Meta, and Mistral. Supports cost estimation, budget-aware model finding, and token estimation through a simple API and MCP integration.
Related MCP Connectors
Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.
Verified cloud cost forecasting for AI agents. AWS, GCP, Azure pricing matrix.
Verified cloud cost forecasting for AI agents. AWS, GCP, Azure pricing matrix.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/compute-finance/mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server