{"_id":"ai-cost-analyzer","_rev":"11-292cbf293da8fbf9a315792737619f6c","name":"ai-cost-analyzer","dist-tags":{"latest":"1.1.4"},"versions":{"1.1.1":{"name":"ai-cost-analyzer","version":"1.1.1","keywords":["mcp","ai","cost","analyzer","llm","tokens","optimization","claude","openai","gemini"],"license":"MIT","_id":"ai-cost-analyzer@1.1.1","maintainers":[{"name":"aivp","email":"wasuppeople3@gmail.com"}],"bin":{"ai-cost-analyzer":"dist/index.js"},"dist":{"shasum":"b04f0db4dc318e5b9a09da4a1d267834bbe38064","tarball":"https://registry.npmjs.org/ai-cost-analyzer/-/ai-cost-analyzer-1.1.1.tgz","fileCount":26,"integrity":"sha512-z9nVDpDoKKrab+Czk0WetUqNn7KHf8BlUGkvZku0eGoIou3tzhKEdH3ufZClO+4Zge9zqODCm4/XtRNnWfsJMw==","signatures":[{"sig":"MEQCIAOKw8Wmh7mcgQQvkgaCWi6prJEteL8R+qZE21Hnz96OAiBw7JB/Gl+nMm37/1EpfEOSMO8Mo2HtE2RfoACILty2XA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":80001},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"4c2db3d7214a1ecbb45e5c3d246105a0288cd2ea","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","start:sse":"node dist/index.js --sse","prepublishOnly":"npm run build"},"_npmUser":{"name":"aivp","email":"wasuppeople3@gmail.com"},"_npmVersion":"11.11.0","description":"MCP server that helps developers understand and reduce their AI API costs through usage analysis, savings estimation, prompt optimization, and model comparison.","directories":{},"_nodeVersion":"24.14.1","dependencies":{"zod":"^3.25.0","@modelcontextprotocol/sdk":"^1.12.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ai-cost-analyzer_1.1.1_1774963700790_0.5514282648399507","host":"s3://npm-registry-packages-npm-production"}},"1.1.3":{"name":"ai-cost-analyzer","version":"1.1.3","keywords":["mcp","ai","cost","analyzer","llm","tokens","optimization","claude","openai","gemini"],"license":"MIT","_id":"ai-cost-analyzer@1.1.3","maintainers":[{"name":"aivp","email":"wasuppeople3@gmail.com"}],"bin":{"ai-cost-analyzer":"dist/index.js"},"dist":{"shasum":"05f4454c598b1ca810eb01478d989032473c0ff2","tarball":"https://registry.npmjs.org/ai-cost-analyzer/-/ai-cost-analyzer-1.1.3.tgz","fileCount":18,"integrity":"sha512-ovEMAnN21eebgkKrwC4G6xn4cqMRI3LjNhRaYKe4cRreEueRkhoyg0TBGtU/wLQHwIWGdnVH6O0FcN6/7q6CYQ==","signatures":[{"sig":"MEUCIQD6WCFkAxOyC+P9ibFEfJtdm2bfn7eulpeqTZk9WA0PhgIgSjrIrT/OAhsApvGFF14aea8fUNQt0oh8Ku21nLi3bwg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":74324},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"90f4c3072f2309527d7163ea89461f69604894e2","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","start:sse":"node dist/index.js --sse","prepublishOnly":"npm run build"},"_npmUser":{"name":"aivp","email":"wasuppeople3@gmail.com"},"_npmVersion":"11.11.0","description":"MCP server that helps developers understand and reduce their AI API costs through usage analysis, savings estimation, prompt optimization, and model comparison.","directories":{},"_nodeVersion":"24.14.1","dependencies":{"zod":"^3.25.0","@modelcontextprotocol/sdk":"^1.12.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ai-cost-analyzer_1.1.3_1775025169400_0.52613104353909","host":"s3://npm-registry-packages-npm-production"}},"1.1.4":{"name":"ai-cost-analyzer","version":"1.1.4","description":"MCP server that helps developers understand and reduce their AI API costs through usage analysis, savings estimation, prompt optimization, and model comparison.","mcpName":"io.github.vpatser1/ai-cost-analyzer","repository":{"type":"git","url":"git+https://github.com/vpatser1/mcp-servers.git","directory":"ai-cost-analyzer"},"homepage":"https://aivp-mcp.vercel.app","type":"module","main":"dist/index.js","bin":{"ai-cost-analyzer":"dist/index.js"},"scripts":{"build":"tsc","start":"node dist/index.js","start:sse":"node dist/index.js --sse","dev":"tsc --watch","prepublishOnly":"npm run build"},"keywords":["mcp","ai","cost","analyzer","llm","tokens","optimization","claude","openai","gemini"],"license":"MIT","dependencies":{"@modelcontextprotocol/sdk":"^1.12.0","zod":"^3.25.0"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^5.7.0"},"engines":{"node":">=18.0.0"},"gitHead":"31655a90ad0cac3d56211a1e7a88dccaaef73640","types":"./dist/index.d.ts","_id":"ai-cost-analyzer@1.1.4","bugs":{"url":"https://github.com/vpatser1/mcp-servers/issues"},"_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-DNSV2FqbJ9zpaX1vfBQ7ctFLd0g1IsmZLuTAWWekTnMrb4cr0LjEehIJD0pvuZz7ewYjpnT7/YaVyKObWVXe0A==","shasum":"2b243d27652274daf82f90e753ebeefa4086c41e","tarball":"https://registry.npmjs.org/ai-cost-analyzer/-/ai-cost-analyzer-1.1.4.tgz","fileCount":18,"unpackedSize":81789,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIC/DPu5L3Rg6kCeRFFIP7TP8zQWUgTM0f7CgxHpiM5axAiBj7u1L8o6qMQvAS3oKv5mbKZztwdsu8vIcLV4oteip3g=="}]},"_npmUser":{"name":"aivp","email":"wasuppeople3@gmail.com"},"directories":{},"maintainers":[{"name":"aivp","email":"wasuppeople3@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ai-cost-analyzer_1.1.4_1785828904256_0.9053869948545188"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-31T11:23:32.806Z","modified":"2026-08-04T07:35:04.563Z","1.0.0":"2026-03-31T11:23:33.075Z","1.0.1":"2026-03-31T12:41:27.680Z","1.1.0":"2026-03-31T12:58:52.043Z","1.1.1":"2026-03-31T13:28:20.930Z","1.1.2":"2026-04-01T06:26:28.714Z","1.1.3":"2026-04-01T06:32:49.566Z","1.1.4":"2026-08-04T07:35:04.411Z"},"license":"MIT","keywords":["mcp","ai","cost","analyzer","llm","tokens","optimization","claude","openai","gemini"],"description":"MCP server that helps developers understand and reduce their AI API costs through usage analysis, savings estimation, prompt optimization, and model comparison.","maintainers":[{"name":"aivp","email":"wasuppeople3@gmail.com"}],"readme":"# AI Cost Analyzer\n\nAn MCP (Model Context Protocol) server that helps developers understand and reduce their AI API costs. Stop wasting 30-40% of your token budget on unused tool definitions, redundant context, and cache misses.\n\n## Features\n\n- **Usage Analysis** -- Break down API costs by model, detect token waste, and track spending trends\n- **Savings Estimation** -- Get dollar-amount projections for prompt caching, model routing, and context pruning\n- **Prompt Optimization** -- Automatically detect and remove redundant content, verbose phrasing, and duplicate instructions\n- **Model Comparison** -- Compare cost/quality tradeoffs across Claude, GPT-4o, and Gemini for any task\n- **Live Pricing** -- Current pricing data for all major LLM APIs in one place\n\n## Pricing\n\n| Plan | Price | | \n|------|-------|---|\n| **Free trial** | $0 | 3 calls total (shared across all tools), no credit card — just run it |\n| **Indie** | $29/mo | [Buy →](https://buy.stripe.com/dRmdR18am5I8drl0h1gIo00) |\n| **Team** | $99/mo | [Buy →](https://buy.stripe.com/aFa00beyKgmMcnh2p9gIo01) |\n| **Enterprise** | $299/mo | [Buy →](https://buy.stripe.com/14A00b4Yab2sdrl8NxgIo02) |\n\nLicense keys are emailed instantly after checkout. Activate via the `LICENSE_KEY` environment variable. More info: [aivp-mcp.vercel.app](https://aivp-mcp.vercel.app)\n\n## Installation\n\nNo install step needed — run straight from npm:\n\n```bash\nnpx -y ai-cost-analyzer\n```\n\nOr install globally:\n\n```bash\nnpm install -g ai-cost-analyzer\n```\n\n### Configure with Claude Desktop\n\nAdd to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"ai-cost-analyzer\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"ai-cost-analyzer\"],\n      \"env\": { \"LICENSE_KEY\": \"<your license key — omit for free trial>\" }\n    }\n  }\n}\n```\n\n### Configure with Claude Code\n\n```bash\nclaude mcp add ai-cost-analyzer -- npx -y ai-cost-analyzer\n```\n\n### Run with SSE transport\n\n```bash\n# Start the SSE server (default port 3000)\nnpx -y ai-cost-analyzer --sse\n\n# Or specify a custom port\nPORT=8080 npx -y ai-cost-analyzer --sse\n```\n\n## Tools\n\n### `analyze_usage`\n\nAccepts API usage data and returns detailed cost analysis.\n\n**Input:**\n```json\n{\n  \"usage_data\": [\n    {\n      \"model\": \"claude-sonnet\",\n      \"input_tokens\": 15000,\n      \"output_tokens\": 3000,\n      \"cached_tokens\": 5000,\n      \"timestamp\": \"2026-03-15T10:30:00Z\",\n      \"tool_definitions\": 12,\n      \"system_prompt_tokens\": 3500\n    },\n    {\n      \"model\": \"claude-opus\",\n      \"input_tokens\": 8000,\n      \"output_tokens\": 4000,\n      \"timestamp\": \"2026-03-15T11:00:00Z\"\n    }\n  ]\n}\n```\n\n**Output includes:**\n- Total cost breakdown by model\n- Average cost per request\n- Token waste estimation (unused tool definitions, oversized system prompts)\n- Daily and weekly trend analysis\n\n---\n\n### `estimate_savings`\n\nEstimates monthly savings from optimization strategies.\n\n**Input:**\n```json\n{\n  \"usage_data\": [\n    {\n      \"model\": \"claude-sonnet\",\n      \"input_tokens\": 12000,\n      \"output_tokens\": 2500,\n      \"cached_tokens\": 0,\n      \"timestamp\": \"2026-03-15T10:00:00Z\",\n      \"tool_definitions\": 15\n    }\n  ],\n  \"monthly_multiplier\": 30\n}\n```\n\n**Output includes:**\n- Current vs. optimized monthly cost\n- Savings from prompt caching (up to 90% on cached tokens)\n- Savings from model routing (use cheaper models for simple tasks)\n- Savings from context pruning (remove unused tool definitions)\n- Actionable recommendations\n\n---\n\n### `optimize_prompt`\n\nAnalyzes and optimizes a system prompt and tool definitions.\n\n**Input:**\n```json\n{\n  \"system_prompt\": \"You are a helpful assistant. Please make sure to always respond in a professional manner. It is important to note that you should be concise. You are a helpful assistant that responds professionally.\",\n  \"tool_definitions\": [\n    \"{\\\"name\\\": \\\"search\\\", \\\"description\\\": \\\"Search the web for information\\\"}\",\n    \"{\\\"name\\\": \\\"calculator\\\", \\\"description\\\": \\\"Perform mathematical calculations\\\"}\"\n  ],\n  \"requests_per_month\": 50000,\n  \"model\": \"claude-sonnet\"\n}\n```\n\n**Output includes:**\n- Token count before and after optimization\n- Optimized system prompt with redundant content removed\n- Estimated monthly cost reduction\n- Specific recommendations (enable caching, split tool groups, etc.)\n\n---\n\n### `compare_models`\n\nCompares models for a given task with cost/quality tradeoff analysis.\n\n**Input:**\n```json\n{\n  \"task_description\": \"Classify customer support tickets into categories\",\n  \"estimated_input_tokens\": 800,\n  \"estimated_output_tokens\": 50\n}\n```\n\n**Output includes:**\n- Cost per request for each model\n- Cost per 1,000 requests\n- Monthly projection at 10K requests\n- Quality tier classification\n- Task-specific model recommendation\n\n---\n\n### `get_pricing`\n\nReturns current LLM API pricing. No input required.\n\n**Output includes:**\n\n| Model | Input/1M | Output/1M | Cached Input/1M |\n|-------|----------|-----------|-----------------|\n| Claude Opus | $15.00 | $75.00 | $1.50 |\n| Claude Sonnet | $3.00 | $15.00 | $0.30 |\n| Claude Haiku | $0.25 | $1.25 | $0.025 |\n| GPT-4o | $2.50 | $10.00 | $1.25 |\n| GPT-4o Mini | $0.15 | $0.60 | $0.075 |\n| Gemini 2.0 Flash | $0.10 | $0.40 | $0.025 |\n\n## Pricing\n\n| Plan | Price | Includes |\n|------|-------|----------|\n| **Indie** | $29/month | 1 seat, all tools, email support |\n| **Team** | $99/month | 5 seats, all tools, priority support, shared dashboards |\n| **Enterprise** | $299/month | Unlimited seats, all tools, dedicated support, SSO, custom integrations |\n\nAll plans include unlimited tool calls and full access to pricing data updates.\n\n## Development\n\n```bash\n# Watch mode for development\nnpm run dev\n\n# Build for production\nnpm run build\n\n# Run with stdio transport\nnpm start\n\n# Run with SSE transport\nnpm run start:sse\n```\n\n## Architecture\n\n```\nsrc/\n  index.ts              Main server entry point, tool registration, transport setup\n  types.ts              Shared TypeScript types and interfaces\n  tools/\n    analyze.ts          analyze_usage: cost breakdown, waste detection, trends\n    savings.ts          estimate_savings: caching, routing, pruning projections\n    optimize.ts         optimize_prompt: prompt analysis and optimization\n    compare.ts          compare_models: cross-model cost/quality comparison\n    pricing.ts          get_pricing: pricing data and cost computation helpers\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","homepage":"https://aivp-mcp.vercel.app","repository":{"type":"git","url":"git+https://github.com/vpatser1/mcp-servers.git","directory":"ai-cost-analyzer"},"bugs":{"url":"https://github.com/vpatser1/mcp-servers/issues"}}