DevTools Lens MCP
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., "@DevTools Lens MCPwhy did the login request return a 401 error?"
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.
DevTools Lens MCP
Give your AI agent Chrome DevTools.
DevTools Lens MCP is a production-oriented Model Context Protocol server that lets Claude, Codex, and other MCP clients inspect and control a live Chromium browser. It is built for frontend debugging—not just browser automation.
Ask an agent why a login request failed, which exception broke a click handler, what changed in the DOM after submit, or whether the current page has accessibility problems. The server combines Playwright's reliable lifecycle and interaction layer with direct Chrome DevTools Protocol diagnostics.
Why this exists
Browser automation tools can click and type, but debugging needs evidence: buffered console history, request/response details, stack traces, DOM state, computed styles, accessibility metadata, and before/after changes. DevTools Lens MCP exposes that evidence as focused, schema-validated tools that an AI agent can reason over.
Related MCP server: Chrome DevTools MCP
Highlights
19 purpose-built debugging tools over MCP stdio
Multiple isolated browser sessions with optional single-session shorthand
CDP-native console, exception, and network event collection
Grouped console errors with likely categories
Failed-request detection for HTTP, DNS, timeout, refused, CORS, and aborted requests
Bounded textual response-body inspection and default credential redaction
Compact DOM snapshots, element styles/layout, and structural DOM diffing
Click impact capture: DOM, console, network, and URL before/after evidence
Page and element screenshots written to a controlled output directory
axe-core accessibility analysis
Strict TypeScript, Zod inputs, Vitest coverage, Docker, and CI
Architecture
flowchart LR
Client[Claude / Codex / MCP client] -->|MCP stdio| Server[MCP tool registry]
Server --> Schemas[Zod validation + structured errors]
Server --> Manager[BrowserManager]
Manager --> S1[BrowserSession A]
Manager --> S2[BrowserSession B]
S1 --> PW[Playwright lifecycle + interactions]
S1 --> CDP[Chrome DevTools Protocol]
CDP --> Console[Console ring buffer]
CDP --> Network[Network ring buffer]
Server --> Services[DOM / console / network / a11y / screenshot services]
Services --> S1Each session owns one Chromium page, one CDP session, independent console/network buffers, active requests, and lifecycle timestamps. The transport is isolated in the server entry point so HTTP transports can be added later without rewriting browser services.
Five-minute setup
Requirements: Node.js 20.19+ and npm.
npm install -g devtools-lens-mcp
npx playwright install chromium
devtools-lens-mcpFor one-command client usage, configure the client to run:
npx -y devtools-lens-mcpWhen developing from source:
git clone https://github.com/aakcay5656/devtools-lens-mcp.git
cd devtools-lens-mcp
npm install
npx playwright install chromium
npm run build
npm startMCP client configuration
Claude Desktop
Add this server to the mcpServers object in Claude Desktop's configuration:
{
"mcpServers": {
"devtools-lens": {
"command": "npx",
"args": ["-y", "devtools-lens-mcp"]
}
}
}Restart Claude Desktop after saving the file.
Codex CLI or IDE extension
The CLI and IDE extension share MCP configuration. Add the server with:
codex mcp add devtools-lens -- npx -y devtools-lens-mcpOr add it manually to ~/.codex/config.toml:
[mcp_servers.devtools-lens]
command = "npx"
args = ["-y", "devtools-lens-mcp"]
startup_timeout_sec = 30
tool_timeout_sec = 120Tools
Tool | Purpose |
| Launch Chromium with URL, viewport, and headless options |
| Connect to an existing CDP remote-debugging endpoint |
| Navigate and wait for a lifecycle state |
| Get URL, title, viewport, UA, loading state, and DOM/resource counts |
| Filter buffered console history |
| Group errors/exceptions and classify likely causes |
| Filter complete session request history |
| Explain HTTP and transport failures |
| Get headers, payload, initiator, timing, and bounded text body |
| Get layout, visibility, styles, accessible identity, and selector |
| Capture a compact, depth-limited DOM model |
| Click and optionally capture diagnostic changes |
| Fill editable elements with password-safe results |
| Select an option by value, label, or index |
| Press keys or chords on a target or page |
| Save page or element screenshots |
| Run axe-core and return actionable findings |
| Compare snapshots by additions/removals/text/attributes/visibility |
| Safely close a session |
All browser-facing tools accept sessionId. It may be omitted when exactly one session exists. Ambiguous and invalid sessions return structured errors with available session IDs.
Example workflow
Ask the client to call
browser_launchwith{ "headless": true, "url": "https://example.com" }.Call
browser_get_console_errorsandbrowser_get_failed_requeststo establish a baseline.Call
browser_clickwith{ "selector": "button[type=submit]", "captureChanges": true }.Inspect new requests with
browser_get_request_detailsand the DOM diff from the click result.Call
browser_closewhen finished.
Prompts to try
“Find all console errors on this page and explain their likely causes.”
“Click the login button and analyze what fails.”
“Inspect failed API requests and suggest a fix.”
“Compare the page before and after submitting this form.”
“Find accessibility issues in the current page.”
“Inspect the styling and accessibility properties of the submit button.”
Configuration
Environment variable | Default | Meaning |
|
| Only directory used for screenshots |
|
| Console buffer capacity per session |
|
| Network buffer capacity per session |
|
| Maximum returned response-body bytes |
Security
Treat the browser and every page it opens as untrusted.
authorization,cookie,set-cookie,x-api-key, andproxy-authorizationheaders are masked by default.Password inputs are never returned by fill results or DOM snapshot value attributes.
Binary response bodies are not returned; textual bodies are byte-limited.
Screenshots can only be written under the configured output directory.
The server exposes no arbitrary shell command or general-purpose JavaScript evaluation tool.
Localhost and private-network navigation are not blocked. This is intentional for local frontend debugging, but it makes SSRF-style access possible when an agent follows untrusted instructions. Run the server with only the network access it needs.
Never attach this server to a trusted personal browser profile. Use a fresh, disposable debugging profile with no saved credentials, cookies, extensions, or open authenticated tabs.
Response bodies and page text may themselves contain secrets. Review outputs before sharing them.
Connecting by remote debugging endpoint grants powerful control over that browser. Bind debugging ports to loopback and do not expose them publicly.
For untrusted targets, prefer the Docker image with a restricted network policy and disposable filesystem. Report vulnerabilities privately according to SECURITY.md.
Development
npm run dev
npm run typecheck
npm run lint
npm run test:unit
npm run test:integration
npm run test
npm run build
npm run formatIntegration tests start a local fixture and a real headless Chromium instance. Install the browser once with npx playwright install chromium.
Docker
docker build -t devtools-lens-mcp .
docker run --rm -i -v "$PWD/output:/app/output" devtools-lens-mcpThe image is designed for MCP stdio (-i is required). See docker-compose.yml for a minimal example.
Roadmap
React component tree, props, and state inspection
Redux and Zustand state inspection
Vue component inspection
Performance trace analysis and Lighthouse integration
CSS and JavaScript coverage
Source-map-aware source navigation
Breakpoints, step debugging, and WebSocket inspection
IndexedDB, localStorage, sessionStorage, and cookie editing
Mobile device emulation and multi-tab support
Browser recording and replay
AI-driven automatic root-cause analysis
Contributing
Issues and pull requests are welcome. Read CONTRIBUTING.md, keep tools narrowly focused on frontend diagnosis, add Zod validation for inputs, and include unit or Chromium integration coverage for behavior changes.
License
MIT © DevTools Lens MCP contributors.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityAmaintenanceEnables AI coding assistants to control and inspect a live Chrome browser through Chrome DevTools. Provides browser automation, performance analysis, debugging capabilities, and network request monitoring.1,608,58049,153Apache 2.0
- AlicenseAqualityDmaintenanceEnables AI coding assistants to control and inspect a live Chrome browser for automation, debugging, performance analysis, and screenshot capture through Chrome DevTools.261,608,5803Apache 2.0
- -license-quality-maintenanceEnables AI coding assistants to control and inspect a live Chrome browser for automated debugging, performance analysis, and web interaction. It leverages Puppeteer and Chrome DevTools to provide capabilities like network monitoring, console logging, and automated browser actions.
- Alicense-qualityCmaintenanceEnables AI assistants to control and inspect a live Chrome browser for automated web debugging, performance analysis, and Lighthouse audits. It allows agents to capture screenshots, monitor network requests, and measure Core Web Vitals using plain-English prompts.1,608,580Apache 2.0
Related MCP Connectors
Live browser debugging for AI assistants — DOM, console, network via MCP.
Browser-backed QA with evidence and fix-ready reports for coding agents.
AI QA tester — real browsers scan sites for bugs, SEO, perf, and accessibility issues via chat.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/aakcay5656/devtools-lens-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server