FastMCP
A TypeScript framework for building MCP (Model Context Protocol) servers capable of handling client sessions.For a Python implementation, see FastMCP for Python.
Get Started
Installation
Install FastMCP and get your environment ready
Quickstart
Build your first MCP server in minutes
Core Concepts
Learn about tools, resources, and prompts
API Reference
Explore the complete API documentation
Key Features
Simple Definitions
Define tools, resources, and prompts with minimal boilerplate
Type-Safe Schemas
Use Zod, Valibot, or ArkType for parameter validation
Built-in Authentication
OAuth 2.1 with Google, GitHub, Azure, and custom providers
Session Management
Track sessions with IDs and maintain client state
Rich Content
Return images, audio, and embedded resources
Multiple Transports
stdio, HTTP streaming, SSE, and edge runtime support
Streaming Output
Stream partial results and report progress
Custom Routes
Add REST APIs, webhooks, and admin interfaces
Why FastMCP?
FastMCP is built on top of the official MCP SDK, providing an opinionated framework that eliminates boilerplate and handles common patterns automatically. When to use FastMCP: You want to build MCP servers quickly without dealing with low-level implementation details. When to use the official SDK: You need maximum control or have specific architectural requirements.Quick Example
Popular Use Cases
API Integration
Connect LLMs to external APIs and services
Data Access
Provide structured access to databases and files
Automation
Build tools for workflow automation
Edge Deployment
Deploy to Cloudflare Workers or serverless platforms
Next Steps
Install FastMCP
Get started by installing the package in your project.Installation Guide →
Build Your First Server
Follow the quickstart to create a working MCP server.Quickstart →
Learn Core Concepts
Understand tools, resources, prompts, and sessions.Core Concepts →
Deploy to Production
Learn about deployment options and best practices.Deployment →