Nest

Data and AI

A NestJS module to effortlessly create Model Context Protocol (MCP) servers for exposing AI tools, resources, and prompts.

Your AI app calls the Nest MCP server, which does the data and AI work and sends the result back to the chat.

About Nest

Nest is a community MCP server from rekog-labs, filed in our directory under data and ai. A NestJS module to effortlessly create Model Context Protocol (MCP) servers for exposing AI tools, resources, and prompts.

At a glance

Publisher
rekog-labs (community)
Runs
See the README for setup
Written in
TypeScript
License
MIT
GitHub stars
735

How to set up Nest

  1. Follow the install steps in the Nest README; it is written in TypeScript, so have that toolchain ready.
  2. Check the Nest README for keys or settings; the registry lists none that Nest requires.
  3. Add Nest to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Nest tools to confirm the connection.
  5. Run one read-only task with Nest first, and keep your app asking before each tool call until the results look right.

Nest compared with similar servers

  • Just Prompt by disler has fewer GitHub stars than Nest (734 against 735); both are community servers, and both run locally.
  • Memora by agentic-box has more GitHub stars than Nest (752 against 735); both are community servers, and both run locally.
  • Passage Of Time by jlumbroso has fewer GitHub stars than Nest (721 against 735); both are community servers, and both run locally.

Before you connect Nest

  • Give Nest its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Nest tool call until you trust what it does with them.
  • Treat text that Nest fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Nest on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Nest

How marketing and sales teams put Nest to work, by company size. Pick the size closest to yours and start Nest on one use case.

Small business

  • A small team can use Nest to clean and enrich a lead list or a spreadsheet in one pass, instead of hours of copy and paste.
  • Owners can ask Nest to sort feedback, reviews or survey answers into themes and see what customers mention most.
  • Nest runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Marketing ops can connect Nest to enrich and score inbound leads, so sales sees fit and intent before the first call.
  • Content and research teams can use Nest to analyze transcripts and surveys at scale and pull the quotes worth using.
  • Start Nest on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises can run Nest inside their own cloud and data boundary, so models and data stay where governance requires.
  • Large teams can use Nest in batch pipelines with evaluation and logging, so AI output is measured before it reaches customers.
  • Nest is a community server, so have security review the code and pin a version before Nest touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Nest README

From rekog-labs/MCP-Nest on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

NestJS MCP Server Module

A NestJS module to effortlessly expose tools, resources, and prompts for AI, from your NestJS applications using the Model Context Protocol (MCP).

With @rekog/mcp-nest you define tools, resources, and prompts in a way that's familiar in NestJS and leverage the full power of dependency injection to utilize your existing codebase in building complex enterprise ready MCP servers.

Features

  • 🧩 NestJS Microservice Strategy: MCP runs as a CustomTransportStrategy, so tools/resources/prompts are real @MessagePattern handlers, guards, pipes, interceptors, and exception filters apply to them natively
  • 🚀 Multi-Transport Support: Streamable HTTP and STDIO, selected via the transports array
  • 🕰️ Dual-Era Protocol Support: One endpoint serves both the 2025-era protocol (initialize + sessions) and the stateless 2026-07-28 revision, concurrently, with no change to your tool code
  • 🔧 Tools: Expose NestJS methods as MCP tools with automatic discovery and Zod validation
  • 📁 Resources: Serve content and data through MCP resource system
  • 📚 Resource Templates: Dynamic resources with parameterized URIs
  • 💬 Prompts: Define reusable prompt templates for AI interactions
  • 🎓 Skills: Ship Agent Skills with your server (the MCP Skills extension, SEP-2640), point at a folder or define one in code
  • 🔐 Guard-based Authentication: Guard-based security with OAuth support
  • 🏠 Built-in Authorization Server, Using the built-in Authorization Server for easy setups. (Beta)
  • 🌐 External Authorization Server, Securing your MCP server with an external authorization server (Keycloak, Auth0, etc).
  • 💉 Dependency Injection: Leverage NestJS DI system throughout MCP components
  • 🔍 Server mutation and instrumentation, Mutate the underlying mcp server for custom logic or instrumentation purposes.

Are you interested to build ChatGPT widgets (with the OpenAI SDK) or MCP apps? Find out how to do that with @rekog/MCP-Nest in this repository MCP-Nest-Samples

