# FrontMCP > FrontMCP is the TypeScript framework for building Model Context Protocol (MCP) servers with decorators, Zod schemas, dependency injection and Streamable HTTP. Each link is the Markdown version of a page on frontmcp.dev. The site documents FrontMCP 1.9.4; release notes are at https://frontmcp.dev/releases. The full text of every page in one file is at https://frontmcp.dev/llms-full.txt; one section at a time, at https://frontmcp.dev/llms-learn.txt, https://frontmcp.dev/llms-reference.txt, https://frontmcp.dev/llms-examples.txt and https://frontmcp.dev/llms-compare.txt. The list of every page is https://frontmcp.dev/sitemap.xml. ## Learn - [Quick Start](https://frontmcp.dev/learn.md): Build an MCP server in TypeScript with FrontMCP. The 80% you'll use every day, with every example running in your browser. - [Tutorial: Help Desk Server](https://frontmcp.dev/learn/tutorial-help-desk.md): Build a complete MCP server for a support team one step at a time, with tools, clear errors, annotations, a confirmation, a resource, a prompt, an app and tests. - [Thinking in MCP](https://frontmcp.dev/learn/thinking-in-mcp.md): A design process for turning what people need from an AI assistant into tools, resources and prompts, worked through for a help desk. - [Installation](https://frontmcp.dev/learn/installation.md): Create a FrontMCP server on your machine, run it with hot reload, and connect a client. - [Describing Capabilities](https://frontmcp.dev/learn/describing-capabilities.md): How to describe what your MCP server can do, so AI models use it well. Tools, schemas, results, resources, prompts and apps. - [Your First Tool](https://frontmcp.dev/learn/your-first-tool.md): What a tool is, how a model decides to call it, and what FrontMCP does between the call and your code. - [Schemas Are Contracts](https://frontmcp.dev/learn/schemas-are-contracts.md): How a tool's Zod input schema becomes the JSON Schema a model reads, what FrontMCP checks before execute() runs, and how to write schemas models fill in correctly. - [Shaping Tool Results](https://frontmcp.dev/learn/shaping-tool-results.md): What a tool call sends back, how FrontMCP turns your return value into content and structuredContent, and how to return results and errors a model can act on. - [Exposing Data with Resources](https://frontmcp.dev/learn/exposing-data-with-resources.md): When data should be a resource instead of a tool, how to declare fixed resources and URI templates, and what clients get back when they read one. - [Reusable Prompts](https://frontmcp.dev/learn/reusable-prompts.md): What a prompt is and who picks it, how to declare required and optional arguments, return several messages, and put ticket data into a prompt. - [Grouping Capabilities into Apps](https://frontmcp.dev/learn/grouping-capabilities-into-apps.md): How @App groups tools, resources, prompts and providers, how a @FrontMcp server composes several apps, what happens when their names collide, and how apps share a provider. - [Writing Descriptions Agents Understand](https://frontmcp.dev/learn/writing-descriptions-agents-understand.md): How to write tool, argument and resource descriptions that tell a model when to use a capability, how to fill it in, and what comes back, and how to check them with tests. - [Talking to Clients](https://frontmcp.dev/learn/talking-to-clients.md): How a tool talks to the client while it runs. Asking the user a question mid-call, and reporting progress and logs from long-running tools. - [Asking the User Mid-Call](https://frontmcp.dev/learn/asking-the-user.md): How a tool asks the person using the client a question in the middle of a call, with this.elicit(), and what happens on the wire under MCP 2026-07-28. - [Reporting Progress and Logs](https://frontmcp.dev/learn/reporting-progress.md): How a long-running tool tells the client how far along it is and what it's doing, with this.progress() and this.notify(), and how clients opt in under MCP 2026-07-28. - [Structuring a Server](https://frontmcp.dev/learn/structuring-a-server.md): Where the code that isn't any one tool's job goes in a FrontMCP server. Providers for shared services and state, plugins for reusable behaviour, and hooks that run around every call. - [Sharing State with Providers](https://frontmcp.dev/learn/sharing-state-with-providers.md): Why tools shouldn't keep shared state in module variables, and how @Provider shares services instead. Scopes per request, factories built from configuration, and swapping a provider in tests. - [Extending with Plugins](https://frontmcp.dev/learn/extending-with-plugins.md): What a FrontMCP plugin is, how to write one that adds providers, tools and hooks to an app, how to configure and register it, and what the official plugins do. - [Hooking into Calls](https://frontmcp.dev/learn/hooking-into-calls.md): How FrontMCP runs a tool call as a flow of stages, and how plugin hooks run before and after them to log calls, normalize input, block calls and change results. Which order hooks run in, and what they can change. - [Securing a Server](https://frontmcp.dev/learn/securing-a-server.md): Who may connect to a FrontMCP server, what each caller may do, and how often and how long a tool may run. Authentication, authorization, rate limits and timeouts. - [Authenticating Clients](https://frontmcp.dev/learn/authenticating-clients.md): How MCP clients prove who they are to a FrontMCP server. The five auth modes, what a rejected request gets back, and how to choose. - [Deciding Who Can Call What](https://frontmcp.dev/learn/authorizing-calls.md): How a FrontMCP tool finds out who is calling, refuses calls it shouldn't make with an error the model can act on, and declares who may use it with authorities. - [Limiting and Timing Out Calls](https://frontmcp.dev/learn/limiting-calls.md): How to cap how often a FrontMCP tool runs, how many copies run at once, and how long a call may take, with rateLimit, concurrency and timeout, and what callers get back when a limit trips. - [Doing Work in the Background](https://frontmcp.dev/learn/background-work.md): When a tool isn't enough. FrontMCP jobs for slow, flaky and long-running work, the tools clients run them with, background runs and retries, and workflows that chain jobs. - [Your First Job](https://frontmcp.dev/learn/your-first-job.md): How to write a FrontMCP job with @Job and JobContext, register it on an app, run it with the execute_job tool, and read the result, logs and errors that come back. - [Running Jobs in the Background](https://frontmcp.dev/learn/running-jobs-in-the-background.md): How to start a FrontMCP job in the background and check on it with get_job_status, what states a run goes through, how to retry a flaky job with backoff, who may read a run, and where runs are stored. - [Chaining Jobs into Workflows](https://frontmcp.dev/learn/chaining-jobs-into-workflows.md): How to chain FrontMCP jobs into a workflow with @Workflow, pass each step's output to the next, run independent steps in parallel, and decide what a failing step does to the rest. - [Delegating to Agents](https://frontmcp.dev/learn/delegating-to-agents.md): When the client's model shouldn't do every step itself. FrontMCP agents run a model of their own, with their own instructions and tools, so a client can hand off a whole task in one call; skills teach the client's model a procedure instead. - [Your First Agent](https://frontmcp.dev/learn/your-first-agent.md): How to write a FrontMCP agent with @Agent and AgentContext, register it on an app, call it through its invoke_ tool, and read what its model is sent and what comes back. - [Giving an Agent Tools](https://frontmcp.dev/learn/giving-an-agent-tools.md): How to give a FrontMCP agent tools of its own, how the loop runs them and feeds the results back to the model, what the model hears when a tool fails, and how to limit the loop and add steps before and after it. - [Connecting a Real Model](https://frontmcp.dev/learn/connecting-a-real-model.md): How to connect a FrontMCP agent to Anthropic or OpenAI, where the API key comes from, what FrontMCP sends the provider and how it reads the reply, what a failing provider does to a call, and what a real model costs in requests, tokens and time. - [Agents That Call Agents](https://frontmcp.dev/learn/agents-that-call-agents.md): How one FrontMCP agent hands a task to another. Nested agents and swarm settings that let its model call another agent, handing off from execute() with this.callTool(), what to do when the other agent fails, hiding helper agents, and the depth limit for handoffs that never stop. - [Teaching the Model Skills](https://frontmcp.dev/learn/teaching-the-model-skills.md): How to write a FrontMCP skill with @Skill, how clients find and read skills through the skill:// resources and FrontMCP's skills/search and skills/load requests, where instructions can come from, and when to write a skill instead of an agent or a prompt. - [Tools with a UI](https://frontmcp.dev/learn/tools-with-a-ui.md): How a FrontMCP tool gives its result a widget, an HTML page a host shows next to the answer. Writing one with a template, choosing how it's served, and building it in React, with what works today. - [Your First Widget](https://frontmcp.dev/learn/your-first-widget.md): When a tool's result deserves a UI, and how to give it one with the ui option. An HTML template FrontMCP renders on every call, what the host receives, a widget that calls a tool back, and a widget that follows the host's theme and fits its frame. - [Choosing How a Widget Is Served](https://frontmcp.dev/learn/choosing-how-a-widget-is-served.md): Inline and static widgets in FrontMCP, setting the mode once for a server or an app, what the other serving modes really do, how a static widget gets each call's data from the host, what the widget's Content Security Policy lets it load and what ui.csp adds to it, and why every field a widget shows has to be declared in outputSchema. - [Building Widgets with React](https://frontmcp.dev/learn/building-widgets-with-react.md): Widgets as React components in .tsx files. What a project needs to bundle them, the props and @frontmcp/ui/react hooks a widget gets, calling tools with useCallTool, and the theme, size and loading details. The widget files run on a Node server, not in the Playground. - [Built-in Plugins and Adapters](https://frontmcp.dev/learn/built-in-plugins-and-adapters.md): The plugins and the adapter the FrontMCP team publishes, and when to reach for each. Caching results, remembering values across calls, asking for approval, feature flags, CodeCall, and turning an OpenAPI spec into tools. - [Caching Results](https://frontmcp.dev/learn/caching-results.md): How to answer repeated calls to a slow FrontMCP tool from a cache with @frontmcp/plugin-cache, whose calls share an entry, what makes two calls the same, how long an entry lives, and what not to cache. - [Remembering Across Calls](https://frontmcp.dev/learn/remembering-across-calls.md): How FrontMCP tools keep values from one call to the next with @frontmcp/plugin-remember and this.remember, which scope to store a value in, what lasts for signed-in and anonymous callers under MCP 2026-07-28, how values expire, and the memory tools the model can use. - [Asking for Approval](https://frontmcp.dev/learn/asking-for-approval.md): How to stop a destructive FrontMCP tool from running until the user approves it, with @frontmcp/plugin-approval. What the model sees when a call is refused, how to record and withdraw an approval, how long each kind lasts under MCP 2026-07-28, and why the model must never approve itself. - [Turning Features On and Off](https://frontmcp.dev/learn/turning-features-on-and-off.md): How to put a FrontMCP tool, resource or prompt behind a feature flag with @frontmcp/plugin-feature-flags, what a caller sees while its flag is off, and how to turn a flag on for some callers first. - [Letting the Model Write Code with CodeCall](https://frontmcp.dev/learn/letting-the-model-write-code-with-codecall.md): Why a long tool list costs a model, and how @frontmcp/plugin-codecall puts your tools behind a few tools of its own, so the model searches for the tools it needs, reads their schemas, and calls them one at a time or from a short script that runs on your server. - [Wrapping an OpenAPI Service](https://frontmcp.dev/learn/wrapping-an-openapi-service.md): How to turn a REST API with an OpenAPI description into FrontMCP tools with the OpenAPI adapter, what each call sends and returns, how to give the adapter the API's credentials, how to choose and name the operations the model sees, and when an API is too big for one tool per operation. - [Testing and Shipping](https://frontmcp.dev/learn/testing-and-shipping.md): How to test a FrontMCP server end to end with @frontmcp/testing, deploy it somewhere clients can reach, and run several instances of it behind a load balancer. - [Testing Your Server](https://frontmcp.dev/learn/testing-your-server.md): End-to-end tests for a FrontMCP server with @frontmcp/testing. The mcp fixture, the MCP matchers, reading results, testing errors, elicitation, plugins and hooks, and running tests with frontmcp test. - [Deploying Your Server](https://frontmcp.dev/learn/deploying-your-server.md): How to take a FrontMCP server from frontmcp build to a running server clients can reach. Choosing a target, the endpoint path, production mode and its secrets, running in a container, health checks, and connecting a client. - [Running Several Instances](https://frontmcp.dev/learn/running-several-instances.md): What several copies of a FrontMCP server behind a load balancer must share. Per-instance memory, what clients on MCP 2026-07-28 need and what older clients need, the secrets every instance shares, sharing sessions and rate limits through Redis, and the traps to avoid. - [Escape Hatches](https://frontmcp.dev/learn/escape-hatches.md): Stepping outside FrontMCP's declarative model when you have to. Reading the request behind a call, calling other services from a tool, and running FrontMCP without its built-in server. - [Reading the Request](https://frontmcp.dev/learn/reading-the-request.md): What a tool can learn about the call it's handling beyond its input, like the request id, the trace, the caller and the client, and which of those a client can simply make up. - [Calling Other Services](https://frontmcp.dev/learn/calling-other-services.md): How a tool calls an HTTP API with this.fetch(), what it adds to each request, whose credentials it sends, and how to turn a slow or failing service into errors the model can act on. - [Running FrontMCP Anywhere](https://frontmcp.dev/learn/running-frontmcp-anywhere.md): The entry points under @FrontMcp's built-in server. createFetchHandler() serves MCP from Workers and other web-standard runtimes, and connect() and createDirect() call your tools in-process. ## Reference - [Overview](https://frontmcp.dev/reference.md): The FrontMCP API reference for TypeScript MCP servers, from decorators and contexts to auth, plugins, testing and deployment, checked against the SDK it describes, with a runnable example for everything that can run in a browser. - [SDK overview](https://frontmcp.dev/reference/sdk.md): The decorators that declare what a FrontMCP server exposes, the context members your code calls inside a tool, resource or prompt, and the entry points that run a server over HTTP, in a Worker or in your own process. - [@FrontMcp](https://frontmcp.dev/reference/sdk/frontmcp.md): Declare an MCP server, the apps it hosts, and the settings that apply to all of them. - [@App](https://frontmcp.dev/reference/sdk/app.md): Group related tools, resources, prompts and providers into an app that a FrontMCP server hosts. - [@Tool](https://frontmcp.dev/reference/sdk/tool.md): Declare a function an AI model can call, with validated input and optional structured output. - [@Resource](https://frontmcp.dev/reference/sdk/resource.md): Declare data at a fixed URI that clients can list and read, like a policy document or a settings file. - [@ResourceTemplate](https://frontmcp.dev/reference/sdk/resource-template.md): Declare a family of resources whose URIs follow a pattern, like ticket://{id}, and read the parameters from the URI. - [@Prompt](https://frontmcp.dev/reference/sdk/prompt.md): Declare a reusable message template that users pick in their client and fill in with arguments. - [@Provider](https://frontmcp.dev/reference/sdk/provider.md): Declare a shared service, like a database client or a cache, that tools, resources and prompts get with this.get(). - [@Job](https://frontmcp.dev/reference/sdk/job.md): Declare a unit of work with validated input that clients run by name, while they wait or in the background, with retries. - [@Workflow](https://frontmcp.dev/reference/sdk/workflow.md): Chain jobs into steps that run in order or in parallel, each step's input built from the results of the steps before it. - [@Agent](https://frontmcp.dev/reference/sdk/agent.md): Declare an agent, a tool that runs its own model loop with its own instructions and tools, so a client's model can hand it a whole task in one call. - [@Skill](https://frontmcp.dev/reference/sdk/skill.md): Declare a skill, a written procedure with the tools it uses, that clients find and load for their model to follow. - [@Plugin](https://frontmcp.dev/reference/sdk/plugin.md): Package providers, tools, resources, prompts, skills and hooks into a plugin that an app or a whole server turns on with one line. - [@Adapter](https://frontmcp.dev/reference/sdk/adapter.md): Write an adapter, a class whose fetch() builds tools, resources and prompts from another source when the server starts, and can replace them while it runs. - [@Channel](https://frontmcp.dev/reference/sdk/channel.md): Push events into a connected Claude Code session as they happen, with @Channel. Sources, ChannelContext, emitting events from your code, two-way replies, hooks, and exactly what a client receives. - [Hook decorators](https://frontmcp.dev/reference/sdk/hooks.md): Run code before, after, around or inside a stage of every request with Will, Did, Around and Stage hooks. The flows and stages you can hook, priority and filter, what ctx can read and change, where hooks can be declared, and the order they run in. - [Context classes](https://frontmcp.dev/reference/sdk/contexts.md): What `this` is inside a tool, resource, prompt, agent, job, channel or skill, and every member each context class has. - [this.auth](https://frontmcp.dev/reference/sdk/auth.md): Who is calling a tool, resource, prompt, agent or job, with their scopes, roles and claims, and what each auth mode and entry point fills in. - [this.context](https://frontmcp.dev/reference/sdk/context.md): The request a call belongs to, with its id, trace, auth info and HTTP metadata, what each entry point fills in, and a store that lasts for the request. - [this.elicit](https://frontmcp.dev/reference/sdk/elicit.md): Ask the user for input in the middle of a tool call, and continue with their answer as typed data. - [this.progress](https://frontmcp.dev/reference/sdk/progress.md): Tell the client how far a long-running tool call has got, when the client asked for progress. - [this.notify](https://frontmcp.dev/reference/sdk/notify.md): Send log messages to the client while a tool runs, at the levels the client asked for. - [this.get](https://frontmcp.dev/reference/sdk/get.md): Get a provider, like a ticket store or your configuration, inside a tool, resource or prompt. - [this.fetch](https://frontmcp.dev/reference/sdk/fetch.md): Call other HTTP services from a tool or resource, with the request's tracing headers and a default timeout. - [this.fail](https://frontmcp.dev/reference/sdk/fail.md): End a tool call with an error the model can read, and choose the code it carries. - [this.callTool](https://frontmcp.dev/reference/sdk/call-tool.md): Call another tool of the same server from inside a tool, resource, prompt, agent or job, as the same caller, and handle what it returns or throws. - [this.respond](https://frontmcp.dev/reference/sdk/respond.md): End a tool call early with a result you built yourself, answer a call from a hook, and what respond() does in resources, prompts, jobs and agents. - [FrontMcpInstance](https://frontmcp.dev/reference/sdk/frontmcp-instance.md): The class that builds and runs a server from its @FrontMcp configuration, over HTTP, stdio, a Unix socket, a serverless handler or in-process. - [createFetchHandler()](https://frontmcp.dev/reference/sdk/create-fetch-handler.md): Serve an MCP server from any runtime that speaks web Request and Response, like Cloudflare Workers, Deno, Bun or a framework's route. - [create() and createDirect()](https://frontmcp.dev/reference/sdk/create.md): Build a server inside your own process and call its tools, resources, prompts and jobs as plain async functions, as a user you name. - [server.registerTool()](https://frontmcp.dev/reference/sdk/register-tool.md): Add a tool to a running create() or createDirect() server from code outside it, and remove it again; the 'webmcp' call surface; and scope.onDispose(), which runs code when the server is disposed. New in FrontMCP 1.9. - [connect() and client adapters](https://frontmcp.dev/reference/sdk/connect.md): Connect an MCP client to your server in memory, and get its tools and results in the shape Claude, OpenAI, LangChain or the Vercel AI SDK expects. - [Guard options](https://frontmcp.dev/reference/sdk/guard.md): Every FrontMCP option that limits tool calls, a tool's rateLimit, concurrency and timeout and @FrontMcp's throttle, whose calls each limit counts, and the error each one produces. - [Error classes](https://frontmcp.dev/reference/sdk/error-classes.md): The error classes of @frontmcp/sdk, grouped by area, with the code a client receives, whether its message survives production, and whether you throw it or FrontMCP does. - [Error codes](https://frontmcp.dev/reference/errors.md): What FrontMCP's JSON-RPC error codes and tool error results mean, and how to fix them. - [Scope and registries](https://frontmcp.dev/reference/sdk/scope.md): What this.scope gives a FrontMCP tool, resource or prompt, which registries you can list and search, what you can add at runtime, and which parts are FrontMCP's own machinery. - [Server overview](https://frontmcp.dev/reference/server.md): How a FrontMCP server is put together and configured: apps and their endpoints, configuration files and environment variables, the MCP revisions it speaks, background tasks, logging, tracing and metrics, apps loaded from npm or another MCP server, and the flows every request runs through. - [Apps, discovery and splitting](https://frontmcp.dev/reference/server/apps.md): How a FrontMCP server is built from apps, what clients see and discover, what happens when two apps use the same name, and how standalone apps and splitByApp give apps endpoints and auth of their own. - [Flows and stages](https://frontmcp.dev/reference/server/flows.md): Every request FrontMCP handles runs through named flows, each a fixed plan of stages. Every flow FrontMCP runs, with its stages in order and the state each one sets, how flows nest in one request, and how to write your own. - [Loading apps from npm (ESM)](https://frontmcp.dev/reference/server/esm.md): App.esm() loads a package's tools, resources and prompts from npm when the server starts, and runs them in your server's process. - [Remote servers](https://frontmcp.dev/reference/server/remote.md): App.remote() mounts another MCP server as an app, so its tools, resources and prompts appear on your server and calls are forwarded to it. - [Protocol versions](https://frontmcp.dev/reference/server/protocol-versions.md): Which MCP revisions a FrontMCP server speaks on one endpoint, how it picks the revision for each request, and what changed in MCP 2026-07-28. - [Background tasks](https://frontmcp.dev/reference/server/tasks.md): Let a slow tool run as an MCP task, so the client gets a task id at once, polls for the result, answers the tool's questions and can cancel it. - [Configuration files](https://frontmcp.dev/reference/server/config-files.md): Every place a FrontMCP server takes settings from, the @FrontMcp options, the environment variables FrontMCP reads, .env and YAML files through ConfigPlugin, and the frontmcp.config file the CLI reads, and which one wins. - [Logging](https://frontmcp.dev/reference/server/logging.md): The server's own log — levels, where lines go, custom transports, request tags, and the line that matches an error ID. - [Observability and telemetry](https://frontmcp.dev/reference/server/observability.md): Trace every request with OpenTelemetry, add your own spans and counters, serve /metrics, and answer health checks. - [Environment awareness](https://frontmcp.dev/reference/server/environment.md): Offer a tool, resource or prompt only on some runtimes, platforms or deployments with availableWhen, and branch on where the server runs with this.runtimeContext. - [Authentication overview](https://frontmcp.dev/reference/auth.md): How a FrontMCP server authenticates MCP clients and decides what each caller may do: auth modes, tokens and sessions, OAuth sign-in, access rules on tools, resources and prompts, and running it in production. - [Auth modes](https://frontmcp.dev/reference/auth/modes.md): The five ways a FrontMCP server decides who may connect, what each one advertises and answers without credentials, who your code sees as the caller, how anonymous access works, and how to choose. - [Tokens and sessions](https://frontmcp.dev/reference/auth/tokens.md): How FrontMCP checks the credential on every request (JWTs from your identity provider, tokens it issued itself, static keys), what your code gets from a token, the sessions older clients keep, what happens when a token expires, and every error a client can get. - [Local auth](https://frontmcp.dev/reference/auth/local.md): FrontMCP as its own OAuth 2.1 authorization server, with auth mode local: every option, the endpoints it serves, the flow a client follows, and what its tokens hold. - [Custom login UI](https://frontmcp.dev/reference/auth/login-ui.md): The sign-in, consent and error pages FrontMCP serves in local mode, how to change or replace them, what data each one gets, and what protects them. - [Progressive auth](https://frontmcp.dev/reference/auth/progressive.md): Letting a signed-in user start with part of a local-mode server and grant more when a tool needs it: app grants with incremental authorization tickets, credentials connected mid-session, and tool consent. - [Remote and proxied auth](https://frontmcp.dev/reference/auth/remote.md): mode: "remote" puts FrontMCP between MCP clients and your identity provider: users sign in at the provider, and FrontMCP issues the tokens clients send. Every option, what tools see, and what FrontMCP checks. - [Upstream providers](https://frontmcp.dev/reference/auth/upstream-providers.md): Linking several OAuth providers in one local-mode sign-in: auth.providers, the provider picker, federatedAuth, the callback each provider returns to, and reading each provider's token in a tool. - [Client ID metadata (CIMD)](https://frontmcp.dev/reference/auth/cimd.md): How FrontMCP accepts MCP clients whose client_id is the URL of a metadata document instead of a registration, what it fetches and checks, caching, SSRF protection, every cimd option, and what happens with a bad document. - [Authorities](https://frontmcp.dev/reference/auth/authorities.md): Rules on tools, resources, prompts, skills and agents that decide who may call them, from roles, permissions, token claims, the call's arguments or your own code, and what a caller the rules refuse gets. - [Auth in production](https://frontmcp.dev/reference/auth/production.md): What to set and check before a FrontMCP server authenticates real users, from secrets, HTTPS and allowed hosts to token checks, what production hides, rate limits and several instances, and the gaps to work around. - [Plugins overview](https://frontmcp.dev/reference/plugins.md): The official FrontMCP plugins and the OpenAPI adapter, which package each one is in, how to install and register them, what they add to your server, and what to know before you use one, including ES module projects. - [Cache](https://frontmcp.dev/reference/plugins/cache.md): @frontmcp/plugin-cache answers repeated tool calls from a store instead of running the tool again. Every option, what the key is made of, who gets which entry, and what it caches and doesn't. - [Remember](https://frontmcp.dev/reference/plugins/remember.md): @frontmcp/plugin-remember gives tools an encrypted key-value memory, this.remember, in session, user, tool and global scopes, plus four tools that let the model remember things. Every option, what each scope keeps, and who can read it back. - [Approval](https://frontmcp.dev/reference/plugins/approval.md): @frontmcp/plugin-approval refuses to run a tool until an approval is recorded for the caller. Every option, how approvals are granted, revoked and expire, what the client sees, and what the gate does and doesn't enforce. - [Feature flags](https://frontmcp.dev/reference/plugins/feature-flags.md): @frontmcp/plugin-feature-flags hides tools, resources, prompts and skills while their flag is off, and refuses them when called. Every option, the static, LaunchDarkly, Split and Unleash adapters, per-user targeting, this.featureFlags, and what happens when the flag service fails. - [CodeCall](https://frontmcp.dev/reference/plugins/codecall.md): @frontmcp/plugin-codecall puts a large tool set behind a handful of meta-tools: the model searches for the tools it needs, reads their schemas, and calls them one at a time or from a short script that runs in a sandbox on the server. - [Skilled OpenAPI](https://frontmcp.dev/reference/plugins/skilled-openapi.md): SkilledOpenApiPlugin serves a REST API as skills from a bundle, behind three tools, search_skill, load_skill and run_workflow, instead of one tool per operation. Sources, the bundle format, every option, credentials, authorization, signing, the audit log, and what each check protects against. - [WebMCP](https://frontmcp.dev/reference/plugins/webmcp.md): @frontmcp/plugin-webmcp offers the tools of a FrontMCP server that runs in a web page to the agents in the user's browser, through WebMCP's document.modelContext. New in FrontMCP 1.9. - [OpenAPI adapter](https://frontmcp.dev/reference/adapters/openapi.md): OpenapiAdapter turns every operation of an OpenAPI 3 spec into a tool that calls your REST API. Every option, how arguments are checked, what a call sends and returns, credentials, transforms and spec polling. - [Tool UI](https://frontmcp.dev/reference/ui.md): A tool's ui option: the templates it takes, what FrontMCP adds to tools/list, tools/call and the ui://widget resource, each serving mode and the server and app defaults for it, the widget's Content Security Policy, and what changes about the result. - [Widget components](https://frontmcp.dev/reference/ui/components.md): Building a widget as a React file: how FrontMCP bundles it, the props and bridge hooks it gets from @frontmcp/ui/react, the MUI-based components, theme and renderers in @frontmcp/ui, and the React-free helpers in @frontmcp/uipack. - [Hosts and platforms](https://frontmcp.dev/reference/ui/hosts.md): How FrontMCP recognizes the client that calls a tool, what each platform gets, how the widget's bridge talks to MCP Apps hosts and the OpenAI Apps SDK, and how a widget's tool calls reach the server as the host's own. - [@frontmcp/react](https://frontmcp.dev/reference/react.md): @frontmcp/react runs a FrontMCP server in the same process as a React app and gives components hooks to call it. FrontMcpProvider, the client it connects, several servers, stores, and building it with Vite. - [React hooks](https://frontmcp.dev/reference/react/hooks.md): Every hook in @frontmcp/react: calling tools, reading resources and prompts, listing what the server has, live resources, registering tools and resources from components, and the hooks in /state, /api and /ai. - [React components](https://frontmcp.dev/reference/react/components.md): The components in @frontmcp/react: forms generated from tools and prompts, viewers for results, mcpComponent for UI a model fills in, DynamicRenderer, DOM resources, and the router bridge, with what each renders and where each falls short. - [test and the mcp client](https://frontmcp.dev/reference/testing.md): Test a FrontMCP server end to end, with a connected MCP client in every test and matchers that understand MCP results. - [Matchers](https://frontmcp.dev/reference/testing/matchers.md): The MCP and widget matchers @frontmcp/testing adds to expect, and the Jest matchers you can use with them in the Playground. - [Fixtures](https://frontmcp.dev/reference/testing/fixtures.md): The fixtures every @frontmcp/testing test receives, mcp, server and auth: how test.use() configures them, what each one offers, and when each is created and torn down. - [Interceptors and HTTP mocking](https://frontmcp.dev/reference/testing/interceptors.md): Fake what the test client sends and receives with mcp.mock and mcp.intercept, and the APIs your tools call with MockAPIServer and httpMock: every option, and which process each one works in. - [Testing authentication](https://frontmcp.dev/reference/testing/auth.md): Test a FrontMCP server that needs a token: the auth fixture's token factory, clients that call as a user, MockOAuthServer as the identity provider of transparent and remote servers, MockCimdServer for clients that sign in with a metadata URL, and a full sign-in, with what each auth mode accepts. - [Deployment overview](https://frontmcp.dev/reference/deployment.md): How to build a FrontMCP server and run it in production: Node and Docker, Vercel, AWS Lambda, Cloudflare Workers and @frontmcp/edge, state in Redis or SQLite, several instances behind a load balancer, health checks, security headers and connecting MCP clients. - [Production build](https://frontmcp.dev/reference/deployment/production-build.md): frontmcp build and its targets: what each one writes, what it bundles and what it leaves in node_modules, how the result runs, which endpoint path it serves, and when it's in production mode. - [Node.js and Docker](https://frontmcp.dev/reference/deployment/node.md): Run the node build of a FrontMCP server on a machine, in a Docker image, with Redis in Docker Compose, behind nginx, or on a Unix socket: what it needs, the environment it reads, how it stops, and what the generated Docker files do. - [Vercel](https://frontmcp.dev/reference/deployment/vercel.md): Deploy a FrontMCP server to Vercel with frontmcp build --target vercel: the files it writes, the vercel.json it makes, what the function serves, when it runs in production, and storing sessions in Vercel KV or Upstash. - [AWS Lambda](https://frontmcp.dev/reference/deployment/aws-lambda.md): Deploy a FrontMCP server to AWS Lambda with frontmcp build --target lambda: the handler it writes, what to deploy, NODE_ENV, the events it accepts, and storing sessions in Redis. - [Cloudflare Workers](https://frontmcp.dev/reference/deployment/cloudflare-workers.md): Deploy a FrontMCP server as a Cloudflare Worker with frontmcp build --target cloudflare: the entry and wrangler.toml it writes, secrets and bindings, when the Worker is in production, and the storage it takes and refuses. - [@frontmcp/edge](https://frontmcp.dev/reference/deployment/edge.md): createEdgeMcp() runs a FrontMCP server on Cloudflare Workers from a plain configuration, bundled by wrangler with no frontmcp build and no decorators: what it serves, sessions in a Durable Object, managed mode, and how it differs from the cloudflare build target. - [Browser](https://frontmcp.dev/reference/deployment/browser.md): Running a FrontMCP server inside a web page or a Web Worker: the SDK's browser build, the entry points that never listen, what works there and what needs Node, keeping keys in IndexedDB or localStorage, and calling a model from the page. - [Redis](https://frontmcp.dev/reference/deployment/redis.md): The @FrontMcp redis option: its fields, what FrontMCP keeps in Redis and under which keys, how long sessions last, what doesn't use it, and what happens when Redis can't be reached. - [SQLite](https://frontmcp.dev/reference/deployment/sqlite.md): The @FrontMcp sqlite option: keep sessions, background tasks and pending questions in a SQLite file on one machine, with the packages it needs, where the file goes, what it stores, locking, and encryption. - [High availability](https://frontmcp.dev/reference/deployment/high-availability.md): Run a FrontMCP server as several instances behind a load balancer: what they must share, how an older client's session moves between them through Redis, machine ids, and what distributed mode does: relaying a session's requests to its instance, and taking over the sessions of a stopped one. - [Health checks and metrics](https://frontmcp.dev/reference/deployment/health-and-metrics.md): What /healthz, /readyz and /metrics answer on each FrontMCP runtime, and how to point container health checks, Kubernetes probes, load balancers and Prometheus at them. - [Security headers and transport](https://frontmcp.dev/reference/deployment/security.md): What FrontMCP does at the HTTP layer: the security headers it sends and how to turn on HSTS and a CSP, bind address and host checks, body size limits, the endpoints the Node server exposes, and the startup audit. - [Connecting MCP clients](https://frontmcp.dev/reference/deployment/mcp-clients.md): How MCP clients reach a FrontMCP server: by URL over Streamable HTTP, by starting it over stdio, or over a Unix socket; the commands that serve stdio; publishing a server to npm for npx; client snippets from the CLI; and what the MCP Bundle target produces. - [frontmcp CLI](https://frontmcp.dev/reference/cli.md): Every command and option of the frontmcp command-line tool: create, init, doctor, dev, build and its nine targets, test, inspector, the process and package managers, skills, mcpb, eject-mcp-config, plugin and your own project commands, with their output, exit codes and the files they read. - [Nx plugin](https://frontmcp.dev/reference/nx.md): @frontmcp/nx adds 21 generators and 7 executors to an Nx workspace. What it adds, the two ways to install it, the workspace layout it expects, and what to change in an older workspace. - [Nx generators](https://frontmcp.dev/reference/nx/generators.md): Every generator in @frontmcp/nx, with its options, the files it writes, and what its output does: init, workspace, app, lib and server; the thirteen component generators; and the three UI generators. - [Nx executors](https://frontmcp.dev/reference/nx/executors.md): Every executor in @frontmcp/nx (build, build-exec, dev, serve, test, inspector and deploy): the options each takes, the command it runs, what is cached, and how to run an app's tests and build it for another target. - [Monorepo patterns](https://frontmcp.dev/reference/nx/monorepo.md): How to lay out a FrontMCP Nx workspace with @frontmcp/nx: apps, shared libraries and server shells, composing several apps into one server, building it, tags and affected projects, and moving a standalone project in. Each pattern was run in a real workspace. - [Rules of FrontMCP](https://frontmcp.dev/reference/rules.md): The short list of rules that keep FrontMCP servers correct, safe and easy for models to use. ## Examples - [All examples](https://frontmcp.dev/examples.md): Complete MCP servers in TypeScript, built with FrontMCP, that you can run in your browser, each with its tests and a walkthrough of how it's built. - [Nightly Ticket Report](https://frontmcp.dev/examples/nightly-ticket-report.md): A help desk server that builds a daily SLA report with a workflow, a job per step, started in the background by a tool and read back by another. - [Triage Agent](https://frontmcp.dev/examples/triage-agent.md): A help desk server whose triage agent reads a new ticket, looks up the customer and related tickets, then sets the priority and the team, with a skill that tells a client's model how to triage a whole queue with it. - [Research Assistant](https://frontmcp.dev/examples/research-assistant.md): A help desk server whose research agent answers a hard question from knowledge-base articles and closed tickets, by handing the searching to another agent and returning only claims that cite the sources it was given. - [Order Tracker Widget](https://frontmcp.dev/examples/order-tracker-widget.md): A help desk server whose track_order tool answers the model with an order and its shipping timeline, and shows a support agent the same timeline as a widget with buttons that call tools back and update it. - [Expense Dashboard](https://frontmcp.dev/examples/expense-dashboard.md): A help desk server whose expense_report tool answers the model with what support spent in a month and shows the team lead the same numbers as a static dashboard widget, with filters that call the tool for another month or team. - [CRM with CodeCall](https://frontmcp.dev/examples/crm-with-codecall.md): A help desk's CRM server with 47 tools, put behind the CodeCall plugin so a model searches for the tools it needs, reads their schemas, and answers a question that spans customers, tickets and accounts with one script. - [Pet Store from OpenAPI](https://frontmcp.dev/examples/pet-store-from-openapi.md): A help desk server that wraps the classic Swagger Petstore API with the OpenAPI adapter, then makes its tools fit for a model with clear names and descriptions, keys sent by the server, no writes, errors that say what to do next, and a search tool of its own. ## Compare - [Overview](https://frontmcp.dev/compare.md): How the TypeScript MCP frameworks compare: FrontMCP, the official MCP TypeScript SDK, FastMCP, mcp-framework, mcp-use and xmcp, and when to choose each. - [vs the official SDK](https://frontmcp.dev/compare/official-typescript-sdk.md): How FrontMCP and the official MCP TypeScript SDK differ, what each is for, and when to use which. - [vs FastMCP (TypeScript)](https://frontmcp.dev/compare/fastmcp-typescript.md): How FrontMCP and FastMCP for TypeScript (punkpeye/fastmcp) differ in protocol support, tools, auth, testing and deployment, and when to choose each. - [vs mcp-framework](https://frontmcp.dev/compare/mcp-framework.md): How FrontMCP and mcp-framework differ in protocol support, tool classes, auth, testing and deployment, and when to choose each. - [vs mcp-use](https://frontmcp.dev/compare/mcp-use.md): How FrontMCP and the mcp-use TypeScript SDK differ as server frameworks, in protocol support, auth, widgets, testing and deployment, and when to choose each. - [vs xmcp](https://frontmcp.dev/compare/xmcp.md): How FrontMCP and xmcp differ in protocol support, tool declaration, auth, widgets and deployment, and when to choose each. ## Blog - [Your MCP Codebase Just Hit 50 Files. Here's How to Stop the Chaos.](https://frontmcp.dev/blog/nx-plugin.md): @frontmcp/nx brings monorepo-scale development to MCP servers — 16 generators, 7 executors, a 3-layer architecture, multi-platform deployment, and full Nx integration with caching, dependency graphs, and affected commands. - [Beyond Text: How to Render Rich UI Widgets from Your MCP Tools](https://frontmcp.dev/blog/tool-ui.md): Transform your MCP tool responses into interactive HTML widgets that work across ChatGPT, Claude, and other AI platforms—with type-safe templates, XSS protection, and automatic platform detection. - [Zero to Production: Deploy Your MCP Server to Vercel in 5 Minutes](https://frontmcp.dev/blog/deploy-to-vercel.md): A complete guide to deploying FrontMCP servers on Vercel's serverless infrastructure—including Vercel KV for sessions, edge-compatible patterns, and one-command deployment with automatic scaling. - [From 10 Lines to Autonomous Agents: How FrontMCP Turns Any Agent Into an MCP Tool](https://frontmcp.dev/blog/agent-as-tool.md): Learn how FrontMCP's Agent as Tool pattern transforms autonomous AI agents into standard MCP tools—enabling multi-agent orchestration, tool isolation, and LLM-agnostic execution with just a decorator. - [Your MCP Server Has 100 Tools. Here's Why That's Breaking Your AI Agent.](https://frontmcp.dev/blog/codecall-plugin.md): CodeCall solves the tool explosion problem that's costing you tokens, slowing your agents, and forcing you to build endpoints you shouldn't need. Open source. Self-hosted. Works with any LLM. - [The OpenAPI-to-MCP Security Nightmare You Didn't Know You Had](https://frontmcp.dev/blog/openapi-mcp-security.md): Why most OpenAPI-to-MCP tools are leaking your credentials, mixing headers between requests, and routing your customer tokens through someone else's cloud—and how to fix it. - [Stop Spawning MCP Servers for Every Agent](https://frontmcp.dev/blog/mcp-run-out-of-socket.md): One server, many agents. How FrontMCP makes multi-agent, multi-app MCP servers the default—with sessions, scoping, auth, DI, and decorators. - [Introducing FrontMCP](https://frontmcp.dev/blog/introducing-frontmcp.md): The TypeScript-first framework for building production-grade MCP servers with decorators, DI, and Streamable HTTP.