
Why another MCP framework?
If you’ve tried wiring up the Model Context Protocol (MCP) by hand, you already know the drill:- Define JSON schemas manually
- Hand-roll HTTP endpoints
- Keep auth, sessions, logging and transports consistent across tools
- Copy-paste boilerplate just to expose “one more” operation ([GitHub][1])
If you’re new to MCP: it’s an open specification for how LLM clients talk to tools and data sources in a consistent
way. FrontMCP gives you a batteries-included way to implement those servers in TypeScript.
FrontMCP in one sentence
FrontMCP is the TypeScript way to build MCP servers with decorators, DI, and Streamable HTTP. ([FrontMCP][2])You write clean, typed code; FrontMCP takes care of:
- Protocol & transport (MCP Streamable HTTP)
- Sessions & streaming
- Auth & security (remote and local OAuth)
- Logging, hooks, and extensibility via adapters and plugins ([FrontMCP][2])
The pillars of FrontMCP
TypeScript-native DX
Use decorators and
zod schemas to describe tools and apps, with strong typing from inputs to
responses. FrontMCP stays out of your way and lets the TypeScript type system do the heavy lifting.Spec-aligned transport
FrontMCP speaks MCP Streamable HTTP out of the box, including sessions and streaming responses, so you can plug
it
into any MCP-capable client without custom plumbing.
Security & auth built-in
Configure remote OAuth with your existing IdP, or use built-in local OAuth. Combine that with scoped execution
and
hooks for logging, rate limits, and policy checks.
Adapters & plugins
Generate tools from OpenAPI, enable transparent caching, wire custom logging transports, and more—without
turning
your codebase into a tangle of middleware.
Core concepts (in 5 steps)
At the heart of FrontMCP there are a few concepts you’ll see everywhere in the docs.Server
A Server is your decorated entry point, defined with
@FrontMcp.
It describes server info (name, version), which apps are available, HTTP settings, logging, session
configuration, and optional auth & providers.App
An App is a logical bundle of tools and related pieces, declared with
@App.
You group tools, resources, prompts, adapters and plugins into apps so you can split behavior cleanly—per
product, per tenant, or per domain.Tool
A Tool is an active unit of work. You describe it with
@Tool (class tools)
or tool()(handler) (function tools), and attach typed input/output schemas
using zod.Hooks & Providers
Hooks give you cross-cutting behavior—auth checks, logging, rate limiting, request
transforms—while providers are dependency-injected singletons for things like config, DB, Redis, or KMS.
You control scopes per app, per session, or per request.
Adapters & Plugins
Adapters generate tools/resources/prompts from external definitions (like OpenAPI),
and plugins layer on cross-cutting behavior such as caching or tracing—without polluting your business
logic.
A tiny FrontMCP server
Let’s look at a small, but realistic, FrontMCP server. It exposes a single tool that greets a user by name, grouped into a simple app.src/main.ts
- Defined a strongly typed tool
- Grouped it into an app
- Exposed a fully MCP-compatible server entrypoint with a clean contract ([FrontMCP][2])
Installation in under a minute
You can either scaffold a new project or add FrontMCP to an existing TypeScript codebase.Option A — Create a new project
Create a new FrontMCP project
- Scaffold a new project under
./my-app - Configure
tsconfig.jsoncorrectly for decorators and modern ESM - Generate a
package.jsonwith useful scripts - Install dev dependencies like TypeScript,
tsx,zod, andreflect-metadatafor you ([FrontMCP][3])
Option B — Add to an existing project
Install the CLI and Node types
Initialize FrontMCP
init step updates your scripts, checks your tsconfig.json, and validates that your layout fits FrontMCP’s expectations. ([FrontMCP][3])
Scripts you’ll see
After usingcreate or init, your package.json will include scripts like:
package.json (scripts)
frontmcp dev– run your server in watch modefrontmcp build– compile your entry todistfrontmcp inspector– launch the MCP Inspector to explore tools livefrontmcp doctor– validate Node/npm versions, tsconfig, and project setup ([FrontMCP][3])
From “Hello MCP” to production
FrontMCP is designed so that the same primitives you use for a toy project scale all the way to hardened, production workloads. Some of the features you get out of the box:-
Sessions & Transport
Choose between stateful and stateless session modes and configure how transport IDs are issued (
uuidorjwt), depending on whether you run a single node or a distributed cluster. ([GitHub][1]) - Authentication Use remote OAuth to integrate with an external IdP (like your B2B identity provider), or local OAuth for projects that want to keep everything inside the MCP server. Either way, you can scope auth per server or per app. ([GitHub][1])
-
Logging transports
Ship logs to console, JSONL, or custom HTTP sinks by defining
@LogTransportproviders and wiring them into your server config. ([GitHub][1]) - Adapters & plugins Use the OpenAPI adapter to turn existing REST APIs into MCP tools, and plug in caching, tracing, or policy engines as plugins—no need to wrap every tool manually. ([FrontMCP][4])
FrontMCP in the AgentFront ecosystem
This is the first post in the AgentFront blog, and FrontMCP is a big part of why. We’re betting on a future where:- MCP is the default protocol for LLM tools and data access
- TypeScript is the default language for web-scale infrastructure
- Agentic systems are composed of many small, well-typed servers, not one giant monolith
- 📦 Source code:
agentfront/frontmcpon GitHub ([GitHub][1]) - 📚 Docs:
/docsfor the latest 0.3 series ([FrontMCP][2])
Where to go next
Read the Welcome doc
Get the high-level overview of FrontMCP’s concepts and how it fits into MCP.
Follow the Quickstart
Go step-by-step from empty folder to a running MCP server with a real tool.
Check out the examples
Explore example apps and tools that showcase patterns you can reuse in your own servers.
Star the repo & contribute
FrontMCP is open source (Apache-2.0). Issues, PRs, and feedback are very welcome.
This is just the beginning. In upcoming posts, we’ll dig into:
- Designing tool interfaces your LLMs actually use
- Using adapters to wrap existing APIs
- Building secure multi-tenant MCP servers with remote OAuth
- Observability patterns with custom logging transports and hooks

