Nestjs MCP
MCP server by nestjs Verified · npm:@nestjs
Nestjs MCP is a Model Context Protocol module for NestJS. It turns provider methods into MCP tools, resources and prompts, served over Streamable HTTP or stdio, for teams building on Nest.
Install Nestjs MCP
Built from the published package, never by AI.
claude mcp add nestjs-mcp -- npx -y @nestjs/mcpRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"nestjs-mcp": {
"args": [
"-y",
"@nestjs/mcp"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"nestjs-mcp": {
"args": [
"-y",
"@nestjs/mcp"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"nestjs-mcp": {
"args": [
"-y",
"@nestjs/mcp"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add nestjs-mcp -- npx -y @nestjs/mcp{
"mcpServers": {
"nestjs-mcp": {
"args": [
"-y",
"@nestjs/mcp"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add nestjs-mcp npx -y @nestjs/mcpGemini 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 block.
About
Nestjs MCP is a Model Context Protocol module for NestJS. Tools, resources and prompts are methods of your providers, declared with decorators and a schema such as Zod, ArkType, Valibot or JSON Schema. Calls run through Nest's guards, interceptors, pipes and exception filters. It is built on the official MCP TypeScript SDK.
The server runs over Streamable HTTP from an existing Nest application, using Express, Fastify or the Node adapter. It can also run over stdio from a standalone application context. It supports the 2026-07-28 and 2025 protocol revisions, can act as an OAuth 2.1 resource server, and includes an in-memory test client. It suits NestJS developers who want to expose existing backend code to AI assistants.
Written from the project's README and checked against it.
Tools it gives your assistant
Tools, resources and promptsProvider methods declared with decorators become MCP tools, resources and prompts.Schema validationInputs are described with Zod, ArkType, Valibot or JSON Schema, or any Standard Schema library producing JSON Schema.Streamable HTTP endpointServes the MCP endpoint from an existing Nest app on Express, Fastify or the Node adapter.Stdio transportRuns the server over stdio from a standalone application context.Nest request pipelineRuns guards, interceptors, pipes and exception filters around every call.OAuth 2.1 resource serverSupports protected resource metadata, WWW-Authenticate challenges, per-tool scopes and a custom token verifier.In-memory test clientLets you test the server without starting a transport.
What you need
- An existing NestJS application
- Zod 4.2 or later, or another Standard Schema library producing JSON Schema
- Express, Fastify or the Node adapter for HTTP
Try asking
- Save a note saying I need to renew my passport
- Show all my notes as a JSON list
- Add a note with the text from my last message
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
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: common questions
Does Nestjs MCP support stdio as well as HTTP?
Yes. The server can run over stdio from a standalone application context, and the sample includes both HTTP and stdio entry points.
Which schema libraries can I use for tool inputs?
The source names Zod, ArkType, Valibot and JSON Schema. It also says any other Standard Schema library that produces JSON Schema works.
Does it support OAuth authorization?
It can act as an OAuth 2.1 resource server with protected resource metadata, WWW-Authenticate challenges, per-tool scopes and a token verifier of your own.
How do I install Nestjs MCP?
In Claude Code run claude mcp add nestjs-mcp -- npx -y @nestjs/mcp. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is Nestjs MCP the official server?
Nestjs MCP is published by npm:@nestjs from its verified domain in the official MCP Registry.
Is Nestjs MCP free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is Nestjs MCP safe to use?
It scores 93 of 100. Grades: maintenance A, 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?
Similar MCP servers: GitDiagram, mockserver, XcodeBuildMCP, draw.io.
Does Nestjs MCP 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.
