Enables monitoring and debugging of Google Chrome browser tabs through the Chrome DevTools Protocol, including console log capture, JavaScript execution, page navigation, and Chrome extension development support.
Uses puppeteer-core to connect to Chrome's DevTools Protocol for browser automation and console monitoring capabilities.
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., "@Simple Console MCPshow me the console logs from my current browser tab"
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.
simple-console-mcp
Minimal Console MCP — The smallest unit for browser debugging
TL;DR
An extremely minimal MCP Server focused on browser Console Log monitoring. 97% lighter than chrome-devtools-mcp (4 tools vs 50+), so your AI assistant won't consume a ton of context tokens while debugging.
Comparison | chrome-devtools-mcp | simple-console-mcp |
Tools | 50+ | 4 |
Context Cost | ~5000 tokens | ~200 tokens |
Focus | Full-featured | Console + JS execution |
Why I Built This
This project started with a simple question: "I just want to see Console Logs. Why do I need 50 tools?"
chrome-devtools-mcp is powerful, but every time the AI calls a tool, it needs to understand all 50+ tools first. The tool descriptions alone consume a huge amount of context. For scenarios where you just want to quickly debug JavaScript errors, that's wasteful.
So I built this "Minimum Viable MCP":
list_targets— List browser tabsget_console_logs— Read Console outputnavigate— Navigate or reloadexecute_js— Execute JavaScript in page context
Just four tools. Good enough.
The core goal of this MCP is to fully embrace the subtraction principle — achieve maximum effect with minimum functionality. It's also an application of the 80/20 rule: if 80% of debugging scenarios only need Console Logs, why load 100% of the tools?
Test Verification
All features have been tested with a comprehensive test suite:
Test Scenarios
Test | Description | Status |
01-basic-logs | console.log, warn, error, info, debug | ✅ Pass |
02-js-errors | TypeError, ReferenceError, SyntaxError, RangeError | ✅ Pass |
03-async-errors | Promise rejection, async/await, setTimeout, fetch errors | ✅ Pass |
04-stress-test | 600 logs generated, verifies 500 limit works | ✅ Pass |
05-special-chars | Emoji, Chinese, Japanese, JSON objects, Unicode | ✅ Pass |
Feature Verification
Feature | Status |
| ✅ |
| ✅ |
| ✅ |
| ✅ |
| ✅ |
Auto-launch Chrome with debug mode | ✅ |
Isolated user-data-dir ( | ✅ |
500 log cache limit | ✅ |
5s execution timeout for | ✅ |
Clear error message for Chrome conflicts | ✅ |
Sample Test Output
Installation
Option 1: npm (Recommended)
Claude Code (one-liner):
Claude Desktop or other MCP clients (Cursor / Windsurf / Cline):
Option 2: GitHub URL
Claude Code:
Option 3: Local Installation
Starting Chrome CDP
Auto-launch (v1.1.0+)
No manual setup required! The MCP automatically detects whether Chrome has CDP enabled:
If CDP is already enabled → connects directly
If not → auto-launches a new Chrome with debug mode using isolated profile
Just install the MCP, and tell Claude "help me debug" — it handles everything automatically.
Note (v1.4.0+): If you already have a regular Chrome open, the MCP will show a clear error message asking you to close it first. This prevents conflicts between regular and debug Chrome instances.
Manual Start (Fallback)
If auto-launch fails, you can start Chrome manually:
Tools
list_targets
List all available browser targets (pages, Service Workers, etc.).
Parameter | Type | Default | Description |
| number | 9222 | Chrome CDP port |
get_console_logs
Get Console output from a specific target. Starts monitoring on first call.
Parameter | Type | Default | Description |
| number | 0 | Target index from list_targets |
| number | 50 | Maximum lines to return |
| string | "all" | Filter type: all / error / warn / log / info / debug |
| number | 9222 | Chrome CDP port |
navigate
Navigate to a URL or reload the page.
Parameter | Type | Default | Description |
| string | - | Target URL or "reload" |
| number | 0 | Target index |
| number | 9222 | Chrome CDP port |
execute_js (New in v1.4.0)
Execute JavaScript code in the page context. Useful for clicking buttons, filling forms, reading DOM, or calling page functions.
Parameter | Type | Default | Description |
| string | - | JavaScript code to execute (max 10,000 chars) |
| number | 0 | Target index |
| number | 9222 | Chrome CDP port |
Safety measures:
Code length limit: 10,000 characters
Execution timeout: 5 seconds
Result size limit: 50,000 characters
Examples:
Architecture
How It Works: Pull-based
Behavior:
On first
get_console_logscall, MCP starts monitoring that targetConsole events are continuously collected in memory (max 500 entries)
Claude does NOT receive automatic notifications — must call
get_console_logsagain to see new logs
Why Pull-based? MCP protocol is request-response based and doesn't support push notifications. The server cannot proactively tell Claude "there's a new error" — Claude must actively ask.
Chrome Extension Development
This MCP supports monitoring Console output from Chrome Extensions:
Use different targetIndex values to monitor each target separately.
Tech Stack
Technology | Purpose |
Node.js 18+ | Runtime |
ES Modules | Module system |
@modelcontextprotocol/sdk | MCP protocol implementation |
puppeteer-core | Chrome CDP connection (no bundled Chromium) |
zod | Parameter validation |
Project Structure
Requirements
Item | Requirement |
Node.js | 18+ |
Chrome | Any version with |
OS | macOS / Linux / Windows |
Notes
Chrome must have CDP enabled: Chrome without
--remote-debugging-portcannot be connectedOne Chrome at a time: If multiple Chrome instances exist, MCP connects to the first one
Log cache limit: Each target keeps at most 500 logs, older ones are automatically removed
Navigation clears logs: Calling navigate clears the target's log cache
Changelog
v1.4.0 (2025-12-17)
New Features:
✨
execute_js: Execute JavaScript in page contextClick buttons, fill forms, read DOM, call page functions
Safety measures: 5s timeout, 10K code limit, 50K result limit
✨ Simplified Chrome launch logic:
Directly launches debug Chrome with isolated profile (
/tmp/chrome-cdp-9222)Clear error message when regular Chrome conflicts with debug Chrome
Improvements:
📦 Code grew from ~460 to ~550 lines (+20%)
🔧 Removed automatic Chrome kill logic (user must close regular Chrome manually)
📝 Better error messages explaining Chrome conflict resolution
v1.3.6 (2025-12-17)
Security Hardening (comprehensive code review fixes):
Issue | Severity | Fix |
URL Protocol Injection | 🔴 Critical | Added |
Shell Command Injection | 🔴 Critical |
|
Cleanup Race Condition | 🔴 Critical | Added |
Private API Dependency | 🟠 High |
|
Incomplete Resource Cleanup | 🟠 High | Added |
Missing HTTP Warning | 🟡 Medium | Non-localhost HTTP URLs now show security warning |
Unlimited URL Length | 🟡 Medium | Added |
v1.3.1 (2025-12-13)
🐛 Fixed
navigatetool'stargetIndexinconsistency withlist_targets
v1.3.0 (2025-12-13)
Security Fixes:
Issue | Severity | Fix |
Command Injection | 🔴 Critical | Added |
Race Condition | 🔴 Critical | Used Promise lock |
Resource Leak | 🔴 Critical | Added |
v1.2.0 (2025-12-12)
🔧 Auto-launched Chrome now uses isolated
user-data-dir
v1.1.0 (2025-12-12)
✨ Added auto-launch Chrome CDP feature
v1.0.0 (2025-12-12)
🎉 Initial release
License
This project is licensed under the Apache License 2.0.
Author
GitHub: @tznthou