NestLens
Enables AI agents to inspect and debug a running NestJS application through NestLens, reading requests, exceptions, logs, queries, jobs, and other watcher data; write actions are available only when explicitly enabled.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Why NestLens?
β‘ Real-time Monitoring
Watch requests, queries, and exceptions as they happen. No more console.log debugging.
β¨ Zero Configuration
Import and go. Works with Express & Fastify. Finds your TypeORM queries, GraphQL server and scheduled tasks on its own; Prisma, Bull and the rest take one line each.
π Security Built-in
IP whitelist, role-based access, and automatic data masking for production safety.
Related MCP server: nestjs-langgraph-mcp
Install
npm install nestlensUpgrading? 0.8.0 removes the configuration fields deprecated in 0.4.0 (
storage.type,storage.filename, top-levelallowedIps/canAccess) and keeps NestLens's own responses out of your global interceptors. 0.6.0 moved the REST API underpath:/__nestlens__/api/*became/nestlens/__nestlens__/api/*. Both are covered in the upgrade guide.
Quick Start
import { NestLensModule } from 'nestlens';
@Module({
imports: [
NestLensModule.forRoot({
enabled: process.env.NODE_ENV !== 'production',
}),
],
})
export class AppModule {}forRoot belongs in the root module, once. It is global: a feature module takes
CollectorService or a watcher such as GateWatcher in its constructor without
importing NestLensModule again.
Visit http://localhost:3000/nestlens and start debugging.
Let an AI agent read it
nestlens-mcp is an MCP server over a running NestLens, published as its own package with the MCP SDK included. It is a hub of two tools β one lists everything NestLens can do, the other runs it β read from your application each time, so a new endpoint is available to an agent without a new release. It is read-only unless you pass --allow-write.
# Claude Code
claude mcp add nestlens -- npx -y nestlens-mcp --url http://localhost:3000/nestlens
# Codex
codex mcp add nestlens -- npx -y nestlens-mcp --url http://localhost:3000/nestlensIn Claude Code, the plugin adds the server and a debugging skill:
/plugin marketplace add mogretici/nestlens
/plugin install nestlens@nestlensIt is listed in the official MCP Registry as io.github.mogretici/nestlens, so clients that browse the registry can install it from there.
For a NestLens on a development or production server, run nestlens-mcp --http next to it and give the agent a URL. Setup for Claude Code, Codex, VS Code, Cursor and Claude Desktop is in the MCP guide.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Nifty's MCP server β exposes tasks, projects, messages, and files as tools for AI agents.
An MCP server that provides agents access to the KeldynAI platform
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceMCP server that lets AI coding tools control and observe a running Node.js process through the chrome devtools protocol (CDP), via a lightweight Debug Adapter Protocol (DAP) bridge.29 npm2MIT
- AlicenseBqualityDmaintenanceExperimental MCP server built with NestJS and LangGraph, enabling tool execution and agent workflows via stdio transport. Supports OpenAI and Ollama models for flexible agent orchestration.4ISC
- AlicenseNot gradedqualityDmaintenanceBuild MCP servers inside NestJS applications using ordinary controllers with decorators for tools, resources, and prompts, supporting authentication and authorization.72 npmMIT
- AlicenseNot gradedqualityDmaintenanceGive your AI coding agents the superpower to observe your NestJS application's runtime state in real-time.MIT