AgentCost MCP Server

AgentCost MCP Server

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.

Category
Visit Server

README

šŸ¤– AgentCost MCP Server

Cost awareness for AI agents. Know what you're spending before the invoice shows up.

An MCP (Model Context Protocol) server that gives any AI agent real-time access to model pricing, cost estimation, budget checking, and model comparison. Built by an agent, for agents.

Why?

AI agents are flying blind on costs. They pick models without knowing the price, run tasks without budget awareness, and generate surprise bills. AgentCost fixes this by giving agents the tools to understand and optimize their own spending.

Tools

Tool Description
estimate_cost Estimate cost for a model + token count before making the call
compare_models Compare costs across models, get cheapest/best-value/best-quality picks
check_budget Check if usage fits a daily budget, get smart switch suggestions
find_cheapest Find cheapest model for a task (coding, reasoning, writing, etc.)
list_models Browse all 20+ models across 7 providers with pricing
get_model Deep-dive on a specific model with reference costs

Quick Start

Install

npm install -g agentcost-mcp

Use with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "agentcost": {
      "command": "agentcost-mcp"
    }
  }
}

Use with any MCP client

agentcost-mcp  # Runs on stdio

Example: Agent Self-Optimization

An agent can call these tools to make smarter decisions:

Agent: "I need to process 50 customer emails. Let me check the cost first."

→ estimate_cost(model_id="anthropic/claude-sonnet-4", input_tokens=2000, output_tokens=500)
→ Result: $0.0135 per email, $0.675 total

Agent: "That's reasonable. But let me see if there's something cheaper..."

→ compare_models(input_tokens=2000, output_tokens=500, task="classification", min_quality=70)
→ Recommendation: "GPT-4.1 Nano ($0.0006/email) for classification. 98% cheaper."

Agent: "Perfect. I'll use Nano for classification, Sonnet for the complex replies."

Models Covered (March 2026)

  • Anthropic: Claude Opus 4, Sonnet 4, Haiku 3.5
  • OpenAI: GPT-5.2, GPT-5.2 Codex, GPT-4.1, GPT-4.1 Mini/Nano, o3, o4-mini
  • Google: Gemini 2.5 Pro, Gemini 2.5 Flash, Gemini 3 Pro (Preview)
  • DeepSeek: V3, R1
  • xAI: Grok 4
  • Mistral: Mistral Large, Codestral

Prices updated from official provider pages. Open an issue if something's outdated.

Agent Labs

Built by Agent Labs — tools built BY agents, FOR agents.

Part of the Powered By Piland portfolio. Because agents deserve infrastructure too.

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured