npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@compute-finance/mcp

v0.3.0

Published

Live AI compute pricing oracle MCP server — real-time LLM model prices across providers. Includes Claude Code skills for session cost analysis.

Readme

@compute-finance/mcp

npm version npm downloads license

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 setup

This single command:

  1. Registers the MCP server at user scope (claude mcp add)
  2. Installs Claude Code skills (/cf-session-management, /cf-session-consumption, /cf-active-sessions)
  3. Installs the cost hook — a UserPromptSubmit hook 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/mcp

Cursor / 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 . setup

Tools

14 tools across five layers — no API key required. All tools are read-only.

Data (live oracle)

| Tool | Description | |------|-------------| | data_get_basket | All models with provider, tier, USD prices per million tokens, cache multipliers | | data_get_price | Price for a single model (e.g. claude-opus-4.7) | | data_get_scu | Current Standard Compute Unit — the market benchmark price | | data_get_cpi | Full Compute Price Index — basket with SCU breakdown, version, raw/marked-up prices | | data_get_tiers | Tier weights (frontier, standard, lightweight) and per-tier averages | | data_get_reconstitutions | Historical basket changes — model swaps, SCU before/after |

Compute

| Tool | Description | |------|-------------| | compute_estimate | Nominal USD cost for a model given input/output token counts | | compute_compare | Rank all basket models by cost for a workload, grouped by tier |

Render (Claude Code skills)

| Tool | Description | |------|-------------| | render_session_report | Pre-formatted session cost report — used by /cf-session-management | | render_consumption_report | Pre-formatted per-inference breakdown — used by /cf-session-consumption | | render_active_sessions | Overview of recent sessions across projects — used by /cf-active-sessions |

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 | |------|-------------| | analyze_session | Raw JSON session analysis (for custom UI, not skills) | | analyze_inferences | Raw JSON per-inference breakdown (for custom UI, not skills) |

History

| Tool | Description | |------|-------------| | telemetry_get_history | 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