NestJS DevTools MCP
Provides real-time observation of a running NestJS application's runtime state, including logs, registered routes, request history, and configuration.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@NestJS DevTools MCPFetch the latest logs from my NestJS application"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
NestJS DevTools MCP
Give your AI coding agents real-time visibility into your NestJS application.
NestJS DevTools MCP connects a running NestJS app to AI tools such as Claude, Cursor, Copilot, Cline, and Roo Code through the Model Context Protocol (MCP). Instead of copy-pasting logs, routes, request errors, or config values into chat, your AI assistant can inspect them directly from your local app.
What You Get
Runtime logs from your NestJS app
Registered HTTP routes
Recent HTTP request history
Sanitized runtime config
Runtime error history
Local server discovery
Localhost-only access by default
Production-safe default behavior
Related MCP server: agentic-mcp-server
Packages
This monorepo publishes 2 packages:
Package | Purpose |
NestJS module installed inside your app | |
MCP STDIO bridge used by AI clients |
Quick Start
1. Install the NestJS Plugin
npm install @nestjs-devtools-mcp/pluginOr with pnpm:
pnpm add @nestjs-devtools-mcp/plugin2. Register the Module
import { Module } from '@nestjs/common'
import { DevtoolsMcpModule } from '@nestjs-devtools-mcp/plugin'
@Module({
imports: [DevtoolsMcpModule.register()],
})
export class AppModule {}3. Use bufferLogs During Bootstrap
import { NestFactory } from '@nestjs/core'
import { AppModule } from './app.module'
async function bootstrap() {
const app = await NestFactory.create(AppModule, {
bufferLogs: true,
})
await app.listen(3000)
}
bootstrap()The DevTools logger is applied automatically when the module is registered.
4. Configure Your MCP Client
Add this MCP server to your AI client configuration:
{
"mcpServers": {
"nestjs-devtools": {
"command": "npx",
"args": ["-y", "nestjs-devtools-mcp@latest"]
}
}
}Restart your AI client, then ask:
Discover my local NestJS servers and show recent errors.Available MCP Tools
Tool | Description |
| Scan localhost for NestJS apps with the plugin enabled |
| Read runtime errors from bootstrap, logger, unhandled exceptions, and HTTP 5xx responses |
| Read recent runtime logs |
| List registered HTTP routes |
| Inspect recent HTTP requests, statuses, durations, and errors |
| Inspect sanitized runtime config from |
Example Prompts
After setup, try asking your AI assistant:
Find my running NestJS app and show me the latest runtime logs.List all registered routes in my NestJS server.Show recent failed HTTP requests and explain likely causes.Check runtime config values related to DATABASE.Show unhandled errors from the last few minutes.Runtime Endpoint
The plugin exposes a localhost-only internal endpoint inside your NestJS app:
GET /_dev/mcp/health
POST /_dev/mcp/tools/get_logs
POST /_dev/mcp/tools/get_routes
POST /_dev/mcp/tools/get_request_history
POST /_dev/mcp/tools/get_config
POST /_dev/mcp/tools/get_errorsThe bridge connects to this endpoint through localhost.
Configuration
Plugin Options
DevtoolsMcpModule.register({
name: 'my-api',
logBufferSize: 500,
requestHistorySize: 100,
errorBufferSize: 100,
})Option | Default | Description |
| Auto-detected from | App name shown during discovery |
|
| Disable the plugin |
|
| Max runtime log entries |
|
| Max request history entries |
|
| Max runtime error entries |
Bridge Environment Variables
Variable | Default | Description |
|
| First port to scan |
|
| Last port to scan |
| empty | Prefix used when probing the health endpoint |
| empty | Comma-separated |
Example:
NESTJS_MCP_SCAN_START=3000 NESTJS_MCP_SCAN_END=4000 npx nestjs-devtools-mcpSecurity Model
This project is designed for local development and debugging.
Security defaults:
Plugin is disabled when
NODE_ENV=productionMCP endpoint is protected by a localhost-only guard
Request and response bodies are not captured by default
Internal
/_dev/mcp/*calls are excluded from request historySensitive config values are always masked
ConfigService values are only read from explicitly declared keys
Sensitive keys and values such as passwords, tokens, auth headers, database URLs, private keys, cookies, sessions, JWTs, and credentials are returned as:
***MASKED***How It Works
AI Client
│
│ MCP over STDIO
▼
nestjs-devtools-mcp
│
│ HTTP over localhost
▼
@nestjs-devtools-mcp/plugin
│
▼
Running NestJS AppThe architecture intentionally keeps responsibilities separate:
The plugin runs inside the NestJS app and collects runtime state.
The bridge runs as an MCP server over STDIO.
The bridge does not start an HTTP server.
The plugin does not depend on the MCP SDK.
Development
Install dependencies:
pnpm installBuild all packages:
pnpm buildRun tests:
pnpm testRun lint:
pnpm lintRun the full local CI check:
pnpm ciDocumentation
License
MIT © HaoNgo232
For production environments, always reassess security assumptions before enabling runtime introspection tools.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/HaoNgo232/nestjs-devtools-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server