FastMCP is a TypeScript framework for building MCP servers that handle client sessions, offering features like authentication, logging, SSE, error handling, and prompt argument auto-completion. It also includes a CLI
FastMCP is a TypeScript framework for building Model Context Protocol (MCP) servers, enabling client session handling. It offers features like simple Tool, Resource, and Prompt definitions, authentication, sessions, image content support, logging, error handling, Server-Sent Events (SSE), CORS, progress notifications, typed server events, prompt argument auto-completion, and sampling.
Installation is straightforward using npm install fastmcp
. The framework allows defining tools with executable functions, resources for data availability, and prompts for reusable templates. It supports returning strings, lists, and images from tools. Authentication can be implemented with custom functions, and sessions are managed for each client connection.
FastMCP includes a CLI for testing (fastmcp dev
) and debugging (fastmcp inspect
). Example use cases include generating media, controlling computers, managing projects, and creating meeting bots. The framework is inspired by the Python implementation and adopts code from LiteMCP.
punkpeye/fastmcp
December 27, 2024
March 28, 2025
TypeScript