ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที รีวิวและบัญชีผู้ใช้จะมาในขั้นถัดไป
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · อธิบายเป็นภาษาคน

Agent Cost MCP Server

โดย karmendra8386รุ่น 0.1.1i★ –iรันบนเครื่อง
ชื่อใน registryio.github.karmendra8386/agent-cost-mcp-server

ติดตั้ง

ภาพรวม

คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)

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

สามเสาของ PopNx MCP

สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน

ใช้ทำอะไรได้

ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry

  • การเชื่อมต่อ: รันบนเครื่อง
  • ช่องทาง (transport): stdio
  • หมวด: เอกสาร ตาราง และงานออฟฟิศ

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ก่อนติดตั้ง

ต้องเตรียมก่อน

  • PyPIติดตั้ง uv ของ Python (มีคำสั่ง 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": "ใส่ค่าของคุณ"
      }
    }
  }
}

พิมพ์คำสั่งนี้ใน Terminal

claude mcp add agent-cost --env AGENT_COST_LEDGER_PATH='ใส่ค่าของคุณ' -- 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": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

เปิดใน VS Code

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .vscode/mcp.json ของโปรเจกต์

{
  "servers": {
    "agent-cost": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "agent-cost-mcp-server"
      ],
      "env": {
        "AGENT_COST_LEDGER_PATH": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น

ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี

ค่าที่ต้องใส่เอง

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

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 7 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub karmendra8386 ซึ่งเป็นเจ้าของ repo

  • … ยังไม่ตรวจ

    ยังมีคนดูแล

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • … ยังไม่ตรวจ

    มีสัญญาอนุญาต (license)

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

เทียบกับตัวอื่นในหมวด เอกสาร ตาราง และงานออฟฟิศi

  • ดาวมากกว่า 0% ของอีก 2204 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 85% ของอีก 2204 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 2204 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

Agent Cost MCP Server ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.1.1) เข้า registry 4 วันที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Python (uv) ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี Agent-Native Calendar, Excel MCP Server, MCP Server for Excel

ตัวที่ใช้แทนได้

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

Agent-Native Calendar

โดย BuilderIO

Agent-Native Google Calendar - manage events, sync, and public booking

รันบนคลาวด์★ 7,620MITอัปเดต 2 เดือนที่ผ่านมา
ติดตั้ง

Excel MCP Server

โดย haris-musa

ให้ AI สร้างและแก้ไฟล์ Excel ได้เอง ทั้งสูตร กราฟ และ PivotTable โดยไม่ต้องมีโปรแกรม Excel ในเครื่อง

รันบนเครื่อง★ 4,276MITอัปเดต 7 วันที่ผ่านมา
ติดตั้ง

MCP Server for Excel

โดย sbroenne

Excel automation for AI - Sheets, Power Query, DAX, VBA, Tables, Ranges and more. Windows only.

รันบนเครื่อง★ 847MITอัปเดต 4 วันที่ผ่านมา
ติดตั้ง

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ 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