Nestjs MCP Server
MCP server by adrian-d-hidalgo Verified · npm:@candide
NestJS MCP Server is a modular library for building MCP servers with NestJS. It provides decorators and modules for resources, tools and prompts, and wraps the official @modelcontextprotocol/sdk for developers.
Install Nestjs MCP Server
Built from the published package, never by AI.
claude mcp add nestjs-mcp-server -- npx -y @candide/nestjs-mcp-serverRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"nestjs-mcp-server": {
"args": [
"-y",
"@candide/nestjs-mcp-server"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"nestjs-mcp-server": {
"args": [
"-y",
"@candide/nestjs-mcp-server"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"nestjs-mcp-server": {
"args": [
"-y",
"@candide/nestjs-mcp-server"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add nestjs-mcp-server -- npx -y @candide/nestjs-mcp-server{
"mcpServers": {
"nestjs-mcp-server": {
"args": [
"-y",
"@candide/nestjs-mcp-server"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add nestjs-mcp-server npx -y @candide/nestjs-mcp-serverGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the nestjs-mcp-server block.
About
NestJS MCP Server is a library for building Model Context Protocol servers with NestJS. It gives developers decorators, modules and integration patterns to expose MCP resources, tools and prompts. The project describes itself as a wrapper for the official @modelcontextprotocol/sdk and says it is kept compatible with that SDK's types and specification.
Developers register the library with McpModule.forRoot or McpModule.forRootAsync in the root module, then mark resolver classes with decorators such as Resolver, Tool, Resource and Prompt. Larger servers can split capabilities across feature modules using McpModule.forFeature. The README also covers guards, authentication and authorization, dynamic capabilities, statelessness and transport options. It is aimed at developers who want to build scalable MCP servers in NestJS.
Written from the project's README and checked against it.
Tools it gives your assistant
Resolver decoratorMarks a class that holds MCP capabilities, with an optional name.Tool decoratorExposes a method as an MCP tool, with options and annotations.Resource decoratorExposes structured data or documents as MCP resources.Prompt decoratorDefines conversational prompt templates for MCP clients.McpModule.forFeatureRegisters resolvers in feature modules to organize large servers.GuardsAdds global, resolver-level or method-level guards to MCP capabilities.Authentication and authorizationConfigures auth strategies, OAuth discovery and per-capability scopes.Dynamic capabilitiesToggles capabilities statically or through a capability gate.
What you need
- NestJS application
- @modelcontextprotocol/sdk
- zod
- npm, yarn or pnpm
Try asking
- Add an MCP tool to my NestJS server that returns a health status
- Create an MCP resource in my NestJS app using the Resource decorator
- Split my MCP tools into a feature module with McpModule.forFeature
Good to know
- McpModule.forRootAsync should be used only once, in the root module.
- Resolvers with MCP capabilities must be listed in the providers of a feature module.
- The options parameter of McpModule.forFeature is currently unused.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to Nestjs MCP Server
All alternatives →Turns GitHub repositories into architecture diagrams, written explanations, Mermaid source and narrated explainer videos. Built for developers who want to understand a codebase, and for AI agents that need to read one.
Mocks, records, and chaos-tests HTTP(S) dependencies for development and testing. One port serves many protocols, including gRPC, WebSockets, and LLM chat APIs. Built for developers and testers who need stand-in services during tests.
Provides MCP server and CLI tools that let AI coding agents build, test and manage iOS and macOS projects with Xcode and simulators. It is aimed at developers working on Apple platform apps.
Creates editable draw.io diagrams in AI chat from Mermaid, PlantUML, CSV or draw.io XML. Built for people who want diagrams from text prompts that stay editable in draw.io.
Indexes your code, git history, tests and decisions on your machine so AI coding agents can query the index instead of re-reading files. Built for developers who want fewer files opened and clearer answers about change risk and code health.
Gives your AI assistant hosted codebase intelligence for repos indexed on repowise.dev. Use it to ask how code works, what a change may break, and which tests to run.
Compare with GitDiagram, mockserver or XcodeBuildMCP
Nestjs MCP Server: common questions
Is NestJS MCP Server built on the official MCP SDK?
Yes. The README says it is a wrapper for the official @modelcontextprotocol/sdk and is kept compatible with its types and specification.
Does NestJS MCP Server support authentication?
The README has an authentication and authorization section covering the auth option, custom strategies, OAuth discovery and request authorizers.
Can I organize a large NestJS MCP server into several modules?
Yes. The README recommends McpModule.forFeature for feature modules that register additional resolvers, tools or resources.
How do I install Nestjs MCP Server?
In Claude Code run claude mcp add nestjs-mcp-server -- npx -y @candide/nestjs-mcp-server. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is Nestjs MCP Server the official server?
Nestjs MCP Server is published by npm:@candide from its verified domain in the official MCP Registry.
Is Nestjs MCP Server free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is Nestjs MCP Server safe to use?
It scores 69 of 100. Grades: maintenance B, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to Nestjs MCP Server?
Similar MCP servers: GitDiagram, mockserver, XcodeBuildMCP, draw.io.
Does Nestjs MCP Server work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
