Portkey is an excellent AI gateway — it sits in front of OpenAI / Anthropic / 200+ providers and adds smart caching, retry, model fallback, and guardrails. It tracks every LLM request that flows through it. MCPSpend operates at a different layer: it sees every MCP tool call your agent makes — including agents in closed IDEs (Cursor, Claude Desktop) where you can't route SDK traffic through a gateway.
| Dimension | MCPSpend | Portkey |
|---|---|---|
| Product category | AI cost observability (MCP-native) | AI gateway: smart routing, caching, fallback, guardrails in front of LLM providers |
| Primary unit tracked | MCP tool call (server + tool + cost + latency) | LLM request through the gateway |
| Install path | One CLI command — auto-detects Cursor, Claude Desktop, Windsurf, VS Code, Claude Code | Change SDK BASE_URL to Portkey gateway, add API key header — code change required |
| MCP tool call visibility | Native — every tool call decoded automatically | Not native — your code has to send the events; tools that bypass the gateway are invisible |
| Per-MCP-server cost breakdown | Built-in | Not modelled — you build it with custom metadata |
| Works in closed IDEs (Cursor, Claude Desktop) | Yes — config-only wrap, no code change | No — you cannot intercept the SDK call inside the IDE |
| Dollar budget + alerts | $ budget at 50/80/100% via email + Slack | Budget alerts on LLM spend, configurable per workspace |
| Caching / routing / fallback between models | Not in scope | Core feature — semantic caching, retry policies, model fallback |
| Self-hosted core | Proxy + MCP server MIT on npm | Open-source gateway available; managed cloud is the default |
| Free tier | 25,000 tool calls / month forever | Free tier with capped requests, then usage-based |
| Paid entry point | $29 / month (Pro) | Usage-based after free tier |
They're complementary.
Portkey is great for the LLM-request layer. MCPSpend covers the MCP tool layer underneath. Teams that run both get a complete picture of where their AI dollars go.