nest-mcp-sse
About
nest-mcp-sse is a dynamic NestJS module that lets you quickly build SSE-based MCP servers. It handles Transport lifecycle and McpServer instantiation so you can focus on MCP tool development, without wrapping the official SDK’s native methods.
Explore
- Quickly create MCP servers in NestJS applications
- Manage multiple MCP Server instances
- Automatic SSE connection lifecycle handling
- Does not wrap native McpServer SDK methods
- Supports custom SSE and message endpoint names
Install the package alongside @modelcontextprotocol/sdk and zod. Import McpModule in your NestJS module and configure it with register, forRoot or forFeature. After registration, you can inject McpServerService to get a native McpServer instance (via getServer) and register tools with the SDK’s original API. SSE and message endpoints are automatically created.
这是一个用于在 NestJS 工程下快速开发 SSE 传输类型 McpServer 的动态模块,使用此模块,你将无需理会连接 Transport、生命周期管理、McpServer 实例化等杂事,聚焦于 MCP tool 的开发。
此模块没有过度封装🥳
只做了 MCP Server 实例管理和 SSE Transport 管理,没有对官方 sdk 的原生 MCP Server 的方法做任何封装,尽可能不增加学习成本。
功能特点
- 快速在 NestJS 应用中创建 MCP 服务器
- 支持多个 MCP Server 实例管理
- 自动处理 SSE 连接生命周期
安装
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



