An MCP proxy server that aggregates multiple MCP servers behind a single HTTP endpoint for clients such as Claude.
punkpeye/fastmcp
A TypeScript framework for building MCP servers that handle client sessions, with tools, resources, prompts and multiple transports.
- Stars
- 3,278
- Forks
- 332
- Open issues
- 5
- Last commit
- 10 hours ago
What is it?
FastMCP is a TypeScript framework for building Model Context Protocol (MCP) servers. It wraps the official MCP SDK and handles the boilerplate of configuring server components, managing connections, and formatting tool, resource and prompt responses, so developers can define tools with a few lines of code. Schemas can be written with Zod, ArkType, Valibot or plain JSON Schema.
Servers can run over stdio, HTTP streaming with SSE compatibility, or HTTPS, and can be deployed in stateful or stateless mode. The framework also supports authentication, header and session tracking, sampling, elicitation, roots, progress notifications, and custom HTTP routes through the underlying Hono app. An edge variant, EdgeFastMCP, targets Cloudflare Workers and Deno Deploy.
The project targets the legacy, handshake-based MCP revisions up to 2025-11-25 and does not support the stateless 2026-07-28 specification.
Key features
- 01Define tools, resources, and prompts with a simple API.
- 02Validate parameters with Zod, ArkType, Valibot, or plain JSON Schema.
- 03Serve over stdio, HTTP streaming with SSE compatibility, or HTTPS.
- 04Run in stateful or stateless mode, including on edge runtimes.
- 05Add authentication, custom Hono HTTP routes, and a health-check endpoint.
- 06Test with an in-memory transport, the CLI, or MCP Inspector.
Use cases
- Wrapping an internal API or database as tools that an LLM client can call.
- Building a remote MCP server that clients connect to over HTTP.
- Deploying an MCP server to Cloudflare Workers or Deno Deploy.
- Writing unit tests for MCP servers without binding a network port.
Quick start
- 1
Install the fastmcp package from npm
npm install fastmcp - 2
Write a server file using the Quickstart code from the README and start it with server.start()
Things to know
- FastMCP supports only the legacy handshake-based MCP revisions (2025-11-25 and earlier), not the current stateless 2026-07-28 specification.
Topics
FAQ
- What is fastmcp?
- A TypeScript framework for building MCP servers that handle client sessions, with tools, resources, prompts and multiple transports. FastMCP is a TypeScript framework for building Model Context Protocol (MCP) servers. It wraps the official MCP SDK and handles the boilerplate of configuring server components, managing connections, and formatting tool, resource and prompt responses, so developers can define tools with a few lines of code. Schemas can be written with Zod, ArkType, Valibot or plain JSON Schema.
- Is fastmcp free to use? What license does it have?
- fastmcp is open source under the MIT license. Check the license terms before using it in commercial products.
- Is fastmcp still maintained?
- Actively maintained. The last commit to fastmcp was on Oct 22, 2026.
- What can I use fastmcp for?
- Wrapping an internal API or database as tools that an LLM client can call. Building a remote MCP server that clients connect to over HTTP. Deploying an MCP server to Cloudflare Workers or Deno Deploy. Writing unit tests for MCP servers without binding a network port.
- How do I install fastmcp?
- Install the fastmcp package from npm: npm install fastmcp Write a server file using the Quickstart code from the README and start it with server.start()
- Where can I get fastmcp?
- The source code and installation instructions are on GitHub: https://github.com/punkpeye/fastmcp
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A lightweight personal AI assistant written in Go that runs on low-cost hardware and connects to many LLM providers and chat apps.
An open-source coding-agent CLI that runs in the terminal and works with cloud APIs and local model backends like Ollama.
A CLI and web tool that packs an entire code repository into one AI-friendly file for feeding to LLMs like Claude or ChatGPT.
TypeScript packages and examples for building AI apps on Cloudflare, with providers for the Vercel AI SDK and TanStack AI.
An AI prompt optimizer that refines prompts, tests and compares their outputs, and saves them as reusable assets, available as web, desktop, Chrome extension, and Docker.