> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leanmcp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> LeanMCP - The fastest way to build and deploy MCP Servers

# Welcome to LeanMCP

**LeanMCP is the fastest way to build, deploy, and maintain production-ready, enterprise-grade MCP servers.**

It comes with an SDK so you can build MCP servers fast, and a deployment platform so you can ship them globally without getting stuck on infra and protocol gotchas.

Most teams spend weeks debugging these issues. LeanMCP solves them out of the box.

***

## What are you here for?

<CardGroup cols={2}>
  <Card title="Monitor my AI requests" icon="eye" href="/ai-gateway/introduction" color="#ff6b35">
    **Observability & AI Gateway**

    Already have an account? Start here. Connect your AI clients (Cursor, Windsurf, Claude, etc.) to LeanMCP and get unified logs, usage tracking, and cost visibility.
  </Card>

  <Card title="Build an MCP Server" icon="code" href="/quickstart" color="#0ea5e9">
    **Build & Deploy**

    Use the LeanMCP SDK to build and ship a production-grade MCP Server. Get your first tool call running in 5 minutes.
  </Card>
</CardGroup>

***

## Production-Grade MCP Infrastructure

Deploy MCP servers that are **scalable at the edge** for all your users across all regions. We support every MCP protocol and work seamlessly with all major MCP clients. We handle the hard parts:

* **Auto-scaling** - Automatically scales based on demand, no configuration needed
* **Fault-tolerant** - Automatic failover, your MCPs stay online even when things go wrong
* **No CPU hogging** - Long-running tools run in isolation, never blocking other requests
* **Low latency** - Edge deployment across 30+ regions means fast responses globally
* **Multi-client support** - Works with Claude, Cursor, Windsurf, and any MCP-compatible client

## Full MCP Protocol Support

Unlike partial implementations, LeanMCP supports the **complete MCP specification**:

* **Authentication** - Built-in auth flows for secure tool access
* **Elicitation** - Interactive prompts for user input during tool execution
* **MCP Apps** - Full application lifecycle support
* **All transports** - HTTP, SSE, and WebSocket support out of the box
* **Sampling** - Let your MCP request LLM completions from the client

## How It Works

LeanMCP provides two main components:

1. **Open Source SDK** - Build your MCP servers with TypeScript decorators
2. **Managed Platform** - Deploy directly to our edge infrastructure

```typescript theme={null}
import { MCPServer, createHTTPServer, Tool, Service } from "@leanmcp/core";

@Service()
class WeatherService {
  @Tool("Get weather for a city")
  async getWeather(city: string) {
    return { temperature: 72, condition: "sunny" };
  }
}

const server = new MCPServer({ name: "my-mcp", version: "1.0.0" });
await createHTTPServer(() => server.getServer(), { port: 3001 });
```

## Documentation Roadmap

If you’re new here, follow the docs in this order:

* **Getting started** (CLI + SDK)
  * Start with the [Quickstart](/quickstart)
  * Install and use the CLI: [CLI Installation](/cli/installation)
  * Then jump into the SDK overview: [SDK Introduction](/building/introduction)

* **Ready to deploy**
  * Read the deployment overview: [Deployment Introduction](/deploy/introduction)
  * Deploy on the managed platform: [LeanMCP Platform](/deploy/leanmcp-platform)
  * Or deploy on your own infra: [Cloud Providers](/deploy/cloud-providers)

* **Auth + additional features**
  * Authentication and billing: [Auth & Payment](/guides/auth-and-payment)
  * UI + apps in chat: [Prompts](/core-concepts/prompts)
  * Where to use MCPs (clients + platforms): [Where to use MCPs](/guides/where-to-use-mcps)

* **Debugging**
  * Test and debug your server: [Debugging MCP Servers](/debugging)

***

## Get Started with the CLI

The fastest way to start is with our CLI:

```bash theme={null}
# Install the CLI
npm install -g @leanmcp/cli

# Login to your account
leanmcp login

# Create a new project
leanmcp init my-mcp-server

# Deploy to production
leanmcp deploy
```

<CardGroup cols={2}>
  <Card title="Install CLI" icon="terminal" href="/cli/installation">
    Set up the LeanMCP CLI
  </Card>

  <Card title="Quick Start" icon="rocket" href="/quickstart">
    Build your first MCP in 5 minutes
  </Card>
</CardGroup>

<Note>
  Join our community! Get help, share your projects, and connect with other builders on [Discord](https://discord.com/invite/DsRcA3GwPy).
</Note>

## Learn More

<CardGroup cols={2}>
  <Card title="SDK Reference" icon="code" href="/building/introduction">
    Build MCPs with TypeScript decorators
  </Card>

  <Card title="Core Concepts" icon="book" href="/core-concepts/tools">
    Tools, Resources, and Prompts
  </Card>
</CardGroup>

## Deployment

<CardGroup cols={2}>
  <Card title="Deployment Overview" icon="rocket" href="/deploy/introduction">
    Learn about deployment options
  </Card>

  <Card title="LeanMCP Platform" icon="cloud" href="/deploy/leanmcp-platform">
    Deploy to our managed edge infrastructure
  </Card>

  <Card title="Vercel" icon="triangle" href="/deploy/vercel">
    Deploy as serverless functions
  </Card>

  <Card title="Cloud Providers" icon="server" href="/deploy/cloud-providers">
    AWS, GCP, Azure deployment guides
  </Card>
</CardGroup>

## Best Practices

<CardGroup cols={2}>
  <Card title="Reducing Tokens" icon="bolt" href="/guides/reducing-tokens">
    Optimize token usage in your MCPs
  </Card>

  <Card title="API to MCP" icon="arrows-rotate" href="/guides/api-to-mcp">
    Convert existing APIs to MCPs
  </Card>

  <Card title="Auth & Payment" icon="lock" href="/guides/auth-and-payment">
    Implement authentication and billing
  </Card>

  <Card title="Security" icon="shield" href="/guides/security-rsc-cve">
    Security best practices
  </Card>
</CardGroup>

## Advanced Features

<CardGroup cols={2}>
  <Card title="Authentication" icon="lock" href="/guides/auth-and-payment">
    Secure your MCPs with built-in auth flows
  </Card>

  <Card title="MCP Apps (UI)" icon="window" href="/core-concepts/prompts">
    Build interactive UIs in chat interfaces
  </Card>

  <Card title="ChatGPT Apps" icon="message" href="/guides/where-to-use-mcps">
    Deploy MCPs as ChatGPT plugins
  </Card>

  <Card title="Cross-Platform" icon="arrows-split-up-and-left" href="/deploy/cloud-providers">
    Deploy anywhere - Vercel, AWS, GCP, Azure
  </Card>
</CardGroup>

## API Reference

<CardGroup cols={2}>
  <Card title="API Documentation" icon="book-open" href="/api-reference">
    HTTP API for programmatic access
  </Card>
</CardGroup>

If you need enterprise features like **SLA**, **support**, **SSO**, or **custom auth integrations**, email us at [founders@leanmcp.com](mailto:founders@leanmcp.com).
