FrontMCP - The TypeScript way to build MCP servers [![NPM](https://img.shields.io/npm/v/@frontmcp/sdk.svg?style=flat-square&color=16A34A&labelColor=0b1117&label=npm)](https://www.npmjs.com/package/@frontmcp/sdk) [![Node](https://img.shields.io/badge/node-%E2%89%A5%2024-16A34A?style=flat-square&labelColor=0b1117&logo=node.js&logoColor=white)](https://nodejs.org) [![License](https://img.shields.io/github/license/agentfront/frontmcp.svg?style=flat-square&color=16A34A&labelColor=0b1117)](./LICENSE) [![Snyk](https://img.shields.io/badge/snyk-monitored-16A34A?style=flat-square&labelColor=0b1117&logo=snyk&logoColor=white)](https://snyk.io/test/github/agentfront/frontmcp) [![Discord](https://img.shields.io/badge/discord-join-16A34A?style=flat-square&labelColor=0b1117&logo=discord&logoColor=white)](https://discord.gg/53AHnJnmwR) [![FrontMCP docs MCP connector – tool definition quality and endpoint health on Glama](https://glama.ai/mcp/connectors/dev.frontmcp.mcp/frontmcp/badges/score.svg)](https://glama.ai/mcp/connectors/dev.frontmcp.mcp/frontmcp) **[frontmcp.dev](https://frontmcp.dev)**  ·  **[Learn][docs-learn]**  ·  **[Reference][docs-reference]**  ·  **[Examples][docs-examples]**  ·  **[Playground][docs-playground]**  ·  **[Compare][docs-compare]**  ·  **[Blog][docs-blog]** npx frontmcp create my-app, then cd my-app && npm install and npm run dev: an MCP server running on localhost:3000

**FrontMCP is the TypeScript framework for MCP servers.** You write tools, resources and prompts as typed classes with Zod schemas, and FrontMCP serves them over the Model Context Protocol, with dependency injection, authentication, testing, agents and jobs, on Node, Vercel, AWS Lambda and Cloudflare Workers. It serves MCP 2026-07-28, the stateless revision, and the earlier ones. The docs, examples and a browser playground are at [frontmcp.dev](https://frontmcp.dev). ## Write a tool. Ship a server. Classes in, protocol out. FrontMCP handles transport, DI, sessions, auth and execution flow, and the same server runs locally and in production unchanged. ```ts import 'reflect-metadata'; import { App, FrontMcp, Tool, ToolContext, z } from '@frontmcp/sdk'; @Tool({ name: 'add', description: 'Adds two numbers together', inputSchema: { a: z.number(), b: z.number() }, }) class AddTool extends ToolContext { async execute(input: { a: number; b: number }) { return input.a + input.b; } } @App({ id: 'calc', name: 'Calculator', tools: [AddTool] }) class CalcApp {} @FrontMcp({ info: { name: 'Demo', version: '0.1.0' }, apps: [CalcApp], http: { port: 3000 }, }) export default class Server {} ```
Typed end to end, auth built in, ship anywhere, every stage is a hook, tools with a face, one endpoint for any client

## Start ```bash npx frontmcp create my-app # new project (Node 24+) npx frontmcp init # or add FrontMCP to an existing one ``` Then follow **[Learn][docs-learn]** on [frontmcp.dev](https://frontmcp.dev), or browse [Tools][docs-tools], [Resources][docs-resources], [Prompts][docs-prompts], [Agents][docs-agents], [Auth][docs-auth], [Plugins][docs-plugins], [Tool UI][docs-ext-apps], [Testing][docs-testing] and [Deployment][docs-deploy]. Try it live in the [Playground][docs-playground]. ## How it compares FrontMCP's maintainers compared eight TypeScript options on auth, testing, protocol support and deployment. Each library's hello world was run, and every fact links to its source and check date in **[the full comparison][docs-compare]**. | If your server needs | Start with | | --- | --- | | Shared services, authenticated tools and background work in a modular server | FrontMCP ([why FrontMCP][compare-why]) | | A small tool server, or an MCP route inside an existing backend | [The official TypeScript SDK][compare-sdk] | | React views in an MCP App, with a development inspector | [mcp-use][compare-mcp-use], [xmcp][compare-xmcp], or [FrontMCP's tool UI][learn-tool-ui] | | File-based tool discovery inside a web application | [xmcp][compare-xmcp] | | A small stateless server on an edge runtime | [ViteMCP][compare-vitemcp] or [the official SDK][compare-sdk] | | Server composition, middleware and a general-purpose client | [Prefect's FastMCP TypeScript][compare-fastmcp-ts] | | An existing app built on a session-based framework | [FastMCP][compare-fastmcp] or [mcp-framework][compare-mcp-framework] | **Moving a server over?** [From the TypeScript SDK][migrate-sdk]  ·  [From FastMCP][migrate-fastmcp]  ·  [The best TypeScript MCP frameworks in 2026][blog-best-frameworks] ## Packages Install `frontmcp` (CLI) and `@frontmcp/sdk`. The rest is pulled in for you, or opt-in. Keep every `@frontmcp/*` package on the same version: they depend on each other at exact versions.
Core and extensions
| Package | What it does | | --------------------------------------------------- | --------------------------------------------------------------- | | [`frontmcp`](libs/cli) | CLI: `create`, `init`, `dev`, `build`, `test`, `inspector` | | [`@frontmcp/sdk`](libs/sdk) | Core framework: decorators, DI, flows, transport, MCP protocol | | [`@frontmcp/auth`](libs/auth) | OAuth, JWKS, DCR/CIMD, sessions, credential vault | | [`@frontmcp/testing`](libs/testing) | E2E test framework with fixtures and matchers | | [`@frontmcp/adapters`](libs/adapters) | Generate tools from an OpenAPI spec | | [`@frontmcp/skills`](libs/skills) | Curated `SKILL.md` catalog for scaffolding and `skills install` | | [`@frontmcp/guard`](libs/guard) | Rate limits, concurrency and policy guards | | [`@frontmcp/observability`](libs/observability) | Structured logging, metrics and tracing | | [`@frontmcp/react`](libs/react) | React hooks and client for a FrontMCP server | | [`@frontmcp/ui`](libs/ui) / [`uipack`](libs/uipack) | Widgets, SSR renderers, MCP Bridge, themes | | [`@frontmcp/edge`](libs/edge) | Run a server on Cloudflare Workers / V8 isolates | | [`@frontmcp/storage-sqlite`](libs/storage-sqlite) | SQLite session, task and elicitation stores | | [`@frontmcp/nx`](libs/nx-plugin) | Nx generators and executors | Internal, published so the above resolve: [`protocol`](libs/protocol), [`di`](libs/di), [`utils`](libs/utils), [`lazy-zod`](libs/lazy-zod).
Official plugins
| Package | What it does | | -------------------------------------------------------------------- | ----------------------------------------------- | | [`@frontmcp/plugin-cache`](plugins/plugin-cache) | Cache tool results with a TTL | | [`@frontmcp/plugin-remember`](plugins/plugin-remember) | Per-session memory (`this.remember`) | | [`@frontmcp/plugin-result-handles`](plugins/plugin-result-handles) | Fold large answers into a handle to query | | [`@frontmcp/plugin-approval`](plugins/plugin-approval) | Human approval gates before a tool runs | | [`@frontmcp/plugin-codecall`](plugins/plugin-codecall) | Let the model compose tool calls as code | | [`@frontmcp/plugin-dashboard`](plugins/plugin-dashboard) | Built-in web dashboard | | [`@frontmcp/plugin-feature-flags`](plugins/plugin-feature-flags) | Toggle tools and apps at runtime | | [`@frontmcp/plugin-skilled-openapi`](plugins/plugin-skilled-openapi) | OpenAPI to skills and meta-tools for big APIs | | [`@frontmcp/plugin-webmcp`](plugins/plugin-webmcp) | Expose in-page tools to browser agents (WebMCP) |

PRs welcome: see [CONTRIBUTING](./CONTRIBUTING.md). Released under the [Apache-2.0](./LICENSE) license.
[docs-learn]: https://frontmcp.dev/learn 'Learn FrontMCP' [docs-reference]: https://frontmcp.dev/reference 'Reference' [docs-examples]: https://frontmcp.dev/examples 'Examples' [docs-playground]: https://frontmcp.dev/playground 'Playground' [docs-blog]: https://frontmcp.dev/blog 'Blog' [docs-compare]: https://frontmcp.dev/compare 'TypeScript MCP server frameworks compared' [compare-sdk]: https://frontmcp.dev/compare/official-typescript-sdk 'FrontMCP vs the official MCP TypeScript SDK' [compare-fastmcp]: https://frontmcp.dev/compare/fastmcp-typescript 'FrontMCP vs FastMCP for TypeScript' [compare-fastmcp-ts]: https://frontmcp.dev/compare/fastmcp-ts "FrontMCP vs Prefect's FastMCP TypeScript" [compare-mcp-framework]: https://frontmcp.dev/compare/mcp-framework 'FrontMCP vs mcp-framework' [compare-mcp-use]: https://frontmcp.dev/compare/mcp-use 'FrontMCP vs mcp-use' [compare-vitemcp]: https://frontmcp.dev/compare/vitemcp 'FrontMCP vs ViteMCP' [compare-xmcp]: https://frontmcp.dev/compare/xmcp 'FrontMCP vs xmcp' [compare-why]: https://frontmcp.dev/compare/why-frontmcp 'Why FrontMCP' [learn-tool-ui]: https://frontmcp.dev/learn/tools-with-a-ui 'Tools with a UI' [blog-best-frameworks]: https://frontmcp.dev/blog/best-typescript-mcp-frameworks 'The Best TypeScript MCP Server Frameworks in 2026' [migrate-sdk]: https://frontmcp.dev/learn/migrating-from-the-typescript-sdk 'Migrate from the TypeScript SDK' [migrate-fastmcp]: https://frontmcp.dev/learn/migrating-from-fastmcp 'Migrate from FastMCP' [docs-tools]: https://frontmcp.dev/reference/sdk/tool 'Tools' [docs-resources]: https://frontmcp.dev/reference/sdk/resource 'Resources' [docs-prompts]: https://frontmcp.dev/reference/sdk/prompt 'Prompts' [docs-agents]: https://frontmcp.dev/reference/sdk/agent 'Agents' [docs-auth]: https://frontmcp.dev/reference/auth/modes 'Authentication' [docs-ext-apps]: https://frontmcp.dev/learn/tools-with-a-ui 'Tool UI / MCP Apps' [docs-plugins]: https://frontmcp.dev/reference/plugins 'Plugins' [docs-testing]: https://frontmcp.dev/reference/testing 'Testing' [docs-deploy]: https://frontmcp.dev/reference/deployment/node 'Deployment'