Skip to main content
Glama
princeruhulofficial

mcp-agent-cost-optimizer

mcp-agent-cost-optimizer

Exact LLM & AI Agent Cost Calculator + ROI Optimizer (Model Context Protocol server)

Give your AI agents (and yourself) high-precision financial math for token costs, multi-step agent runs, model comparisons, and ROI versus human labor. Pure computation — $0 running cost.

Available on MCPize

Why this exists

Entrepreneurs and AI builders waste time and money because:

  • Spreadsheets break on multi-step agent costs (retries, tool calls, context).

  • LLMs give approximate / wrong money numbers.

  • Hard to quickly compare "Claude vs GPT-4o vs Gemini for my agent fleet".

This MCP server solves it with deterministic, auditable decimal math.

Related MCP server: ohmytoken

Tools

Tool

What it does

calculate_token_cost

Exact $ for input + output tokens on any model (or custom prices)

estimate_agent_run_cost

Full agent workflow cost including steps + retry overhead

compare_models

Rank models by cost for the same workload

calculate_agent_roi

Monthly/annual savings & ROI of agent vs human

list_supported_models

See built-in pricing table

Quick start (local)

# Install
pip install -e .

# Run
python -m src.server
# or
mcp-agent-cost-optimizer

Add to Claude Desktop / Cursor / any MCP client:

{
  "mcpServers": {
    "agent-cost-optimizer": {
      "command": "python",
      "args": ["-m", "src.server"],
      "cwd": "/path/to/mcp-agent-cost-optimizer"
    }
  }
}

Example usage from an agent

"Estimate the cost of running a 5-step research agent 500 times a day on Claude 4 Sonnet with 15% retry rate, then compare vs GPT-4o-mini and tell me the ROI if a human analyst costs $60/hour and takes 20 minutes."

The agent will call the tools and return exact numbers with formulas.

Pricing (MCPize)

  • Free: 50 calls/day — enough to try

  • Pro: $19/mo — 500 calls/day + full tools

  • Team: $49/mo — higher limits

Zero external API cost → excellent margins.

Built by

Prince Ruhul (princeruhulofficial) — Founder of Prevalid.
Daily AI Project Builder pipeline.

License

MIT

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides 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.
    1
  • F
    license
    A
    quality
    D
    maintenance
    Enables AI agents to compare AI model pricing plans, run cost scenarios, find break-even points, and get plan recommendations using TokenLens data.
    4

Latest Blog Posts

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/princeruhulofficial/mcp-agent-cost-optimizer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server