Skip to main content
Home

Built and signed on GitHub Actions

A TypeScript framework for building MCP (Model Context Protocol) servers.

This package works with Cloudflare Workers, Node.jsIt is unknown whether this package works with Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
76%
Published
a day ago (3.8.4)
class FastMCP

Constructors

new
FastMCP(options: ServerOptions<T>)

Type Parameters

Properties

Methods

addPrompt<Args extends InputPromptArgument<T>[]>(prompt: InputPrompt<T, Args>): void

Adds a prompt to the server.

addResource(resource: Resource<T>): void

Adds a resource to the server.

Adds a resource template to the server.

addTool<Params extends ToolParameters>(tool: Tool<T, Params>): void

Adds a tool to the server.

Embeds a resource by URI, making it easy to include resources in tool responses.

start(options?: Partial<{ httpStream: { endpoint?: `/${string}`; eventStore?: EventStore; port: number; }; transportType: "httpStream" | "stdio"; }>): Promise<void>

Starts the server.

stop(): Promise<void>

Stops the server.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@punkpeye/fastmcp

Import symbol

import { FastMCP } from "@punkpeye/fastmcp";
or

Import directly with a jsr specifier

import { FastMCP } from "jsr:@punkpeye/fastmcp";

Add Package

pnpm i jsr:@punkpeye/fastmcp
or (using pnpm 10.8 or older)
pnpm dlx jsr add @punkpeye/fastmcp

Import symbol

import { FastMCP } from "@punkpeye/fastmcp";

Add Package

yarn add jsr:@punkpeye/fastmcp
or (using Yarn 4.8 or older)
yarn dlx jsr add @punkpeye/fastmcp

Import symbol

import { FastMCP } from "@punkpeye/fastmcp";

Add Package

vlt install jsr:@punkpeye/fastmcp

Import symbol

import { FastMCP } from "@punkpeye/fastmcp";

Add Package

npx jsr add @punkpeye/fastmcp

Import symbol

import { FastMCP } from "@punkpeye/fastmcp";

Add Package

bunx jsr add @punkpeye/fastmcp

Import symbol

import { FastMCP } from "@punkpeye/fastmcp";