Skip to main content
Glama
ankit-aglawe

tokencost-mcp-server

by ankit-aglawe

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
tokencost_get_model_pricing

Get pricing details for a specific LLM model.

Args:

  • model (string): Model ID or name to look up (e.g., "gpt-5", "claude-sonnet-4.6", "gemini-3-pro")

Returns: Model pricing details including input/output costs per 1M tokens, context window, and max output. Returns an error message if the model is not found, with suggestions for similar models.

Examples:

  • "gpt-5" → GPT-5 pricing from OpenAI

  • "claude-opus-4.6" → Claude Opus 4.6 pricing from Anthropic

  • "gemini" → First matching Gemini model

tokencost_compare_models

Compare pricing across multiple LLM models side by side.

Args:

  • models (string[]): Array of model IDs or names to compare (2-10 models)

Returns: Side-by-side comparison table with input/output costs, context windows, and relative cost differences.

Examples:

  • ["gpt-5", "claude-sonnet-4.6"] → Compare OpenAI vs Anthropic pricing

  • ["gpt-5-mini", "gemini-3-flash", "claude-haiku-4.5"] → Compare budget models

tokencost_estimate_cost

Calculate the cost for a specific number of input and output tokens with a given model.

Args:

  • model (string): Model ID or name

  • input_tokens (number): Number of input tokens (0 to 100B)

  • output_tokens (number): Number of output tokens (0 to 100B)

Returns: Cost breakdown with input cost, output cost, and total cost in USD.

Examples:

  • model="gpt-5", input_tokens=1000, output_tokens=500 → Cost for a typical API call

  • model="claude-sonnet-4.6", input_tokens=100000, output_tokens=4000 → Cost for a long context call

tokencost_find_cheapest

Find the cheapest LLM models, optionally filtered by provider or minimum context window.

Args:

  • provider (string, optional): Filter by provider (e.g., "OpenAI", "Anthropic", "Google")

  • min_context (number, optional): Minimum context window size in tokens

  • sort_by (string, optional): Sort by "input", "output", or "combined" cost (default: "combined")

  • limit (number, optional): Number of results to return (default: 10, max: 30)

Returns: Ranked list of cheapest models with pricing details.

Examples:

  • {} → Top 10 cheapest models overall

  • { provider: "OpenAI" } → Cheapest OpenAI models

  • { min_context: 200000, sort_by: "input" } → Cheapest 200K+ context models by input price

tokencost_list_models

List all available LLM models with pricing data, optionally filtered by provider.

Args:

  • provider (string, optional): Filter by provider (e.g., "OpenAI", "Anthropic", "Google")

Returns: List of all models with IDs, names, and providers. Use model IDs with other tools.

Examples:

  • {} → All 60+ models

  • { provider: "Anthropic" } → All Anthropic Claude models

tokencost_list_providers

List all LLM providers with model counts and pricing ranges.

Returns: All providers with the number of models and pricing range for each.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/ankit-aglawe/tokencost-mcp-server'

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