Basic information
About MCP Server NestJS Module Library
# MCP Server NestJS Module Library <!-- omit in toc -->
MCP Server NestJS Module Library is a MCP server in the Developer Tools category listed in the AddMCP.net directory, published by adrian-d-hidalgo. Supported transport: stdio. Runtime: node. License: MIT license. The repository has 40 GitHub stars. Source code is hosted on github.com.
Setup
{
"mcpServers": {
"nestjs-mcp-server": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector"
]
}
}
}
{
"mcpServers": {
"nestjs-mcp-server": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector"
]
}
}
}
{
"servers": {
"nestjs-mcp-server": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector"
]
}
}
}
MCP Server NestJS Module Library config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"nestjs-mcp-server": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector"
]
}
}
}
MCP Server NestJS Module Library tools
Tool list not available yet
This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is MCP Server NestJS Module Library?
MCP Server NestJS Module Library is a modular library for building Model Context Protocol (MCP) servers using NestJS. It provides decorators, modules, and integration patterns to expose MCP resources, tools, and prompts in a scalable, maintainable way. It wraps the official @modelcontextprotocol/sdk and stays compatible with its types and specification.
How to use MCP Server NestJS Module Library?
Install the package along with peer dependencies (@nestjs-mcp/server, @modelcontextprotocol/sdk, zod). Register the MCP server globally with McpModule.forRoot or McpModule.forRootAsync in your root module, providing a name and version. Define capabilities using @Resolver, @Tool, @Resource, and @Prompt decorators. Use McpModule.forFeature in feature modules to organize large servers.
Key features of MCP Server NestJS Module Library
- Decorators for MCP resources, tools, and prompts.
- Global registration via
McpModule.forRootandforRootAsync. - Feature module registration with
McpModule.forFeature. - Guard support at global, resolver, and method levels.
- Session management and configurable transport options (SSE, stdio).
- Wraps the official
@modelcontextprotocol/sdkfor compatibility.
Use cases of MCP Server NestJS Module Library
- Expose database records as read‑only MCP resources.
- Provide AI‑callable tools for external actions or computations.
- Organize a large MCP server into separate feature modules.
- Build a maintainable, testable MCP server within a NestJS application.
Frequently asked questions
1 What is MCP?
The Model Context Protocol (MCP) is an open protocol for connecting LLMs to external data, tools, and prompts.
2 What are the runtime dependencies?
You need @nestjs-mcp/server, @modelcontextprotocol/sdk, and zod installed.
3 How do I configure the server name and version?
Pass name and version (and optionally instructions, capabilities, logging, transports, and protocolOptions) to McpModule.forRoot.
4 Can I use guards with MCP capabilities?
Yes. Guards can be applied globally, at the resolver (class) level, or at the method level. MCP execution context is available via McpExecutionContext.
5 What transport options are available?
The library supports SSE and stdio transports. You can disable SSE by setting transports: { sse: { enabled: false } } in the module options.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In