LeanMCP
by LeanMCP
Production-ready MCP (Model Context Protocol) framework and deployment platform for building, deploying, and monitoring AI agent tools without operational headache
The Problem
Building production MCP servers is straightforward in theory but extremely difficult in practice. Moving from “works locally” to “production-ready” requires solving:
- Authentication & Authorization – OAuth, token validation, scope management with Auth0, Supabase, Cognito, Firebase, custom
- Multi-tenancy – Per-user API keys, permissions, isolation between users
- User input collection – Validation and prompts during tool execution
- Production observability – Logging, monitoring, audit trails, debugging
- Payment integration – Stripe, usage-based billing, subscription checks
- Protocol maintenance burden – As MCP evolves, developers must rewrite significant code to keep up
Most teams either build all this from scratch (months) or give up on production MCPs.
What LeanMCP Provides
Two-part platform: SDK + Hosting
SDK (TypeScript Framework)
- TypeScript decorators – Define tools with
@tool("name")decorator - Auto-discovery – Tools are automatically discovered and registered
- Type-safe by default – TypeScript + schema validation prevent runtime errors
- Built-in services – Auth, multi-tenancy, user elicitation, observability included
- Convention over configuration – Sensible defaults, minimal boilerplate
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 });
}
} Platform (Deployment & Observability)
- One-command deployment –
leanmcp deploy .builds, type-checks, bundles, deploys to edge network - Full observability – Dashboard tracks all tool calls, latency, usage, errors
- AI Gateway – Observability on user and AI usage, rate limiting, user blocking
- Monitoring – Built-in production monitoring and debugging
- Edge network – Globally distributed deployment with low latency
Developer Experience
- Rapid development cycle – Build MCP → Test with real AI → Deploy (minutes, not weeks)
- Integrations – Works with OpenAI SDK, supports Anthropic Claude clients
- Hackathon-ready – Deploy in minutes for competitions
Key Capabilities
Authentication & Authorization
- Integrations: Auth0, Supabase, Firebase, Cognito, custom
- Per-user API keys and permissions
- Scope management
- OAuth support
Multi-tenancy & Access Control
- User isolation
- Per-user permissions
- Team management
- Tenant scoping
User Elicitation
- Native support via
@leanmcp/elicitation - Input collection during tool execution
- Validation built-in
- Interactive prompts
Production Observability
- Full tracing of tool calls
- Latency monitoring
- Error tracking and debugging
- Audit trails
- Usage analytics
Enterprise Features
- Stripe integration
- Usage-based billing
- Subscription management
- Team management
Protocol Evolution
- Updates to MCP dependencies automatically abstract complexity
- Tools, auth, elicitation continue functioning through major protocol updates
- No code rewrites required
Deployment Options
| Option | Best For | Trade-offs |
|---|---|---|
| LeanMCP Platform | Production MCPs, monitoring, fast setup | Vendor on LeanMCP hosting |
| [[../../RESOURCES/COMPANIES/vercel | Vercel]] | Simple MCPs, UI frontends |
| AWS/GCP/Azure | Enterprise, existing infrastructure | DevOps overhead |
| Self-hosted | Full control, privacy | Infrastructure burden |
Technical Architecture
Based On
- Official
@modelcontextprotocol/sdk - Express for HTTP transport
- TypeScript as primary language
- Decorator-based tool definition
Service-Based Architecture
- Stateless service design
- Edge-ready deployment
- Scalable architecture
- Distributed tracing
Use Cases
- Custom tool integrations for AI agents
- Production deployment of MCP servers
- Multi-tenant AI applications
- Team AI tools with per-user access control
- Observability and monitoring of agent tool usage
- Compliance workflows with audit trails and permissions
Market Context
MCP is becoming the standard for AI agent tool integration. LeanMCP positions itself as the deployment platform for MCPs, similar to how Vercel became the deployment platform for frontends. The thesis: MCP will be embedded in most SaaS within years, and LeanMCP makes production deployment accessible without hiring DevOps engineers.
Strategic Advantage
Being in the MCP deployment/hosting layer (like Vercel is for frontends) provides:
- First-mover advantage in MCP infrastructure
- Natural position for observability tools
- Lock-in through monitoring/tracing integrations
- Direct feedback loop from production MCPs
Competitive Positioning
vs. DIY approach: Eliminates weeks of engineering for auth, multi-tenancy, observability
vs. Vercel: Longer timeout support (production MCPs, not just short-running functions)
vs. AWS/GCP/Azure: Faster deployment, built-in observability, no DevOps overhead
vs. iPaaS (Zapier, Make): LeanMCP is for custom MCPs; iPaaS is for pre-built integrations
Community & Adoption
- Open source SDK (GitHub: LeanMCP/leanmcp-sdk)
- Active Discord community
- Hackathon partnerships and support
- Targets startups to Fortune 500 companies
Getting Started
- Install SDK –
npm install @leanmcp/sdk - Define tools with decorators
- Deploy with
leanmcp deploy . - Monitor via dashboard
Key Metrics & Insights
- Deployment time: Minutes (vs. weeks for production infrastructure)
- Time to production: Hours (vs. months building auth, observability, multi-tenancy)
- Observability: Full tracing included (no custom logging needed)
Resources
Related
- Model Context Protocol – The protocol LeanMCP builds on
- Vercel – Deployment platform comparison (frontend vs MCP)
- Cap’n Proto – Alternative RPC protocol (higher performance, niche)
- Google Vertex AI Agent Builder – Managed agent platform alternative
- Zapier MCP – Integration platform alternative (pre-built connectors)