# FrontMCP vs @nestjs/mcp

> How FrontMCP and @nestjs/mcp, the NestJS team's MCP module, differ in protocol support, sessions, auth, testing and deployment, and when to choose each.

Source: https://frontmcp.dev/compare/nestjs-mcp

[Checked against FrontMCP 1.15.2](https://frontmcp.dev/versions#how-pages-are-checked) on December 4, 2026

`@nestjs/mcp` is the NestJS team's module for serving MCP from a Nest application: tools, resources and prompts are methods of your providers, declared with `@Tool()`, `@Resource()` and `@Prompt()`, and every call runs through Nest's guards, interceptors, pipes and exception filters. FrontMCP can run as its own server or [inside a Nest application](https://frontmcp.dev/reference/deployment/nestjs). It also declares tools with decorators, with a container for shared services and hooks around every call, and adds sessions for older clients, its own OAuth server, agents and jobs, widgets, a test library and builds for several platforms. This page shows the same tool in both and compares them on the criteria of the [comparison overview](https://frontmcp.dev/compare).

This site documents FrontMCP, so read it knowing who wrote it. Every `@nestjs/mcp` fact below comes from its README, source and release notes at **0.0.5**, its chapter of the NestJS documentation and its npm entry, checked on **2026-12-01**, and links to them. Every FrontMCP fact links to the page on this site that shows FrontMCP 1.15.2 doing it, or to [how this was checked](https://frontmcp.dev/compare/nestjs-mcp#how-this-was-checked).

<a id="quick-answer"></a>

## Quick answer

Choose `@nestjs/mcp` when you already run a NestJS application and want MCP inside it: tools that are methods of your providers, your guards, interceptors and filters around every call, and an endpoint at `/mcp` on the server you already deploy, stateless so it scales behind any load balancer, for clients of MCP 2026-07-28 and of the 2025 revisions. Choose FrontMCP when your clients on MCP 2025-11-25 or earlier need sessions, when you want the server to issue its own tokens, or when you want agents, jobs, widgets and a test library in the same framework.



---

<a id="what-nestjsmcp-is"></a>

## What @nestjs/mcp is

[`@nestjs/mcp`](https://github.com/nestjs/mcp) is developed in the NestJS organization on GitHub and published on npm as [`@nestjs/mcp`](https://www.npmjs.com/package/@nestjs/mcp), which names Kamil Mysliwiec as its author, with `nestjscore` and `kamilmysliwiec` as its maintainers. It's MIT-licensed ([LICENSE](https://github.com/nestjs/mcp/blob/0.0.5/LICENSE)). The repository was created on 2026-11-04, the day of its first release, 0.0.1; 0.0.5, the version checked here, came out on 2026-11-26 ([npm](https://www.npmjs.com/package/@nestjs/mcp?activeTab=versions), [release notes](https://github.com/nestjs/mcp/releases/tag/0.0.5)). Its documentation is a chapter of the NestJS docs, [Model Context Protocol](https://docs.nestjs.com/mcp/overview), with pages on [primitives](https://docs.nestjs.com/mcp/primitives), [transports](https://docs.nestjs.com/mcp/transports), [testing](https://docs.nestjs.com/mcp/testing) and [migrating from `@rekog/mcp-nest`](https://docs.nestjs.com/mcp/migration), and a tutorial, [Build an MCP server in Node.js](https://docs.nestjs.com/tutorials/mcp-server).

Its README describes it as a module in which "tools, resources and prompts are methods of your providers, declared with decorators and a schema (Zod, ArkType, Valibot or JSON Schema), and run through Nest's guards, interceptors, pipes and exception filters", served over Streamable HTTP "from your existing Nest application (Express, Fastify or the Node adapter), statelessly so it scales behind any load balancer, to clients of both the 2026-07-28 and the 2025 protocol revisions, and over stdio from a standalone application context" ([README](https://github.com/nestjs/mcp/blob/0.0.5/README.md?plain=1#L26)).

It's built on the official SDK, v2: its `package.json` asks for `@modelcontextprotocol/server` `^2.4.0`, which installed 2.4.0 on 2026-12-01, for NestJS 12 (`@nestjs/common` and `@nestjs/core` `^12.0.0`), `reflect-metadata` and `rxjs` as peer dependencies, and for Node 20.19 or later ([`package.json`](https://github.com/nestjs/mcp/blob/0.0.5/package.json?plain=1#L35-L90)). The project is at 0.0.x, and its migration page lists what this version doesn't do: the HTTP+SSE transport, sessions, registering tools at runtime, several MCP servers in one application and request-scoped providers ([What's not there](https://docs.nestjs.com/mcp/migration#whats-not-there)).

On 2026-12-01, `nestjs/mcp` had 19 GitHub stars ([GitHub API](https://api.github.com/repos/nestjs/mcp)) and 29,905 npm downloads in the week of 2026-11-23 to 2026-11-29 ([npm API](https://api.npmjs.org/downloads/point/2026-11-23:2026-11-29/@nestjs/mcp)). FrontMCP had 154 stars and 12,061 downloads of `@frontmcp/sdk` in the same week. `@nestjs/mcp` is under a month old, and was downloaded more than twice as often as `@frontmcp/sdk` that week.

<a id="the-same-tool-in-both"></a>

## The same tool in both

One tool, `add`, that takes two numbers and returns their sum, called with `{ "a": 2, "b": 3 }`.

<a id="in-nestjsmcp"></a>

### In @nestjs/mcp

We created a project with the Nest CLI 12.0.15, `nest new add-server --minimal`, as the tutorial's [Create the project](https://docs.nestjs.com/tutorials/mcp-server#create-the-project) does, and installed the packages the README's [Installation](https://github.com/nestjs/mcp/blob/0.0.5/README.md#installation) names: `npm i --save @nestjs/mcp @modelcontextprotocol/server zod`. We then replaced the scaffold's `src/main.ts` with the README's [Quick Start](https://github.com/nestjs/mcp/blob/0.0.5/README.md#quick-start), a provider with a decorated method and a module that imports `McpModule`, and the `main.ts` of the docs' [Register the module](https://docs.nestjs.com/mcp/overview#register-the-module):

```ts src/calculator.tools.ts
import { Injectable } from '@nestjs/common';
import { Tool } from '@nestjs/mcp';
import * as z from 'zod';

@Injectable()
export class CalculatorTools {
  @Tool({
    name: 'add',
    description: 'Add two numbers',
    inputSchema: z.object({ a: z.number(), b: z.number() }),
  })
  add({ a, b }: { a: number; b: number }) {
    return a + b;
  }
}
```

```ts src/app.module.ts
import { Module } from '@nestjs/common';
import { McpModule } from '@nestjs/mcp';
import { CalculatorTools } from './calculator.tools.js';

@Module({
  imports: [McpModule.forRoot({ name: 'calc', version: '1.0.0' })],
  providers: [CalculatorTools],
})
export class AppModule {}
```

```ts src/main.ts
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module.js';

async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  await app.listen(3000);
}
bootstrap();
```

For stdio, a second entry point serves the same module from a standalone application context, as [Over stdio](https://docs.nestjs.com/mcp/transports#over-stdio) shows. `McpStdioLogger` sends Nest's log to stderr, since stdout carries the protocol:

```ts src/stdio.ts
import { NestFactory } from '@nestjs/core';
import { McpStdioLogger, McpStdioServer } from '@nestjs/mcp';
import { AppModule } from './app.module.js';

async function bootstrap() {
  const app = await NestFactory.createApplicationContext(AppModule, {
    logger: new McpStdioLogger(),
  });
  await app.get(McpStdioServer).listen();
  await app.close();
}
bootstrap();
```

`npm run build` compiled both, and `node dist/main.js` started the Express application, whose log listed `McpController {/mcp}`. A client from `@modelcontextprotocol/client` 2.4.0 called `add` at `http://127.0.0.1:3000/mcp` and over `node dist/stdio.js`, once with its default, which opens a 2025-era connection with `initialize`, and once with `versionNegotiation: { mode: "auto" }`, which asks for 2026-07-28 first:

```text
http  legacy 2025-11-25 {"content":[{"type":"text","text":"5"}]}
http  modern 2026-07-28 {"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"calc","version":"1.0.0"}},"content":[{"type":"text","text":"5"}]}
stdio legacy 2025-11-25 {"content":[{"type":"text","text":"5"}]}
stdio modern 2026-07-28 {"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"calc","version":"1.0.0"}},"content":[{"type":"text","text":"5"}]}
```

The number came back as text, as the docs' [Tools](https://docs.nestjs.com/mcp/primitives#tools) table says for a value without an `outputSchema`. Called with `{ "a": "2", "b": 3 }`, `add` returned a tool error, `Input validation error: Invalid arguments for tool add: a: Invalid input: expected number, received string`, and the method didn't run. The `--minimal` scaffold also installs the NestJS Observe SDK, `@nestjs/observe`, and wires it into the file we replaced; we uninstalled it, so the project has only what MCP needs.

<a id="in-frontmcp"></a>

### In FrontMCP

The same tool, in a one-app FrontMCP server. The Playground runs it and calls `add`; the **Tests** tab runs the checks below it.

Initial call configuration:

```js
{ tool: "add", arguments: { a: 2, b: 3 } }
```

```ts main.ts active
import { App, FrontMcp, Tool, ToolContext, z } from "@frontmcp/sdk";

@Tool({
  name: "add",
  description: "Add two numbers",
  inputSchema: { a: z.number(), b: z.number() },
})
export class Add extends ToolContext {
  async execute({ a, b }: { a: number; b: number }) {
    return { sum: a + b };
  }
}

@App({ id: "calc", name: "Calculator", tools: [Add] })
export class CalcApp {}

@FrontMcp({ info: { name: "calc", version: "1.0.0" }, apps: [CalcApp] })
export default class Server {}
```

```ts add.test.ts
import { test, expect } from "@frontmcp/testing";

test("adds two numbers", async ({ mcp }) => {
  const result = await mcp.tools.call("add", { a: 2, b: 3 });
  expect(result).toBeSuccessful();
  expect(result.json()).toEqual({ sum: 5 });
});

test("rejects a string where a number belongs", async ({ mcp }) => {
  const result = await mcp.tools.call("add", { a: "2", b: 3 });
  expect(result).toBeError("INVALID_INPUT");
});
```

The two look alike: a decorator, a Zod schema, and a module or an app that lists the tool. In `@nestjs/mcp` the tool is a method of a Nest provider, and the server is the Nest application; in FrontMCP it's a class in an app of a FrontMCP server, which runs as its own process. FrontMCP returns the object as `structuredContent` with a text copy ([Your First Tool](https://frontmcp.dev/learn/your-first-tool#returning-results-and-errors)); `@nestjs/mcp` does the same for a tool with an `outputSchema`. FrontMCP needs Node 24 or later and TypeScript's decorator settings ([Installation](https://frontmcp.dev/learn/installation)), and [`frontmcp dev`](https://frontmcp.dev/reference/cli#frontmcp-dev) runs it; `@nestjs/mcp` needs Node 20.19 or later.

On 2026-12-01, in empty projects, the README's `npm install @nestjs/mcp@0.0.5 @modelcontextprotocol/server zod` added 26 packages, npm installing its peers `@nestjs/common`, `@nestjs/core`, `reflect-metadata` and `rxjs` with it. A Nest application also needs an HTTP platform: with `@nestjs/platform-express`, the one `nest new` installs, it was 99 packages, and with `@nestjs/platform-node` 95. `npm install @frontmcp/sdk` added 128.

<a id="side-by-side"></a>

## Side by side

| | @nestjs/mcp 0.0.5 | FrontMCP 1.15.2 |
| --- | --- | --- |
| MCP revisions served | 2024-11-05 to 2026-07-28 over Streamable HTTP and stdio, in our run and in the docs, with no session for the older four over HTTP ([The HTTP endpoint](https://docs.nestjs.com/mcp/transports#the-http-endpoint), [Over stdio](https://docs.nestjs.com/mcp/transports#over-stdio)). `legacy: 'reject'` serves 2026-07-28 only | 2024-11-05 to 2026-07-28 over Streamable HTTP and stdio (except 2026-07-28 on [stdio servers with channels](https://frontmcp.dev/reference/server/protocol-versions#a-stdio-server-with-channels-declines-2026-07-28)), with a session for the older four ([Protocol versions](https://frontmcp.dev/reference/server/protocol-versions#revisions-over-stdio)) |
| Declaring a tool | `@Tool()` on a method of a provider, found at startup ([Tools](https://docs.nestjs.com/mcp/primitives#tools)) | A [`@Tool`](https://frontmcp.dev/reference/sdk/tool) class, or the `tool()` function |
| Schemas | Standard Schema that produces JSON Schema: Zod 4.2 or later, ArkType, Valibot through `toStandardJsonSchema()`, JSON Schema through the SDK's `fromJsonSchema()`; Zod 3 is refused at startup. `outputSchema` validates structured results ([Installation](https://docs.nestjs.com/mcp/overview#installation), [Tools](https://docs.nestjs.com/mcp/primitives#tools)) | Zod 4; `outputSchema` checks every result ([Schemas Are Contracts](https://frontmcp.dev/learn/schemas-are-contracts), [Shaping Tool Results](https://frontmcp.dev/learn/shaping-tool-results)) |
| Shared services | Nest's container: a tool's provider injects your services in its constructor. Request-scoped providers fail at startup; the request and the token are in the call's `ctx` ([How a call is served](https://docs.nestjs.com/mcp/overview#how-a-call-is-served), [Migration](https://docs.nestjs.com/mcp/migration#tools-resources-and-prompts)) | [`@Provider`](https://frontmcp.dev/reference/sdk/provider) services, injected in a constructor or read with `this.get()`, one per server or one per request or session ([Scopes](https://frontmcp.dev/reference/sdk/provider#scopes)) |
| Code around every call | Nest's guards, interceptors, pipes and exception filters, on the class, the method or global; `McpExecutionContext` reads the call ([Guards, interceptors, pipes and filters](https://docs.nestjs.com/mcp/primitives#guards-interceptors-pipes-and-filters)) | [Hooks](https://frontmcp.dev/reference/sdk/hooks) before, after and around each stage of a call, and [plugins](https://frontmcp.dev/reference/sdk/plugin) built from them |
| Auth | An OAuth 2.1 resource server: a token verifier you write (JWT or introspection), protected resource metadata, `WWW-Authenticate` challenges, `scopes` per tool, resource or prompt; it never issues tokens. Guards, such as an API key check, and `@nestjs/authentication` and `@nestjs/authorization` policies ([Authorization](https://docs.nestjs.com/mcp/primitives#authorization), [The HTTP endpoint](https://docs.nestjs.com/mcp/transports#the-http-endpoint)) | Five modes: public, static keys, JWTs from your identity provider, and FrontMCP as the OAuth server, with its own sign-in page or an upstream provider's ([Auth modes](https://frontmcp.dev/reference/auth/modes)); per-entry rules ([Authorities](https://frontmcp.dev/reference/auth/authorities)) |
| Asking the client for input | A tool returns `inputRequired()`, and the client calls it again with the answer: over HTTP for 2026-07-28 clients only, where a 2025 client gets a tool error; over stdio for both ([The call context](https://docs.nestjs.com/mcp/primitives#the-call-context)). Sampling and roots: not documented | [`this.elicit()`](https://frontmcp.dev/reference/sdk/elicit), which becomes `input_required` for 2026-07-28 clients; [`this.sample()` and `this.listRoots()`](https://frontmcp.dev/reference/sdk/contexts#thissample-and-thislistroots) for clients that offer them |
| Testing | `connectMcpClient()` from `@nestjs/mcp/testing`: the SDK's client, in memory, against a Nest testing module, through the token check, the schemas and the enhancers; `McpRegistry` to check every tool ([Testing](https://docs.nestjs.com/mcp/testing#the-in-memory-client)) | `@frontmcp/testing` with MCP matchers, run by `frontmcp test` ([Testing](https://frontmcp.dev/reference/testing)) |
| Resources, prompts, completions | Resources and templates, prompts ([Resources](https://docs.nestjs.com/mcp/primitives#resources), [Prompts](https://docs.nestjs.com/mcp/primitives#prompts)); completion: not documented | Resources and templates, prompts, completion of template parameters ([`@Resource`](https://frontmcp.dev/reference/sdk/resource), [`@Prompt`](https://frontmcp.dev/reference/sdk/prompt), [completers](https://frontmcp.dev/reference/sdk/resource-template#completing-parameters)) |
| Agents, jobs, workflows, tasks | Not documented | [`@Agent`](https://frontmcp.dev/reference/sdk/agent), [`@Job`](https://frontmcp.dev/reference/sdk/job), [`@Workflow`](https://frontmcp.dev/reference/sdk/workflow); [background tasks](https://frontmcp.dev/reference/server/tasks) |
| Widgets (MCP Apps) | Not documented | A tool's `ui` option, for MCP Apps hosts and the OpenAI Apps SDK ([Tool UI](https://frontmcp.dev/reference/ui), [Hosts](https://frontmcp.dev/reference/ui/hosts)) |
| Transports | Streamable HTTP, stateless, as a route of the Nest application; stdio, from a standalone application context; in memory, for tests. HTTP+SSE isn't served ([Transports](https://docs.nestjs.com/mcp/transports), [What's not there](https://docs.nestjs.com/mcp/migration#whats-not-there)) | Streamable HTTP with or without sessions, the older HTTP+SSE, stdio, a Unix socket, in-memory ([`FrontMcpInstance`](https://frontmcp.dev/reference/sdk/frontmcp-instance), [`transport`](https://frontmcp.dev/reference/sdk/frontmcp#transport)) |
| Runtimes and deployment | Node 20.19+; NestJS 12 on Express, Fastify or Nest's Node adapter ([README](https://github.com/nestjs/mcp/blob/0.0.5/README.md?plain=1#L26)). Served by your Nest application, on as many instances as you like with no session affinity ([How a call is served](https://docs.nestjs.com/mcp/overview#how-a-call-is-served)) | Node 24+; `frontmcp build` targets for Node, Vercel, AWS Lambda, Cloudflare Workers and a browser module ([Production build](https://frontmcp.dev/reference/deployment/production-build)); [`@frontmcp/edge`](https://frontmcp.dev/reference/deployment/edge) for Cloudflare Workers with Durable Object sessions; a fetch handler for other runtimes ([`createFetchHandler()`](https://frontmcp.dev/reference/sdk/create-fetch-handler)); [`FrontMcpModule`](https://frontmcp.dev/reference/deployment/nestjs) mounts on Nest Express or Fastify |
| CLI | No MCP CLI; the project comes from the Nest CLI, `nest new` ([Create the project](https://docs.nestjs.com/tutorials/mcp-server#create-the-project)), and the docs try it with the MCP Inspector ([Try it](https://docs.nestjs.com/mcp/primitives#try-it)) | `frontmcp create`, `dev`, `build`, `test`, `inspector` ([CLI](https://frontmcp.dev/reference/cli)); an [Nx plugin](https://frontmcp.dev/reference/nx) |
| License | [MIT](https://github.com/nestjs/mcp/blob/0.0.5/LICENSE) | [Apache-2.0](https://github.com/agentfront/frontmcp/blob/main/LICENSE) |

<a id="what-each-does-that-the-other-doesnt"></a>

## What each does that the other doesn't

What `@nestjs/mcp` documents, or did in our run, and this site doesn't show for FrontMCP:

- **Nest's enhancers on MCP calls**: the guards, interceptors, pipes and exception filters your routes use, a global `ValidationPipe` that validates a DTO class, and custom parameter decorators ([Guards, interceptors, pipes and filters](https://docs.nestjs.com/mcp/primitives#guards-interceptors-pipes-and-filters)). FrontMCP has [hooks](https://frontmcp.dev/reference/sdk/hooks) of its own.
- **Policies from `@nestjs/authentication` and `@nestjs/authorization`**: `@CurrentUser()` and `@Can()` on a tool, as on a route ([Authorization](https://docs.nestjs.com/mcp/primitives#authorization)).
- **A choice of schema library.** ArkType, Valibot and plain JSON Schema work as well as Zod. FrontMCP's pages use Zod 4 only.
- **NestJS Observe** names each MCP call in its traces, `tools/call find-order` rather than `POST /mcp`, with nothing to configure ([NestJS Observe](https://docs.nestjs.com/mcp/transports#nestjs-observe)).
- **Node 20.19 or later.** FrontMCP needs Node 24.
- **Install size in the 2026-12-01 check.** The Nest README command installed 26 packages, or 99 with Express. The separate `@frontmcp/sdk@1.14.0` install in that check added 128 packages.

What FrontMCP does that `@nestjs/mcp`'s docs don't document:

- **Sessions for clients on 2025-11-25 and earlier**, which [Redis](https://frontmcp.dev/reference/deployment/redis) can share between instances. `@nestjs/mcp` keeps none over HTTP, so it can't ask those clients for input during a call there ([What's not there](https://docs.nestjs.com/mcp/migration#whats-not-there)).
- **Requests from the server to the client**: [`this.sample()` and `this.listRoots()`](https://frontmcp.dev/reference/sdk/contexts#thissample-and-thislistroots) for clients that offer them, and [`this.elicit()`](https://frontmcp.dev/reference/sdk/elicit) over HTTP for clients of the 2025 revisions as well as 2026-07-28.
- **Services for one request or one session**: a `CONTEXT` [provider](https://frontmcp.dev/reference/sdk/provider#scopes) is new for each. `@nestjs/mcp` refuses request-scoped providers at startup.
- **An OAuth server**: in `local` mode FrontMCP issues the tokens and serves the sign-in page, and you check the user in `authenticate` ([Local auth](https://frontmcp.dev/reference/auth/local#checking-users-yourself)); in `remote` mode it signs users in at an upstream provider ([Remote and proxied auth](https://frontmcp.dev/reference/auth/remote)). `@nestjs/mcp` verifies tokens that an identity provider issues.
- **Completion** of resource template parameters ([completers](https://frontmcp.dev/reference/sdk/resource-template#completing-parameters)).
- **Agents, jobs, workflows and tasks**: [agents](https://frontmcp.dev/learn/your-first-agent) that run a model loop on the server, [jobs](https://frontmcp.dev/learn/your-first-job) that run in the background, [workflows](https://frontmcp.dev/learn/chaining-jobs-into-workflows) that chain them, and tools that run as [MCP tasks](https://frontmcp.dev/reference/server/tasks).
- **Widgets.** A tool's `ui` option renders an HTML or React widget for MCP Apps hosts and the OpenAI Apps SDK ([Your First Widget](https://frontmcp.dev/learn/your-first-widget)).
- **Plugins** for caching, memory, approval, feature flags and CodeCall ([Plugins and adapters](https://frontmcp.dev/reference/plugins)).
- **A test library** with MCP matchers and fixtures, run by `frontmcp test` ([Testing Your Server](https://frontmcp.dev/learn/testing-your-server)).
- **Project scaffolding and platform builds**: `frontmcp create`, and `frontmcp build` for Vercel, AWS Lambda and Cloudflare Workers ([Deploying Your Server](https://frontmcp.dev/learn/deploying-your-server)).

Both declare tools with decorators and validate arguments before your code runs, serve MCP 2026-07-28 and the 2025 revisions on one endpoint, check per tool who may call it (`@nestjs/mcp`'s [`scopes`](https://docs.nestjs.com/mcp/primitives#authorization) and FrontMCP's [authorities](https://frontmcp.dev/reference/auth/authorities)), and can leave tools out of a request's list: `@nestjs/mcp` with its [`filter`](https://docs.nestjs.com/mcp/primitives#per-request-visibility) option, new in 0.0.5, and FrontMCP with [authorities](https://frontmcp.dev/reference/auth/authorities) and [feature flags](https://frontmcp.dev/reference/plugins/feature-flags).

<a id="when-to-choose-nestjsmcp"></a>

## When to choose @nestjs/mcp

- You already run NestJS and want MCP inside it: the same application, the same deployment, an endpoint next to your routes, and tools that call your services through Nest's container.
- Your guards, interceptors, pipes and filters should apply to MCP calls as they do to routes, and your auth already lives in a guard or in `@nestjs/authentication` and `@nestjs/authorization`.
- Your identity provider issues the tokens, and the server only verifies them.
- Every request can stand on its own, and you scale the application across instances without session affinity.
- You want ArkType, Valibot or plain JSON Schema rather than Zod, or you're on Node 20 or 22.
- You want the module the NestJS team maintains and documents with the framework. It's at 0.0.x; its [migration page](https://docs.nestjs.com/mcp/migration#whats-not-there) lists what this version doesn't do yet.

<a id="when-to-choose-frontmcp"></a>

## When to choose FrontMCP

- You want FrontMCP apps, providers, hooks and plugins, either in a standalone service or mounted with [`FrontMcpModule`](https://frontmcp.dev/reference/deployment/nestjs).
- Your clients use MCP 2025-11-25 or earlier and need a session: a server that asks them for input, sampling or roots over HTTP, or several instances that share sessions ([Running Several Instances](https://frontmcp.dev/learn/running-several-instances)).
- You want the server to issue tokens itself, with its own sign-in page or [machine tokens](https://frontmcp.dev/reference/auth/local#issuing-a-machine-token).
- You want agents, background jobs, workflows, tasks or widgets from the same framework.
- You want tests written with a dedicated library, or a build for Vercel, AWS Lambda or Cloudflare Workers.

<a id="how-this-was-checked"></a>

## How this was checked

On 2026-12-01 we created a project with the Nest CLI 12.0.15, with Node 24.22.1 and npm 11.19.1, installed `@nestjs/mcp` 0.0.5, `@modelcontextprotocol/server` 2.4.0 and `zod` 4.6.7, with NestJS 12.6.3 on Express, built the code above with `nest build` (TypeScript 6.0.3), and called `add` over Streamable HTTP and stdio with `@modelcontextprotocol/client` 2.4.0. We then sent each server an `initialize` request for every MCP revision from 2024-11-05 to 2025-11-25, and the 2026-07-28 `server/discover` and `tools/call` requests, with the `MCP-Protocol-Version: 2026-07-28` header and the revision in `_meta`. Over HTTP and over stdio, all five answered and returned `5`; over HTTP the 2025-era `initialize` answers carried no `Mcp-Session-Id`, and `server/discover` listed only `2026-07-28` in `supportedVersions`. With `http: { legacy: 'reject' }` and `stdio: { legacy: 'reject' }`, the four older revisions got `-32022` `Unsupported protocol version` (with `400` over HTTP), and 2026-07-28 was still served. We didn't run it on Fastify or the Node adapter, or try OAuth.

FrontMCP serves all five revisions over Streamable HTTP and stdio, except [stdio servers with channels](https://frontmcp.dev/reference/server/protocol-versions#a-stdio-server-with-channels-declines-2026-07-28), which decline 2026-07-28. Its stdio router returns discovery and `resultType` results for 2026-07-28, and keeps `initialize` sessions for older clients. The [overview](https://frontmcp.dev/compare#how-this-was-checked) describes the method for every library.
