Registry / llm-agents / firecrawl-fastmcp

firecrawl-fastmcp

JSON →
library1.0.4jsnpmunverified

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-fastmcp
INSTALL
IMPORT
SIG · FIRECRAWL-FASTMCP
F
firecrawl-fastmcp
llm-agentsjavascriptv1.0.4
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FastMCP
import { FastMCP } from 'fastmcp';
const FastMCP = require('fastmcp');
FastMCP is an ESM-first package. Use ES module `import` syntax.
z
import { z } from 'zod';
const z = require('zod');
Zod is the recommended schema validation library. Ensure it's imported correctly.
GoogleProvider
import { GoogleProvider } from 'fastmcp';
import GoogleProvider from 'fastmcp/auth/google'; // Older or incorrect path
Authentication providers like `GoogleProvider` are typically named exports from the main `fastmcp` package.

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.

import { FastMCP, FastMCPSession } from "fastmcp"; import { z } from "zod"; const server = new FastMCP({ name: "My CalculatMCP", version: "1.0.0", // Configure logging to see server activity loggingLevel: "debug", // Enable ping to keep connections alive, useful for long-running sessions ping: { enabled: true, intervalMs: 15000 // Ping every 15 seconds } }); server.addTool({ name: "add", description: "Add two numbers and return the sum", parameters: z.object({ a: z.number().describe("The first number to add"), b: z.number().describe("The second number to add") }), execute: async (args: { a: number; b: number }, { session }: { session: FastMCPSession }) => { // Log the operation within the session context session.info(`Executing 'add' tool for numbers: ${args.a} and ${args.b}`); return `The sum of ${args.a} and ${args.b} is ${args.a + args.b}.`; } }); server.addPrompt({ name: "greetUser", description: "A reusable prompt to greet a user by name.", parameters: z.object({ name: z.string().describe("The name of the user to greet.") }), render: async (args: { name: string }) => { return `Hello, ${args.name}! Welcome to FastMCP.`; } }); // Start the server, listening for connections server.start({ transportType: "httpStream", // Or "stdio" for local testing with MCP CLI httpStream: { port: 8080, endpoint: "/mcp" } }); console.log("FastMCP server started on http://localhost:8080/mcp"); console.log("Use a compatible MCP client or inspector to interact.");
Debug
Known issues
breakingVersion 4.0.0 introduced a breaking change related to authentication, specifically validating `redirect_uri` in `OAuthProxy.authorize` to fix a CWE-601 vulnerability. Ensure your OAuth configurations comply with the new strict validation.
fix
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.
affects: >=4.0.0
breakingFastMCP's versioning policy permits breaking changes in minor versions, unlike traditional semantic versioning. This is due to the rapid evolution of the underlying MCP ecosystem. Developers should anticipate and actively review release notes for minor version updates.
fix
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.
affects: >=2.x.x
breakingThe `fastmcp.server.auth` module is explicitly exempted from standard compatibility guarantees and is prone to breaking changes, even in patch versions. This is due to the fast-evolving nature of MCP authentication specifications.
fix
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.
affects: >=2.12.0
gotchaThere is a Python implementation also named 'FastMCP' (prefecthq/fastmcp). This entry specifically refers to the TypeScript framework (punkpeye/fastmcp-ts). Ensure you are using the correct library for your project language.
fix
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.
affects: All versions
Errors
Common errors & fixes
ERR_REQUIRE_ESM: require() of ES Module ... not supported. Instead change the require of index.js to a dynamic import()
Attempting to use `require()` to import FastMCP or its dependencies in a CommonJS context, but the package is ESM-first.
fix
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.
ZodError: [ { "code": "invalid_type", "expected": "number", "received": "string", "path": [ "a" ], "message": "Expected number, received string" } ]
Input parameters provided to a tool or prompt do not match the defined Zod schema.
fix
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.
Error: OAuthProxy: The 'redirect_uri' provided is not valid. It must be one of the registered URIs.
The `redirect_uri` used in an OAuth authorization request does not match the URI(s) registered with your OAuth provider or the FastMCP `OAuthProxy` configuration. This became a stricter validation in v4.0.0.
fix
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.
Upgrade
Version history
1.0.4latest on npm
Audit
Dependencies
zodrequiredUsed for defining and validating tool and prompt schemas, though other Standard Schema compliant libraries like ArkType or Valibot are also supported.
joseoptionalOptional dependency for JSON Web Key Set (JWKS) support (RS256/ES256 token verification) when using the OAuth Proxy.
Agent activity
24 hits · last 30 days
node
22
Amazon
1
OpenAI (training)
1
Resources
firecrawl-fastmcp — npm install firecrawl-fastmcp · libregistry