跳到正文
FunCoding

NestLens

官方 MCP Registry 已收录

Lets an agent read what NestLens recorded in a NestJS app: requests, queries, exceptions and logs.

Star
46
版本
v0.21.1
许可证
MIT
最近提交
2026年11月30日

NestLens

NestLens

Debug NestJS Like Never Before

Laravel Telescope-inspired debugging and monitoring for NestJS.
Track requests, queries, exceptions, jobs, and 17 more watchers
with a beautiful real-time dashboard.

npm version npm downloads license stars mogretici/nestlens MCP server

Getting Started Configuration Watchers Security

Medium Article Read on DEV

NestLens Dashboard Demo

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.


Install

npm install nestlens

Upgrading? 0.8.0 removes the configuration fields deprecated in 0.4.0 (storage.type, storage.filename, top-level allowedIps / canAccess) and keeps NestLens's own responses out of your global interceptors. 0.6.0 moved the REST API under path: /__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/nestlens

Install in VS Code

In Claude Code, the plugin adds the server and a debugging skill:

/plugin marketplace add mogretici/nestlens
/plugin install nestlens@nestlens

It 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.


Request Exception Log Query Model Cache Redis Job Schedule Event Batch
Mail HTTP Client Notification Gate Command View Dump GraphQL Message WebSocket


Made by Lütfü Öğretici for the NestJS community

同类 MCP Server

OpenWork MCP Gateway

Your OpenWork org's skills, plugins, workflows, and connections through one OAuth MCP URL.

DIdifferent-ai/openwork25k近 7 天新增 46 个 star

fastapi_mcp

Expose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth!

TAtadata-org/fastapi_mcp12k

agentgateway

Next Generation Agentic Proxy for AI Agents and MCP servers

AGagentgateway/agentgateway6.5k近 7 天新增 135 个 star

精选

mcp-context-forge

把 MCP、A2A 和 REST 接口汇总到一个入口,集中管理。

IBIBM/mcp-context-forge4.9k近 7 天新增 33 个 star

精选

FreeCAD MCP

创建编辑 3D 模型,运行 Python 脚本,进行 FEM 分析。

NEneka-nat/freecad-mcp3.5k近 7 天新增 78 个 star