FastMCP is an opinionated TypeScript framework for efficiently building Model Context Protocol (MCP) servers, currently stable at version 4.0.0. It aims to simplify the creation of MCP servers by abstracting away low-level implementation details, handling boilerplate, and providing intuitive, high-level APIs for common tasks like tool, resource, and prompt definition, authentication, and session management. The project maintains a rapid release cadence, often shipping minor versions every 3-4 weeks and immediately releasing patch versions for critical bug fixes and security updates, reflecting its commitment to staying current with the evolving MCP ecosystem. Key differentiators include built-in OAuth 2.1 authentication (with support for Google, GitHub, Azure, and custom providers), comprehensive session management, multiple transport options (HTTP streaming, SSE, stdio), edge runtime support, and custom HTTP route capabilities. It is designed for developers who want to quickly build robust MCP servers without delving into the intricacies of the underlying MCP SDK, on which it is built.
npm install firecrawl-fastmcpVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize a FastMCP server, add a type-safe tool for arithmetic operations, define a reusable prompt, and start the server using HTTP streaming transport, including basic session logging.
Review and update your OAuth `redirect_uri` configurations to ensure they are valid and correctly configured according to security best practices. Consult the release notes for specific migration details.
Carefully review release notes for every minor version update (`X.Y.0`) to identify and implement necessary code adjustments. Pin dependencies to specific versions for production stability if frequent breaking changes are problematic.
If using authentication features, especially the `OAuthProxy` or related `auth` modules, closely monitor patch releases and consider pinning your FastMCP dependency to a specific patch version in production environments until your authentication setup is stable.
Verify your project's `package.json` and import statements to confirm you are installing and using `fastmcp` (TypeScript) for JavaScript/TypeScript projects, not the Python equivalent.
Update your project to use ES module `import` syntax (`import { Name } from 'pkg';`) or ensure your Node.js environment is configured for ESM. If using a CommonJS file, you might need to use `import()` dynamically or convert the file to ESM.Review the schema definition (e.g., `z.object(...)`) for the tool or prompt and ensure that the arguments passed when calling it conform to the expected types and structure. Check for missing required fields or incorrect data types.
Ensure the `redirect_uri` in your client's OAuth request precisely matches one of the URIs configured in your OAuth provider's settings and within your `FastMCP` server's `OAuthProxy` setup. Pay close attention to trailing slashes and subpaths.