Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

Nestjs MCP Server

MCP server by adrian-d-hidalgo Verified · npm:@nestjs-mcp

NestJS MCP Server provides decorators and NestJS modules for building MCP servers. It wraps the official MCP TypeScript SDK and is aimed at developers using NestJS.

  • Score 83
  • 40 stars
  • 6.9k a week
  • MIT
  • Updated

Install Nestjs MCP Server

Built from the published package, never by AI.

claude mcp add nestjs-mcp-server -- npx -y @nestjs-mcp/server

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install Nestjs MCP Server in Claude Code

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 modular library for building Model Context Protocol (MCP) servers with NestJS. It provides decorators, modules, and integration patterns to expose MCP resources, tools, and prompts. The project is a wrapper for the official @modelcontextprotocol/sdk and is described as kept compatible with its types and specification.

Developers register the library with McpModule.forRoot or McpModule.forRootAsync, then mark resolver classes with decorators such as Resource, Tool, and Prompt. Larger servers can split capabilities across feature modules using McpModule.forFeature. The README also covers guards, dynamic capabilities, authentication and authorization, and transport options. It suits NestJS developers who want to build MCP servers in a structured way.

Written from the project's README and checked against it.

Tools it gives your assistant

  • Resolver decoratorMarks a class as a resolver that holds MCP capabilities.
  • Tool decoratorExposes methods as MCP tools, with ToolOptions and tool annotations.
  • Resource decoratorExposes structured data identified by a URI as MCP resources.
  • Prompt decoratorDefines conversational flows or templates as MCP prompts.
  • GuardsAdds global, resolver-level, or method-level guards to MCP capabilities.
  • Authentication and authorizationConfigures auth with strategies, OAuth discovery, and per-capability scopes.

What you need

  • NestJS
  • npm, yarn, or pnpm
  • @modelcontextprotocol/sdk package
  • zod package

Try asking

  • Add a health check tool to my NestJS MCP server using the Tool decorator
  • Split my MCP server into feature modules with McpModule.forFeature
  • Show me how to configure my MCP server with McpModule.forRootAsync and ConfigService

Good to know

  • McpModule.forFeature options are currently unused and reserved for future enhancements.

Security check

A

No 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 →

Compare with GitDiagram, mockserver or XcodeBuildMCP

Nestjs MCP Server: common questions

What does NestJS MCP Server wrap?

It is a wrapper for the official @modelcontextprotocol/sdk, and the project says it is kept compatible with its types and specification.

How do I configure the server with environment variables?

The README shows McpModule.forRootAsync with a useFactory that reads values from ConfigService, such as the server name and log level.

Can I organize a large MCP server into several modules?

Yes. Resolvers can be registered in feature modules that import McpModule.forFeature, which the README recommends for large servers.

How do I install Nestjs MCP Server?

In Claude Code run claude mcp add nestjs-mcp-server -- npx -y @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:@nestjs-mcp 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 83 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.

Nestjs MCP Server Install

Add to stack

Loading.