MCP server: token cost math for LLM API calls, 69 models across 17 providers, prices verified by ComparEdge
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add comparedge-llm-cost -- npx -y @comparedge/llm-cost-mcp~/.codex/config.toml
[mcp_servers.comparedge-llm-cost]
command = "npx"
args = ["-y", "@comparedge/llm-cost-mcp"]
# codex mcp add comparedge-llm-cost -- npx -y @comparedge/llm-cost-mcp~/.cursor/mcp.json
{
"mcpServers": {
"comparedge-llm-cost": {
"command": "npx",
"args": [
"-y",
"@comparedge/llm-cost-mcp"
]
}
}
}.vscode/mcp.json
{
"servers": {
"comparedge-llm-cost": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@comparedge/llm-cost-mcp"
]
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"comparedge-llm-cost": {
"command": "npx",
"args": [
"-y",
"@comparedge/llm-cost-mcp"
]
}
}
}claude_desktop_config.json
{
"mcpServers": {
"comparedge-llm-cost": {
"command": "npx",
"args": [
"-y",
"@comparedge/llm-cost-mcp"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"comparedge-llm-cost": {
"command": "npx",
"args": [
"-y",
"@comparedge/llm-cost-mcp"
]
}
}
}