What is FastMCP?
FastMCP is a Python (and TypeScript) framework that lets you build MCP servers by decorating ordinary functions, handling the protocol's transport, schema generation, and lifecycle so you write tools instead of plumbing.
FastMCP is the most widely used framework for building MCP servers, originally a Python library whose ergonomics were influential enough that its core was folded into the official MCP Python SDK; a separate FastMCP 2.x line and a TypeScript port also exist. The appeal is that it removes the boilerplate of speaking the Model Context Protocol by hand. You write a normal function, add a decorator like @mcp.tool, and FastMCP infers the tool's input schema from your type hints, registers it, and exposes it over whichever transport you choose, stdio for a local MCP server or Streamable HTTP for a remote one. The same pattern covers MCP resources and prompts, so a working server can be a few dozen lines. Beyond the basics it handles capability negotiation, sessions, structured output, authentication hooks, and testing utilities, which is why many published servers are FastMCP under the hood. Conceptually it is to MCP servers what a web framework is to HTTP handlers: it lets you focus on what the tool does while the framework manages the wire protocol.