punkpeye/fastmcp

A TypeScript framework for building MCP servers.

What it solves

FastMCP is a TypeScript framework designed to simplify the creation of Model Context Protocol (MCP) servers. It removes the low-level boilerplate and implementation complexity associated with the official SDK, allowing developers to focus on the core functionality of their tools, resources, and prompts without managing connection handling, response formatting, or server configuration manually.

How it works

Built on top of the official MCP SDK, FastMCP provides an opinionated, high-level API for defining server capabilities. It supports multiple transport methods, including standard I/O (stdio) and HTTP streaming (with SSE compatibility). The framework allows developers to define tools using schema validation libraries like Zod, ArkType, or Valibot. It also integrates Hono for adding custom HTTP routes, enabling the server to act as both an MCP server and a REST API or webhook handler.

Who it’s for

TypeScript developers who want to build and deploy MCP servers quickly. It is particularly useful for those targeting Node.js, Bun, or edge runtimes like Cloudflare Workers and Deno Deploy via its EdgeFastMCP class.

Highlights

  • Simplified API: Rapidly define tools, resources, and prompts with minimal boilerplate.
  • Flexible Transport: Supports stdio, HTTP streaming, and SSE, including HTTPS for secure connections.
  • Edge Ready: Dedicated support for edge runtimes (Cloudflare Workers, Deno Deploy) with a stateless mode for serverless deployments.
  • Extensible HTTP: Ability to add custom REST API endpoints and webhooks using an integrated Hono app.
  • Developer Tooling: Includes a CLI for testing and debugging via the MCP Inspector.
  • Schema Agnostic: Compatible with various validation libraries via the Standard Schema specification.

Related

  • Project
  • Project
  • Project
  • Project
  • Project