NestJS MCP Server Module

NestJS MCP Server Module is an MCP server that provides a framework integration module for building Model Context Protocol services directly within NestJS applications. Built for TypeScript and backend developers using NestJS, it connects internal business logic, databases, and microservices to AI clients by exposing tools, prompts, and resources. Developers can define tools using familiar decorators like @Tool and validate inputs via Zod schemas, while taking advantage of NestJS's dependency injection container. The module supports multiple transport layers, including Streamable HTTP, HTTP with Server-Sent Events (SSE), and STDIO. It also provides progress notifications during long operations, direct access to underlying Express request objects inside tools for contextual metadata, and endpoint security handled via native NestJS guards. This allows engineering teams to convert existing enterprise services into MCP-compliant interfaces without re-architecting their software infrastructure.

Category: AI & LLM Tooling

Tags: backend, framework, nestjs, typescript

Visit NestJS MCP Server Module

How to install and configure NestJS MCP Server Module

  1. Install the package alongside required dependencies in your NestJS project: bash npm install @rekog/mcp-nest @modelcontextprotocol/sdk zod 2. Import McpModule into your root application module: typescript import { Module } from '@nestjs/common'; import { McpModule, McpTransportType } from '@rekog/mcp-nest'; @Module({ imports: [ McpModule.forRoot({ name: 'my-mcp-server', version: '1.0.0', transport: McpTransportType.STDIO, }), ], }) export class AppModule {} 3. Build your project using your standard NestJS build scripts. 4. Register the compiled application with an MCP client such as Claude Desktop by adding it to your configuration file: json { "mcpServers": { "greeting": { "command": "node", "args": ["<path to dist js file>"] } } }

What you can do with NestJS MCP Server Module

  • Exposing internal NestJS services and database models as callable AI tools using standard dependency injection. - Validating input arguments for AI tool invocations at runtime using structured Zod schemas. - Streaming incremental progress notifications back to AI clients during time-consuming operations. - Securing AI tool endpoints and SSE streams using custom NestJS CanActivate authentication guards. - Serving tools across different transport modes including STDIO for local clients and HTTP+SSE for remote clients.

Key facts

  • Open Source
  • https://github.com/kyee-rs/MCP-Nest
  • AI & LLM Tooling, Developer Tools & Code Intelligence
  • backend, framework, nestjs, typescript

Part of MCP Servers

Related MCP servers

  • MCP LaTeX Server — MCP LaTeX Server is an MCP server that provides tools for creating, editing, validating, and compiling LaTeX documents directly through…
  • MCP JSON — MCP JSON is an MCP server collection that bundles tools for file system operations, Google search, browser-based web automation, and…
  • MCP Jupyter Complete — MCP Jupyter Complete is an MCP server that provides tools for manipulating Jupyter notebook files through position-based cell operations and…
  • MCP LSP Go — MCP LSP Go is an MCP server that connects AI assistants to the official Go Language Server Protocol implementation, gopls,…
  • MCP Memory Dashboard — MCP Memory Dashboard is an MCP server desktop interface that connects to the MCP Memory Service to provide visual semantic…
  • MCP Manager — MCP Manager is an MCP server management tool that connects directly to your Claude Desktop environment, enabling users to discover,…

What is NestJS MCP Server Module?

NestJS MCP Server Module is an open-source library that allows developers to build Model Context Protocol servers within NestJS applications. It exposes tools, resources, and prompts to AI agents using standard NestJS decorators and dependency injection.

How do I install NestJS MCP Server Module?

You can install it using npm by running npm install @rekog/mcp-nest @modelcontextprotocol/sdk zod. After installing, import McpModule.forRoot into your root module and register your tool classes as providers.

Which transports are supported by NestJS MCP Server Module?

The module supports three transport protocols: STDIO for local command-line operations, HTTP with Server-Sent Events (SSE), and Streamable HTTP, which supports both stateless execution and stateful session management.

How does authentication work in NestJS MCP Server Module?

Authentication is handled through native NestJS Guards. You can pass any standard CanActivate guard into the guards array option in McpModule.forRoot, which will protect endpoints like /sse and /messages.

Is NestJS MCP Server Module open source?

Yes, NestJS MCP Server Module is an open-source project hosted on GitHub under the repository kyee-rs/MCP-Nest and published to npm under the package name @rekog/mcp-nest.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories