Fastmcp
MCP server by punkpeye Verified · gh:punkpeye
FastMCP is a TypeScript framework for building MCP servers that handle client sessions. It is built on the official SDK and suits developers who want to build MCP servers quickly.
Install Fastmcp
Built from the published package, never by AI.
claude mcp add fastmcp -- npx -y fastmcpRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"fastmcp": {
"args": [
"-y",
"fastmcp"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"fastmcp": {
"args": [
"-y",
"fastmcp"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"fastmcp": {
"args": [
"-y",
"fastmcp"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add fastmcp -- npx -y fastmcp{
"mcpServers": {
"fastmcp": {
"args": [
"-y",
"fastmcp"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add fastmcp npx -y fastmcpGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the fastmcp block.
About
FastMCP is a TypeScript framework for building MCP servers that handle client sessions. It is built on the official MCP SDK and handles much of the boilerplate for tools, resources, prompts and responses. Developers install it with npm, define tools with a schema and an execute function, then start the server over stdio or HTTP.
The framework supports HTTP streaming with SSE compatibility, HTTPS, custom HTTP routes through Hono, stateless mode, and features such as sampling, elicitation, roots and progress notifications. It also includes a CLI for testing and debugging with MCP Inspector, and an in-memory transport for unit tests. The source states that it implements the legacy handshake-based MCP revisions up to 2025-11-25, not the stateless 2026-07-28 specification. It suits developers who want a higher-level alternative to the raw SDK.
Written from the project's README and checked against it.
What you need
- npm to install the fastmcp package
- TypeScript
Try asking
- Create an MCP server in TypeScript with an add tool that sums two numbers
- Add HTTP streaming transport to my FastMCP server on port 8080
- Write a unit test for my MCP server using FastMCP's in-memory transport
Good to know
- Does not support the 2026-07-28 MCP specification, only revisions up to 2025-11-25.
- A server bound to localhost answers only loopback browser origins by default. Other origins get a 403.
- Custom HTTP routes are public unless you add your own authentication checks.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
What you can do with it
- Building MCP servers quickly in TypeScript
- Adding tools, resources and prompts to an MCP server
- Serving MCP over HTTP streaming or SSE
Alternatives to Fastmcp
All alternatives →Turns GitHub repositories into architecture diagrams, written explanations, Mermaid source and narrated explainer videos. Built for developers who want to understand a codebase, and for AI agents that need to read one.
Mocks, records, and chaos-tests HTTP(S) dependencies for development and testing. One port serves many protocols, including gRPC, WebSockets, and LLM chat APIs. Built for developers and testers who need stand-in services during tests.
Provides MCP server and CLI tools that let AI coding agents build, test and manage iOS and macOS projects with Xcode and simulators. It is aimed at developers working on Apple platform apps.
Creates editable draw.io diagrams in AI chat from Mermaid, PlantUML, CSV or draw.io XML. Built for people who want diagrams from text prompts that stay editable in draw.io.
Indexes your code, git history, tests and decisions on your machine so AI coding agents can query the index instead of re-reading files. Built for developers who want fewer files opened and clearer answers about change risk and code health.
Gives your AI assistant hosted codebase intelligence for repos indexed on repowise.dev. Use it to ask how code works, what a change may break, and which tests to run.
Compare with GitDiagram, mockserver or XcodeBuildMCP
Fastmcp: common questions
Does FastMCP support the latest MCP specification?
The README says FastMCP implements the legacy handshake-based MCP revisions, 2025-11-25 and earlier. It does not support the 2026-07-28 specification, which removed the initialize handshake and Mcp-Session-Id.
Is FastMCP built on the official MCP SDK?
Yes. The README says FastMCP is built on top of the official SDK and handles connection, tool, response and resource details for you.
How do I test a FastMCP server?
The README lists a CLI with dev and inspect commands for testing and debugging. It also provides an in-memory transport for unit testing without binding a port.
How do I install Fastmcp?
In Claude Code run claude mcp add fastmcp -- npx -y fastmcp. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is Fastmcp the official server?
Fastmcp is published by gh:punkpeye from its verified domain in the official MCP Registry.
Is Fastmcp free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is Fastmcp safe to use?
It scores 89 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to Fastmcp?
Similar MCP servers: GitDiagram, mockserver, XcodeBuildMCP, draw.io.
Does Fastmcp work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
