# FastMCP — TypeScript Framework for MCP Servers > FastMCP is a TypeScript framework on top of the official MCP SDK; verified 3,112★ and includes HTTP streaming, stateless mode, and a CLI for dev+inspect. ## Install Merge the JSON below into your `.mcp.json`: ## Quick Use ```bash npm install fastmcp # Implement a server (see README Quickstart), then run: npx fastmcp dev src/server.ts npx fastmcp inspect src/server.ts ``` ## Intro FastMCP is a TypeScript framework on top of the official MCP SDK; verified 3,112★ and includes HTTP streaming, stateless mode, and a CLI for dev+inspect. **Best for:** MCP server authors who want less boilerplate and better built-in dev ergonomics **Works with:** Node.js + any MCP-compatible client (stdio or HTTP streaming transports) **Setup time:** 5-15 minutes ### Key facts (verified) - GitHub: 3112 stars · 267 forks · pushed 2026-05-04. - License: MIT · owner avatar + repo URL verified via GitHub API. - README-backed entrypoint: `npx fastmcp dev src/server.ts`. ## Main - Start with stdio transport for local clients, then switch to HTTP streaming when you need remote access and better large-payload handling. - Use `inspect` early—debugging tool schemas and outputs is cheaper than iterating via full agent runs. - Leverage built-ins listed in README (sessions, request IDs, auth, CORS, health checks) to avoid rolling your own scaffolding. ### Source-backed notes - README shows `npm install fastmcp` and provides a minimal server Quickstart with `addTool(...)` + `start(...)`. - README lists a CLI for testing/debugging, including `npx fastmcp dev ...` and `npx fastmcp inspect ...`. - README documents remote options like HTTP streaming and stateless mode for serverless deployments. ### FAQ - **Is it an SDK replacement?**: No—README says it’s built on top of the official MCP SDK and wraps common patterns. - **Can I run it remotely?**: Yes—README includes HTTP streaming transport and related options for remote access. - **What should I validate first?**: Tool schemas and outputs via `inspect`, then client connectivity, then auth/headers. ## Source & Thanks > Source: https://github.com/punkpeye/fastmcp > License: MIT > GitHub: ⭐ 3112 · forks 267 Thanks to the upstream maintainers for shipping the original project. --- ## 快速使用 ```bash npm install fastmcp # Implement a server (see README Quickstart), then run: npx fastmcp dev src/server.ts npx fastmcp inspect src/server.ts ``` ## 简介 FastMCP 是构建 MCP server 的 TypeScript 框架(基于官方 SDK);已验证 3,112★,支持 HTTP streaming、stateless 模式,并内置 dev/inspect CLI。 **适合谁用:** 想用更少样板代码、更好开发体验来写 MCP server 的开发者 **适用环境:** Node.js + 任意支持 MCP 的客户端(stdio 或 HTTP streaming) **配置耗时:** 5-15 minutes ### 关键事实(已验证) - GitHub:3112 stars · 267 forks;最近更新 2026-05-04。 - 许可证:MIT;作者头像与仓库链接均已通过 GitHub API 复核。 - README 中可对照的入口命令:`npx fastmcp dev src/server.ts`。 ## 正文 - 本地先用 stdio transport 跑通闭环;需要远程访问或更高吞吐时再切到 HTTP streaming。 - 尽早用 `inspect`:先把 tool schema/输出调对,比让 agent 反复试错省很多时间与 token。 - 优先复用 README 列出的内置能力(session、request ID、认证、CORS、health check 等),别重复造脚手架。 ### 基于来源的要点 - README 给出 `npm install fastmcp`,并提供最小 Quickstart:`addTool(...)` + `start(...)`。 - README 提供调试/测试 CLI:如 `npx fastmcp dev ...` 与 `npx fastmcp inspect ...`。 - README 说明远程部署能力:HTTP streaming 与 stateless mode 等。 ### 常见问题 - **它是官方 SDK 的替代品吗?**:不是。README 说明它构建在官方 SDK 之上,封装常用模式以减少样板代码。 - **能远程跑吗?**:可以。README 提到 HTTP streaming transport 以及相关选项。 - **第一步该验证什么?**:先用 `inspect` 验证 tool schema/输出,再验证连接,最后做认证与 header 透传。 ## 来源与感谢 > Source: https://github.com/punkpeye/fastmcp > License: MIT > GitHub: ⭐ 3112 · forks 267 --- Source: https://tokrepo.com/en/workflows/fastmcp-typescript-framework-for-mcp-servers Author: MCP Hub