プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。レビューとアカウント機能は今後のステップで始まります。
PopNx MCPAIを使う人のためのMCPサーバー · やさしい言葉で解説

Agent Cost MCP Server

作者:karmendra8386バージョン 0.1.1i★ –iパソコンで動く
レジストリ名io.github.karmendra8386/agent-cost-mcp-server

インストール

概要

作者による説明(英語の原文)

Prices LLM/agent runs per successful task, with spend recording and budget status.

PopNx MCPの3つの柱

この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。

できること

このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。

  • 接続方法: パソコンで動く
  • トランスポート: stdio
  • カテゴリ: 会計・財務・税務

インストール

使っているAIアプリを選んで、設定をコピーしてください。

インストールの前に

  • 基本チェック:1項目中1項目に合格
  • あなたのパソコンで、あなたのユーザーと同じ権限(ファイル、ネットワーク、アプリ)で動きます。
  • 自分で入力するもの: AGENT_COST_LEDGER_PATH

必要なもの

  • PyPIPythonのuvのインストール(uvxコマンドに必要)

どのアプリを使っていますか?

上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。

Claude Desktop → Settings → Developer → Edit Config を開き、claude_desktop_config.json にこれを貼り付けます

{
  "mcpServers": {
    "agent-cost": {
      "command": "uvx",
      "args": [
        "agent-cost-mcp-server"
      ],
      "env": {
        "AGENT_COST_LEDGER_PATH": "your-value"
      }
    }
  }
}

ターミナルでこれを実行します

claude mcp add agent-cost --env AGENT_COST_LEDGER_PATH=your-value -- uvx agent-cost-mcp-server

動かす前に、空欄の値を入力してください。

Cursorで開く

または、設定を自分でコピーする

プロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます

{
  "mcpServers": {
    "agent-cost": {
      "command": "uvx",
      "args": [
        "agent-cost-mcp-server"
      ],
      "env": {
        "AGENT_COST_LEDGER_PATH": "your-value"
      }
    }
  }
}

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

VS Codeで開く

または、設定を自分でコピーする

プロジェクトの .vscode/mcp.json に貼り付けます

{
  "servers": {
    "agent-cost": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "agent-cost-mcp-server"
      ],
      "env": {
        "AGENT_COST_LEDGER_PATH": "your-value"
      }
    }
  }
}

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

これはパソコンで動くサーバーですが、ChatGPTがつなげるのはインターネット上のサーバーだけです。ほかのアプリを選んでください。

選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。

自分で入力する値

  • AGENT_COST_LEDGER_PATH env
    Optional path for the local spend-ledger file used by record_spend / budget_status.

この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。

できること

パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。

基本チェックi

誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月8日にチェック

  • ✓ 合格

    作者とリポジトリが一致

    レジストリ名は、リポジトリを所有するGitHubアカウント karmendra8386 で確認済みです

  • … 未チェック

    今もメンテナンスされている

    このリポジトリはまだGitHubから読み取っていません

  • … 未チェック

    ライセンスがある

    このリポジトリはまだGitHubから読み取っていません

  • – 対象外

    エンドポイントが応答する

    これはパソコンで動くため、インターネット上のエンドポイントはありません

  • – 対象外

    OAuthでサインイン

    パソコンで動き、代わりにローカルの設定を使います

  • … 未チェック

    ツールの説明に隠れた指示がない

    パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです

会計・財務・税務のほかのサーバーとの比較i

  • このカテゴリのほかの2908件のうち0%よりスターが多い
  • このカテゴリのほかの2908件のうち85%より最近レジストリに公開
  • 基本チェックの結果が、このカテゴリのほかの2908件のうち100%と同じかそれ以上

レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。

よくある質問

Agent Cost MCP Serverは安全ですか?

当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。

どんなキーやコードが必要ですか?

レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。

パソコンで動きますか、それともクラウドですか?

あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。

今もメンテナンスされていますか?

GitHubリポジトリの最終更新は–、最新バージョン(0.1.1)がレジストリに届いたのは5 日前です。

どのアプリで使えますか?

Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにPython (uv)も必要です。

代わりに使えるものは?

同じカテゴリには:Finance Toolkit, SolidInvoice, Korea Tax Calculator

代わりの候補

同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。

カードの見方:★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i

Finance Toolkit

作者:JerBouma

500+ transparent financial methods calculated from raw statements, not third-party endpoints.

パソコンでもクラウドでも★ 5,496MIT昨日更新
インストール

SolidInvoice

作者:SolidInvoice

Create and send invoices and quotes, manage clients, and track payments in SolidInvoice.

クラウドで動く★ 981MIT8 日前更新
インストール

作者のREADME

READMEを開く

作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。

Agent Cost MCP Server

An MCP server that gives agents and developers tools to estimate, budget, and compare the cost of LLM work before and during a run — the model-spend counterpart to AWS infrastructure cost tooling.

Agent frameworks decide for themselves how many model calls a task takes, so the cost of a run is usually only visible after the bill arrives. This server answers, from inside your tooling:

  • *What will this task cost on model A vs model B?*
  • *Which model is cheapest per successful task, not per token?*
  • *Has this run already burned its budget?*

The server is self-contained: a maintained pricing snapshot ships with it, no AWS account or API key is needed, all state is a local JSON ledger, and it makes no network calls at runtime.

Tools

ToolArgumentsReturns
price_usagemodel_id, input_tokens, output_tokensInput/output/total cost in USD for one concrete usage record
estimate_run_costmodel_id, input_tokens, output_tokensThe model's cost for one run, plus the same workload priced on every other model, cheapest first
compare_models_for_taskinput_tokens, output_tokens, success_rates?All models ranked by expected cost per successful task (cost per attempt ÷ success rate)
record_spendtask_id, model_id, input_tokens, output_tokensThe recorded ledger entry, priced at list rates
budget_statustask_id, budget_usd{spent_usd, remaining_usd, over_budget, calls, models_used, by_model} for the task. by_model maps each model_id to {calls, input_tokens, output_tokens, spent_usd}

Cost per token is the wrong ranking for agent work: a cheap model that fails half its tasks costs more per success than a pricier, reliable one. Pass measured success rates to compare_models_for_task if you have them; models without a supplied rate are ranked on raw cost.

This server supplies the numbers. *Enforcing* a budget (stopping a run) belongs to the agent framework — see BudgetedModel in strands-agents/samples for that pattern.

Installation

The server is published on PyPI (current release 0.1.1) and listed on the Official MCP Registry as io.github.karmendra8386/agent-cost-mcp-server. Requires Python 3.10+; the uvx path needs uv.

Claude Code
claude mcp add agent-cost -- uvx agent-cost-mcp-server
Claude Desktop and Cursor

Add to the client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json):

{

"mcpServers": { "agent-cost": { "command": "uvx", "args": [ "agent-cost-mcp-server" ] } } }

VS Code

Add to .vscode/mcp.json (VS Code uses a servers key):

{

"servers": { "agent-cost": { "type": "stdio", "command": "uvx", "args": [ "agent-cost-mcp-server" ] } } }

pip
pip install agent-cost-mcp-server

agent-cost-mcp-server # serves over stdio

From source (GitHub)

If you need the unreleased tip of master rather than the PyPI release:

pip install git+https://github.com/karmendra8386/agent-cost-mcp-server

agent-cost-mcp-server # serves over stdio

Example: what a tool call returns

compare_models_for_task for one attempt at a task using 10,000 input and 2,000 output tokens, with example success rates supplied for a few models (substitute your own measured rates; models without a supplied rate are ranked on raw cost):

