A TypeScript-first framework for building production-ready MCP servers with decorator-driven architecture, built-in protocol handling, DI, OAuth/JWKS authentication, session management, and Streamable HTTP + SSE transport support.
Overview#
FrontMCP is a TypeScript-first enterprise-grade framework focused on Model Context Protocol (MCP) server development. Adopting a decorator-driven architecture (similar to NestJS), it lets developers focus on writing type-safe business logic (Tools, Resources, Prompts) while the framework handles protocol details, authentication, session management, and transport mechanisms.
Current Version: v0.12.1
Runtime: Node.js 22+ (24 recommended)
Primary Language: TypeScript (99.1%)
Core Capabilities#
| Feature | Description |
|---|---|
| @FrontMcp / @App | Decorator-driven server and app organization units with modular isolation |
| @Tool / @Resource / @Prompt | Zod Schema-based typed operations, read-only data exposure, and message templates |
| @Agent & Skills | Multi-step toolchain orchestration and HTTP-discoverable tool manifests |
| Elicitation | Request structured user input during tool execution flow |
| Authentication | Remote OAuth, Local OAuth, JWKS, DCR, and per-app auth strategies |
| Transport | Streamable HTTP + SSE with stateful/stateless session support |
| Providers / DI | Dependency injection container with GLOBAL and CONTEXT scopes |
| Adapters | Auto-generate MCP tools from OpenAPI specifications |
| Plugins | Built-in plugins: Cache, Remember, CodeCall, Dashboard |
| UI Library | React components, Hooks, Web Components, and MCP Bridge |
| Testing | E2E testing framework with fixtures and matchers |
| CLI | create, init, dev, build, inspector, doctor commands |
Installation & Quick Start#
Create New Project:
npx frontmcp create my-app
Integrate Existing Project:
npm i -D frontmcp @types/node@^22
npx frontmcp init
Minimal Example:
import 'reflect-metadata';
import { FrontMcp, LogLevel } from '@frontmcp/sdk';
import HelloApp from './hello.app';
@FrontMcp({
info: { name: 'Demo', version: '0.1.0' },
apps: [HelloApp],
http: { port: 3000 },
logging: { level: LogLevel.Info },
})
export default class Server {}
Package Structure#
| Package | Description |
|---|---|
@frontmcp/sdk | Core framework — decorators, DI, flows, transport |
@frontmcp/cli | CLI tools (create, dev, build) |
@frontmcp/auth | Authentication, OAuth, JWKS, credential vault |
@frontmcp/adapters | OpenAPI adapter for auto-generating tools |
@frontmcp/plugins | Official plugins: Cache, Remember, CodeCall, Dashboard |
@frontmcp/testing | E2E testing framework |
@frontmcp/ui | React components, hooks, SSR renderers |
Architecture Highlights#
- Monorepo Architecture: Managed via Nx 22.3.3, built with esbuild/Rspack
- Decorator-Driven: Declarative configuration, NestJS-style
- Type Safety: Deep Zod v4 integration for end-to-end type checking
- Multi-Transport: Streamable HTTP + SSE
- Version Alignment: All @frontmcp/* packages must share the same version