AI Gateway
The LeanMCP AI Gateway is a unified API proxy that sits between your applications and LLM providers. By routing all AI requests through the gateway, you gain complete visibility into every interaction, enabling better security, cost optimization, and debugging.
Why Use AI Gateway?
Complete Visibility
See exactly what data is being sent to AI providers from your entire codebase
Security & Privacy
Detect and block sensitive data like passwords, API keys, or personal information
Cost Optimization
Track token usage, run A/B tests, and optimize your AI spending
Drop-in Replacement
Works with existing SDKs - just change the base URL
How It Works
One simple change: Replace your AI provider’s base URL with the LeanMCP gateway URL, and you instantly get logging, security, and analytics for all your AI interactions.Supported Providers
| Provider | Endpoint | Status |
|---|---|---|
| OpenAI | aigateway.leanmcp.com/v1/openai | Available |
| Anthropic | aigateway.leanmcp.com/v1/anthropic | Available |
| xAI (Grok) | aigateway.leanmcp.com/v1/xai | Available |
| Fireworks | aigateway.leanmcp.com/v1/fireworks | Available |
| ElevenLabs | aigateway.leanmcp.com/v1/elevenlabs | Available |
Who Is This For?
- Personal Users
- Developers
Use the AI Gateway with your coding tools like Windsurf or Cursor to:
- See exactly what code is being sent to AI providers
- Detect if sensitive data (passwords, keys) is being exposed
- Track your personal AI token usage and costs
Get Started as Personal User
Learn how to set up AI Gateway for personal use
Quick Start
Get Credits
Purchase credits at leanmcp.com - you need credits to use the gateway
Detailed Integration Guide
See code examples for all supported providers and SDKs