{

"input_tokens": 10000, "output_tokens": 2000, "success_rates": { "amazon.nova-micro": 0.2, "amazon.nova-lite": 0.6, "openai.gpt-5-nano": 0.4, "openai.gpt-4o-mini": 0.9, "anthropic.claude-haiku-3-5": 0.85, "anthropic.claude-sonnet-4-5": 0.95 } }

Response, captured from a live run of the server (pricing snapshot v1, 2026-10-20; first 5 of 18 ranked models):

{

"input_tokens": 10000, "output_tokens": 2000, "ranked": [ { "model": "amazon.nova-lite", "display_name": "Amazon Nova Lite", "cost_per_run_usd": 0.00108, "success_rate": 0.6, "cost_per_success_usd": 0.0018 }, { "model": "google.gemini-2.5-flash-lite", "display_name": "Gemini 2.5 Flash-Lite", "cost_per_run_usd": 0.0018, "success_rate": 1.0, "cost_per_success_usd": 0.0018 }, { "model": "openai.gpt-4o-mini", "display_name": "GPT-4o mini", "cost_per_run_usd": 0.0027, "success_rate": 0.9, "cost_per_success_usd": 0.003 }, { "model": "amazon.nova-micro", "display_name": "Amazon Nova Micro", "cost_per_run_usd": 0.00063, "success_rate": 0.2, "cost_per_success_usd": 0.00315 }, { "model": "openai.gpt-5-nano", "display_name": "GPT-5 nano", "cost_per_run_usd": 0.0013, "success_rate": 0.4, "cost_per_success_usd": 0.00325 } ], "pricing_snapshot": "v1 (2026-10-20)" }

Note the flip: Amazon Nova Micro is the cheapest model per run ($0.00063), but at a 20% success rate it ranks fourth per *successful* task ($0.00315 — roughly five attempts per success). Nova Lite costs 1.7× more per run and is the cheapest per success.

Pricing snapshot

Prices live in src/agent_cost_mcp_server/pricing.json — a versioned snapshot of list prices (USD per 1M tokens) for major Bedrock and OpenAI-compatible models, dated in the file. Prices change; verify against the provider's pricing page before making spending decisions. Updating the snapshot is a one-file change, and the server reads it at startup.

Ledger

record_spend appends to a local JSON ledger at ~/.agent-cost-mcp-server/ledger.json. Set AGENT_COST_LEDGER_PATH to use a different file. Nothing leaves the machine.

Background

The pricing and cost-per-success model are a port of tokenecon, an open-source library for per-task agent cost accounting (paper: doi.org/10.5281/zenodo.23195511), including a Strands integration that prices live agent runs. This server exposes the same math over MCP so any agent or IDE can call it.

Proposed for the awslabs/mcp collection in RFC #4772.

Development

uv sync --extra dev   # or: pip install -e ".[dev]"

pytest

Cite

If you use this software in your work, please cite the software itself — and, for the cost model and methods behind it, the companion preprint.

Software

@software{pandey_agent_cost_mcp_server_2026,

author = {Pandey, Karmendra}, title = {agent-cost-mcp-server}, version = {0.1.1}, doi = {10.5281/zenodo.23680824}, url = {https://github.com/karmendra8386/agent-cost-mcp-server}, date = {2026-10-26} }

Companion preprint

K. Pandey, "Token-Economics for Agentic AI: A Cost Model and Tiered Routing

Reference," Zenodo, DOI 10.5281/zenodo.23195511, Oct. 2026.

@misc{pandey_tokeneconomics_2026,

author = {Pandey, Karmendra}, title = {Token-Economics for Agentic AI: A Cost Model and Tiered Routing Reference}, doi = {10.5281/zenodo.23195511}, url = {https://zenodo.org/records/23195511}, publisher = {Zenodo}, date = {2026-10} }

A CITATION.cff is included for automated citation tooling.

License

Apache-2.0 — see LICENSE.

Copyright 2026 Karmendra Pandey.

PopNxに聞く