NestJS MCP Server Module
@rahosung
About NestJS MCP Server Module
No overview available yet
Config
No standard config provided
This server doesn't expose a parseable MCP config block in its README. See the repository for install instructions.
RepositoryTools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is NestJS MCP Server Module?
It is a NestJS module that simplifies building an MCP (Model Context Protocol) server with Server-Sent Events (SSE) transport. It automatically discovers and registers tools and resources defined with decorators, and integrates Zod-based request validation, progress notifications, and NestJS guard authentication.
How to use NestJS MCP Server Module?
Install the package and its peer dependencies (npm install @rekog/mcp-nest @modelcontextprotocol/sdk zod), then import McpModule.forRoot in your root module with a server name and version. Decorate service methods with @Tool and @Resource to register tools and resources. Optionally apply NestJS guards for endpoint authentication.
Key features of NestJS MCP Server Module
- SSE transport for streaming tool execution and resource access
- Automatic tool and resource discovery via decorators
- Zod-based request validation for tool parameters
- Progress notifications during long-running operations
- Guard-based authentication on
/sseand/messagesendpoints
Use cases of NestJS MCP Server Module
- Building a secure MCP server within an existing NestJS application
- Streaming tool calls with real‑time progress updates to AI clients
- Exposing dynamic resources via URI templates with guard‑protected access
- Using MCP tool and resource discovery without manual route registration
FAQ from NestJS MCP Server Module
What is the difference between using this module and the raw MCP SDK?
This module provides NestJS‑native decorators (@Tool, @Resource), automatic discovery, and guard integration, so you don’t have to manually wire tool/resource handlers or handle SSE connections.
What are the runtime dependencies?
Node.js, NestJS (any version supporting dynamic modules), @modelcontextprotocol/sdk, and zod. The module itself is @rekog/mcp-nest.
Which transport does the server use?
Server-Sent Events (SSE) on the GET /sse endpoint, with POST /messages for receiving client responses.
How can I secure the MCP endpoints?
Pass standard NestJS guards to McpModule.forRoot in the guards array. Those guards are applied to both the SSE and messages endpoints. You can also exclude /sse and /messages from a global prefix using { exclude: ['sse', 'messages'] }.
Does the module support resource templates?
Yes. Use the @Resource decorator with a URI template (e.g., mcp://hello-world/{userName}) – the module captures the dynamic parameters and passes them to the handler.
Frequently asked questions
What is the difference between using this module and the raw MCP SDK?
This module provides NestJS‑native decorators (`@Tool`, `@Resource`), automatic discovery, and guard integration, so you don’t have to manually wire tool/resource handlers or handle SSE connections.
What are the runtime dependencies?
Node.js, NestJS (any version supporting dynamic modules), `@modelcontextprotocol/sdk`, and `zod`. The module itself is `@rekog/mcp-nest`.
Which transport does the server use?
Server-Sent Events (SSE) on the GET `/sse` endpoint, with POST `/messages` for receiving client responses.
How can I secure the MCP endpoints?
Pass standard NestJS guards to `McpModule.forRoot` in the `guards` array. Those guards are applied to both the SSE and messages endpoints. You can also exclude `/sse` and `/messages` from a global prefix using `{ exclude: ['sse', 'messages'] }`.
Does the module support resource templates?
Yes. Use the `@Resource` decorator with a URI template (e.g., `mcp://hello-world/{userName}`) – the module captures the dynamic parameters and passes them to the handler.
Basic information
More Other MCP servers
Inbox Zero AI
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
Nginx UI
0xJackyYet another WebUI for Nginx

Lemon.io
lemon-ioRequest dedicated senior developers to work on your project, write job descriptions, and prep technical interviews — all without leaving your Claude chat. Just describe what you need, and Lemon.io MCP does the rest. 1–3
IDA Pro MCP
mrexodiaAI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP.
ICSS
chokcoco不止于 CSS
Comments