docs/v2/getting-started/welcome.mdx
FastMCP is the standard framework for building MCP applications. The Model Context Protocol (MCP) provides a standardized way to connect LLMs to tools and data, and FastMCP makes it production-ready with clean, Pythonic code:
from fastmcp import FastMCP
mcp = FastMCP("Demo š")
@mcp.tool
def add(a: int, b: int) -> int:
"""Add two numbers"""
return a + b
if __name__ == "__main__":
mcp.run()
FastMCP pioneered Python MCP development, and FastMCP 1.0 was incorporated into the official MCP SDK in 2024.
This is FastMCP 2.0, the actively maintained version that extends far beyond basic protocol implementation. While the SDK provides core functionality, FastMCP 2.0 delivers everything needed for production: advanced MCP patterns (server composition, proxying, OpenAPI/FastAPI generation, tool transformation), enterprise auth (Google, GitHub, Azure, Auth0, WorkOS, and more), deployment tools, testing frameworks, and comprehensive client libraries.
Ready to build? Start with our installation guide or jump straight to the quickstart.
FastMCP is made with š by Prefect.
<Warning> **FastMCP 3.0** is in development and may include breaking changes. To avoid unexpected issues, pin your dependency to v2: `fastmcp<3` </Warning>The Model Context Protocol lets you build servers that expose data and functionality to LLM applications in a secure, standardized way. It is often described as "the USB-C port for AI", providing a uniform way to connect LLMs to resources they can use. It may be easier to think of it as an API, but specifically designed for LLM interactions. MCP servers can:
Resources (think of these sort of like GET endpoints; they are used to load information into the LLM's context)Tools (sort of like POST endpoints; they are used to execute code or otherwise produce a side effect)Prompts (reusable templates for LLM interactions)FastMCP provides a high-level, Pythonic interface for building, managing, and interacting with these servers.
FastMCP handles all the complex protocol details so you can focus on building. In most cases, decorating a Python function is all you need ā FastMCP handles the rest.
š Fast: High-level interface means less code and faster development
š Simple: Build MCP servers with minimal boilerplate
š Pythonic: Feels natural to Python developers
š Complete: Everything for production ā enterprise auth (Google, GitHub, Azure, Auth0, WorkOS), deployment tools, testing frameworks, client libraries, and more
FastMCP provides the shortest path from idea to production. Deploy locally, to the cloud with Prefect Horizon (free for personal projects), or to your own infrastructure.
<Tip> **This documentation reflects FastMCP's `main` branch**, meaning it always reflects the latest development version. Features are generally marked with version badges (e.g. `New in version: 2.13.1`) to indicate when they were introduced. Note that this may include features that are not yet released. </Tip>The FastMCP documentation is available in multiple LLM-friendly formats:
The FastMCP docs are accessible via MCP! The server URL is https://gofastmcp.com/mcp.
In fact, you can use FastMCP to search the FastMCP docs:
import asyncio
from fastmcp import Client
async def main():
async with Client("https://gofastmcp.com/mcp") as client:
result = await client.call_tool(
name="search_fast_mcp",
arguments={"query": "deploy a FastMCP server"}
)
print(result)
asyncio.run(main())
The docs are also available in llms.txt format:
Any page can be accessed as markdown by appending .md to the URL. For example, this page becomes https://gofastmcp.com/getting-started/welcome.md.
You can also copy any page as markdown by pressing "Cmd+C" (or "Ctrl+C" on Windows) on your keyboard.