Build & ScaleYour AI AgentLightning Fast

Production-grade MCP infrastructure: SDK + Managed Deployment + Observability

OR USE OUR OPEN SOURCE LIBRARIES

uvx modelcontextprotocol create
Total 200K+ Downloads
TypeScript
npx @leanmcp/cli create my-agent
Total 37k+ Downloads
"We build production-grade infrastructure starting from the future of Agent Runtime, helping re-architect software for AI services."

Founder's Vision

How LeanMCP works

Step 1

Open Source SDK

Build MCP servers using TypeScript decorators or Python APIs. Define tools, resources, prompts, and auth in a structured, type-safe way.

Step 2

Managed Platform

Deploy MCP servers directly to LeanMCP’s managed edge infrastructure. Get OAuth, rate limiting, logs, and tracing out of the box.

Technical Deep Dive

Engineered for developers. Optimized for agents.

AI Gateway

How to add MCP server observability (logs/tracing)?

Get complete visibility into your MCP server performance and user interactions. Monitor tool calls, track latency, and debug issues with detailed logs and tracing.

Built-in observability includes:

  • Real-time tool call monitoring and latency tracking
  • Distributed tracing across MCP server requests
  • Structured logging with request/response correlation
OpenAI SDK Integration
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://aigateway.leanmcp.com/v1/openai',
apiKey: process.env.LEANMCP_API_KEY,
});
const response = await client.chat.completions.create({
model: 'gpt-5',
messages: [{ role: 'user', content: 'Hello!' }],
});
import OpenAI from 'openai';
const client = new OpenAI({
});
const response = await client.chat.completions.create({
model: 'gpt-5',
messages: [{ role: 'user', content: 'Hello!' }],
});
tools.ts
import { tool, LeanMCP } from '@leanmcp/sdk';

class MyTools extends LeanMCP {
  @tool("search_docs")
  async searchDocs(query: string) {
    return await this.vectorStore.search(query);
  }

  @tool("send_email")
  async sendEmail(to: string, subject: string) {
    return await this.mailer.send({ to, subject });
  }
}
SDK

How to add MCP server authentication (OAuth)?

Secure your MCP server with built-in OAuth integration and fine-grained access controls. Authenticate users and control tool access with enterprise-grade security.

Authentication features include:

  • OAuth 2.0 integration with popular providers (Google, GitHub, etc.)
  • Role-based access control (RBAC) for tool permissions
  • API key management and token-based authentication
Deployment

How to deploy MCP server in production?

Deploy your MCP server to production-grade infrastructure with enterprise security, auto-scaling, and zero-downtime deployments.

Production deployment includes:

  • Edge network deployment with global CDN
  • Auto-scaling based on request volume
  • Built-in health checks and monitoring
terminal
$ leanmcp deploy .

✓ Building MCP server...
✓ Running type checks...
✓ Bundling for production...
✓ Deploying to edge network...

🚀 Live at https://still-feifei-29.leanmcp.app

Dashboard: https://app.leanmcp.com/projects/0ceab...

Compatibility Matrix

Works seamlessly with your existing tools and protocols

Clients

Claude Desktop
Cursor
Windsurf
Any MCP-compatible client

Transports

HTTP
SSE (Server-Sent Events)
WebSocket

LeanMCP provides universal compatibility across MCP clients and transport protocols, ensuring your agents work everywhere without vendor lock-in.

Production-Ready Infrastructure

Built-in production infrastructure includes rate limiting, authentication, observability, and auto-scaling. Protect your MCP servers from abuse while ensuring reliable performance for legitimate users.

OAuth Authentication

OAuth Authentication

Enterprise OAuth 2.0 with RBAC and API key management

Rate Limiting

Rate Limiting

Configurable request limits per user, IP, and API key

Secrets Management

Secrets Management

Encrypted credential storage with rotation policies

AI Gateway

AI Gateway

Load balancing and failover across MCP server instances

Auto-Scaling

Auto-Scaling

Serverless scaling based on request volume and latency

Observability & Tracing

Observability & Tracing

Real-time logs, metrics, and distributed tracing

Background Pattern

Teams and developers from startups to Fortune 500 use our platform to deploy and monitor MCPs and AI Agents.

LeanMCP Logo

Start building with LeanMCP today