FrontMCP command line interface
npm install frontmcp
The TypeScript way to build MCP servers with decorators, DI, and Streamable HTTP.




[Docs][docs-home] • [Quickstart][docs-quickstart] • [API Reference][docs-sdk-ref] • Discord
---
FrontMCP is a TypeScript-first framework for the Model Context Protocol (MCP).
You write clean, typed code; FrontMCP handles the protocol, transport, DI, session/auth, and execution flow.
``ts
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 {}
`
Node.js 22+ required (24 recommended).
`bashNew project (recommended)
npx frontmcp create my-app
> Full setup guide: [Installation][docs-install]
Capabilities
| Capability | Description | Docs |
| -------------------- | ------------------------------------------------------------------------------- | ------------------------------- |
| @FrontMcp Server | Decorator-configured server with info, apps, HTTP, logging, session, auth | [Server][docs-server] |
| @App | Organizational units grouping tools, resources, prompts with optional isolation | [Apps][docs-apps] |
| @Tool | Typed actions with Zod schemas — class or function style | [Tools][docs-tools] |
| @Resource | Read-only data exposure with static and template URIs | [Resources][docs-resources] |
| @Prompt | Reusable message templates returning
GetPromptResult | [Prompts][docs-prompts] |
| @Agent | Orchestrated multi-step tool chains | [Agents][docs-agents] |
| Elicitation | Request structured user input mid-flow | [Elicitation][docs-elicitation] |
| Skills | HTTP-discoverable tool manifests for agent marketplaces | [Skills][docs-skills] |
| Discovery | Automatic capability advertisement for MCP clients | [Discovery][docs-discovery] |
| Authentication | Remote OAuth, Local OAuth, JWKS, DCR, per-app auth | [Authentication][docs-auth] |
| Sessions | Stateful/stateless session modes with JWT or UUID transport IDs | [Server][docs-server] |
| Direct Client | In-process create(), connect(), connectOpenAI(), connectClaude() | [Direct Client][docs-direct] |
| Transport | Streamable HTTP + SSE with session headers | [Transport][docs-transport] |
| Ext-Apps | Mount external MCP servers as sub-apps | [Ext-Apps][docs-ext-apps] |
| Hooks | 5 hook families: tool, list-tools, HTTP, resource, prompt | [Hooks][docs-hooks] |
| Providers / DI | Scoped dependency injection with GLOBAL and CONTEXT scopes | [Providers][docs-providers] |
| Plugins | Cache, Remember, CodeCall, Dashboard — or build your own | [Plugins][docs-plugins] |
| Adapters | Generate tools from OpenAPI specs | [Adapters][docs-adapters] |
| Testing | E2E fixtures, matchers, HTTP mocking for MCP servers | [Testing][docs-testing] |
| UI Library | HTML/React widgets, SSR, MCP Bridge, web components | [UI][docs-ui] |
| CLI | create, init, dev, build, inspector, doctor | [CLI][docs-install] |
| Deployment | Local dev, production builds, version alignment | [Deployment][docs-deploy] |Packages
| Package | Description |
| ------------------------------------- | ------------------------------------------------------ |
|
@frontmcp/sdk | Core framework — decorators, DI, flows, transport |
| @frontmcp/cli | CLI tooling (frontmcp 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 test framework with fixtures and matchers |
| @frontmcp/ui | React components, hooks, SSR renderers |
| @frontmcp/uipack | React-free themes, build tools, platform adapters |
| @frontmcp/di | Dependency injection container (internal) |
| @frontmcp/utils | Shared utilities — naming, URI, crypto, FS (internal) |Version Alignment
Keep all
@frontmcp/*` packages on the same version. A clear "version mismatch" error is thrown at boot if versions drift. ([Production Build][docs-production])PRs welcome! See CONTRIBUTING.md for workflow, coding standards, and the PR checklist.
[docs-home]: https://docs.agentfront.dev/frontmcp 'FrontMCP Docs'
[docs-install]: https://docs.agentfront.dev/frontmcp/getting-started/installation 'Installation'
[docs-quickstart]: https://docs.agentfront.dev/frontmcp/getting-started/quickstart 'Quickstart'
[docs-sdk-ref]: https://docs.agentfront.dev/frontmcp/sdk-reference/overview 'SDK Reference'
[docs-server]: https://docs.agentfront.dev/frontmcp/servers/server 'The FrontMCP Server'
[docs-apps]: https://docs.agentfront.dev/frontmcp/servers/apps 'Apps'
[docs-tools]: https://docs.agentfront.dev/frontmcp/servers/tools 'Tools'
[docs-resources]: https://docs.agentfront.dev/frontmcp/servers/resources 'Resources'
[docs-prompts]: https://docs.agentfront.dev/frontmcp/servers/prompts 'Prompts'
[docs-agents]: https://docs.agentfront.dev/frontmcp/servers/agents 'Agents'
[docs-elicitation]: https://docs.agentfront.dev/frontmcp/servers/elicitation 'Elicitation'
[docs-skills]: https://docs.agentfront.dev/frontmcp/servers/skills 'Skills'
[docs-discovery]: https://docs.agentfront.dev/frontmcp/servers/discovery 'Discovery'
[docs-auth]: https://docs.agentfront.dev/frontmcp/authentication/overview 'Authentication'
[docs-direct]: https://docs.agentfront.dev/frontmcp/deployment/direct-client 'Direct Client'
[docs-transport]: https://docs.agentfront.dev/frontmcp/deployment/transport 'Transport'
[docs-ext-apps]: https://docs.agentfront.dev/frontmcp/servers/ext-apps 'Ext-Apps'
[docs-hooks]: https://docs.agentfront.dev/frontmcp/extensibility/hooks 'Hooks'
[docs-providers]: https://docs.agentfront.dev/frontmcp/extensibility/providers 'Providers'
[docs-plugins]: https://docs.agentfront.dev/frontmcp/plugins/overview 'Plugins'
[docs-adapters]: https://docs.agentfront.dev/frontmcp/adapters/overview 'Adapters'
[docs-testing]: https://docs.agentfront.dev/frontmcp/testing/overview 'Testing'
[docs-ui]: https://docs.agentfront.dev/frontmcp/ui/overview 'UI Library'
[docs-deploy]: https://docs.agentfront.dev/frontmcp/deployment/local-dev-server 'Deployment'
[docs-production]: https://docs.agentfront.dev/frontmcp/deployment/production-build 'Production Build'