Skip to content

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.

License

Notifications You must be signed in to change notification settings

agentfront/frontmcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

182 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
FrontMCP Logo

The TypeScript way to build MCP servers with decorators, DI, and Streamable HTTP.

NPM - @frontmcp/sdk Node License Snyk

DocsQuickstartAPI ReferenceDiscord


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.

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 {}

Installation

Node.js 22+ required (24 recommended).

# New project (recommended)
npx frontmcp create my-app

# Existing project
npm i -D frontmcp @types/node@^22
npx frontmcp init

Full setup guide: Installation

Capabilities

Capability Description Docs
@FrontMcp Server Decorator-configured server with info, apps, HTTP, logging, session, auth Server
@App Organizational units grouping tools, resources, prompts with optional isolation Apps
@Tool Typed actions with Zod schemas — class or function style Tools
@Resource Read-only data exposure with static and template URIs Resources
@Prompt Reusable message templates returning GetPromptResult Prompts
@Agent Orchestrated multi-step tool chains Agents
Elicitation Request structured user input mid-flow Elicitation
Skills HTTP-discoverable tool manifests for agent marketplaces Skills
Discovery Automatic capability advertisement for MCP clients Discovery
Authentication Remote OAuth, Local OAuth, JWKS, DCR, per-app auth Authentication
Sessions Stateful/stateless session modes with JWT or UUID transport IDs Server
Direct Client In-process create(), connect(), connectOpenAI(), connectClaude() Direct Client
Transport Streamable HTTP + SSE with session headers Transport
Ext-Apps Mount external MCP servers as sub-apps Ext-Apps
Hooks 5 hook families: tool, list-tools, HTTP, resource, prompt Hooks
Providers / DI Scoped dependency injection with GLOBAL and CONTEXT scopes Providers
Plugins Cache, Remember, CodeCall, Dashboard — or build your own Plugins
Adapters Generate tools from OpenAPI specs Adapters
Testing E2E fixtures, matchers, HTTP mocking for MCP servers Testing
UI Library HTML/React widgets, SSR, MCP Bridge, web components UI
CLI create, init, dev, build, inspector, doctor CLI
Deployment Local dev, production builds, version alignment Deployment

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)

Contributing

PRs welcome! See CONTRIBUTING.md for workflow, coding standards, and the PR checklist.

License

Apache-2.0

About

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.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors 6

Languages