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

MCP server by jsirp-dev Community

Gives coding agents a runtime view of a NestJS app through an embedded MCP endpoint. It covers the module graph, routes, logs, request traces, events and scheduled jobs. Built for Nest developers who use Claude Code, Cursor or other MCP clients.

  • Score 65
  • 0 stars
  • 62 a week
  • MIT
  • Updated

Install nestjs-mcp

Built from the published package, never by AI.

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

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

Step-by-step: install nestjs-mcp 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 block.

About

nestjs-mcp is a runtime MCP inspector that you add as a module to a NestJS app. When the app starts, it opens its own HTTP listener, separate from the app's server, that an MCP client can connect to. The default address is http://127.0.0.1:7777/.

The server reports what Nest actually built: the module and provider graph, every route with its guards, interceptors, pipes and filters, and the output of the app's Logger. It can also trace which enhancers a request passed through and how long each took, and it lists event listeners and scheduled jobs. Tool groups can be switched off, and a custom authorize function can protect the endpoint. It is aimed at developers who want a coding agent to inspect a running NestJS app.

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

Tools it gives your assistant

  • app_infoReports Nest and Node versions, uptime, endpoint URL, instance scope and tool switches.
  • graph_modulesLists the modules in the app's module and provider graph.
  • graph_providersLists the providers in the app's dependency graph.
  • graph_cyclesFinds circular dependencies in the module graph.
  • routes_listLists every route with the guards, interceptors, pipes and filters it passes through.
  • logs_tailReads recent lines from the app's Logger from a ring buffer.
  • requests_listLists kept request traces from the app.
  • request_traceShows which enhancers a given request passed through and how long each took.
  • events_listenersLists event listeners, available with @nestjs/event-emitter.
  • schedule_jobsLists scheduled jobs, available with @nestjs/schedule.

What you need

  • A NestJS app using @nestjs/common and @nestjs/core version 10 or 11
  • reflect-metadata, rxjs and zod (3.25 or later, or 4) as peer dependencies
  • An MCP client such as Claude Code or Cursor
  • Optional: @nestjs/event-emitter and @nestjs/schedule, for the events and schedule tools

Try asking

  • Show me the module graph of my NestJS app and any circular dependencies.
  • List all routes and the guards and pipes each one passes through.
  • Trace the last failed request and show which enhancer threw.

Good to know

  • Off by default in production builds, since enabled defaults to false when NODE_ENV is production.
  • Not supported as a workspace in a host monorepo; use the published npm package.
  • Each app on one machine needs its own listen.port.
  • Debug stack and local variable capture is off by default.

Security check

B
  • Runs a script automatically when the package is installedIn package.json: "postinstall":

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 →

Compare with GitDiagram, mockserver or XcodeBuildMCP

nestjs-mcp: common questions

Does nestjs-mcp work with NestJS 10 and 11?

The source says every tool group works on Nest 10 and 11. The peer dependencies are @nestjs/common and @nestjs/core 10 or 11.

Can an AI agent use nestjs-mcp in production?

By default, enabled is false in production, so the module opens no listener and wraps nothing. You can set enabled to true and protect the endpoint with authorize.

How does an agent connect to the inspector?

The agent connects over HTTP to the inspector's own listener, by default http://127.0.0.1:7777/, independent of the app's port, prefix or versioning.

How do I install nestjs-mcp?

In Claude Code run claude mcp add nestjs-mcp -- npx -y @jsirp/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 a community project by jsirp-dev, not verified by a company domain.

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 65 of 100. Grades: maintenance B, licence A, quality C. Security check: grade B (runs a script automatically when the package is installed). 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.

nestjs-mcp Install

Add to stack

Loading.