[!TIP] You can easily learn about this package using the chat tab in Context7. Better yet, connect the Context7 MCP server to allow your AI agents to access the documentation and implement MCP-Nest for you.

Installation

npm install @rekog/mcp-nest \
  @modelcontextprotocol/server \
  @modelcontextprotocol/core \
  @modelcontextprotocol/node \
  zod@^4
Optional dependencies

The built-in authorization server now lives in a separate package. If you use it, install it alongside @rekog/mcp-nest:

npm install @rekog/mcp-nest-auth

If you additionally use the TypeORM store for the authorization server, install the following optional peer dependencies as well:

npm install @nestjs/typeorm typeorm

Quick Start

MCP-Nest runs as a NestJS microservice transport strategy. Tools, resources, and prompts live on @McpController() classes (so NestJS guards, pipes, interceptors, and exception filters apply to them), and the strategy serves them over one or more transports (Streamable HTTP, STDIO).

// greeting.controller.ts
import { McpController, Tool, McpContext } from '@rekog/mcp-nest';
import { Ctx, Payload } from '@nestjs/microservices';
import { z } from 'zod';

@McpController()
export class GreetingController {
  @Tool({
    name: 'greeting-tool',
    description: 'Returns a greeting with progress updates',
    parameters: z.object({ name: z.string().default('World') }),
  })
  async sayHello(
    @Payload() { name }: { name: string },
    @Ctx() ctx: McpContext,
  ) {
    await ctx.reportProgress({ progress: 50, total: 100 });
    return { content: [{ type: 'text', text: `Hello, ${name}!` }] };
  }
}
// app.module.ts
import { Module } from '@nestjs/common';
import {
  McpStrategy,
  MCP_STRATEGY,
  StreamableHttpTransport,
} from '@rekog/mcp-nest';
import { GreetingController } from './greeting.controller';

// The strategy is the whole configuration, there is no McpModule.
export const mcp = new McpStrategy({
  name: 'my-mcp-server',
  version: '1.0.0',
  transports: [
    new StreamableHttpTransport(),
  ],
});

@Module({
  controllers: [GreetingController],
  // Optional: only needed if a provider injects the strategy (e.g. for
  // runtime/dynamic tool registration).
  providers: [{ provide: MCP_STRATEGY, useValue: mcp }],
})
export class AppModule {}
// main.ts
import { NestFactory } from '@nestjs/core';
import { AppModule, mcp } from './app.module';

async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  mcp.setHttpAdapter(app.getHttpAdapter()); // needed for HTTP transports
  app.connectMicroservice({ strategy: mcp });
  await app.startAllMicroservices(); // mounts the MCP transports
  await app.listen(3000); // also serves your normal HTTP routes
}
void bootstrap();

Order matters: call startAllMicroservices() before listen() so the MCP HTTP routes are mounted before the server starts accepting connections.

That /mcp endpoint is dual-era: it answers both the 2025-era protocol (initialize handshake + sessions) and the stateless 2026-07-28 revision, concurrently, from the same @Tool methods. ctx.reportProgress(...) above reaches a 2026-07-28 client as-is, every modern request can stream progress back even though it is sessionless. A 2025-era client needs a session-aware transport for it (new StreamableHttpTransport({ statefulMode: true }) or StdioTransport); on the legacy stateless default it is a no-op. See Protocol Revisions.

For an STDIO-only server, skip the HTTP adapter and use NestFactory.createMicroservice(AppModule, { strategy: mcp }) with transports: [new StdioTransport()] and disable logging (stdout is reserved for the protocol).

Documentation

Examples

The examples directory contains working examples for all features. Refer to examples/README.md for details.

Questions about Nest

What is the Nest MCP server?

A NestJS module to effortlessly create Model Context Protocol (MCP) servers for exposing AI tools, resources, and prompts. Nest is maintained by rekog-labs on GitHub at rekog-labs/MCP-Nest, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Nest MCP server?

Nest doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (rekog-labs/MCP-Nest). Like most servers, Nest ends with a command or URL you paste into your AI app's MCP config.

Does Nest need an API key?

The registry lists no required keys for Nest. Check the Nest README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Nest an official MCP server?

No. Nest is a community server maintained by rekog-labs. Community servers can be excellent; read the code and the open issues before you give Nest access to company data.

What license is Nest under?

Nest is released under the MIT license, according to its GitHub repository. The license covers the code of Nest; the service it connects to has its own terms.