console-bridge

console-bridge

Captures and queries browser console logs from all tabs, enabling AI assistants to debug web applications with search, filtering, and custom debugging playbooks.

Category
Visit Server

README

<div align="center">

<img src="packages/extension/icon.png" alt="console-bridge icon" width="128" height="128">

console-bridge

Give your AI assistant access to browser console logs

Capture logs from all tabs, search errors, and equip your AI with project-specific debugging skills.

Quick Start ยท Features ยท Tools ยท Config

</div>


Why console-bridge?

1. ๐Ÿ”Œ Passive & Always-On No need to launch a special browser instance or connect to specific tabs. console-bridge captures everything in the background.

2. ๐Ÿง  Teachable (Project Skills) Define custom debugging workflows in Markdown. Your AI reads them to understand how to debug your specific application.

3. ๐Ÿ” Context Efficient Stop dumping massive log files. Search, filter, and fetch only the relevant lines to save tokens and reduce noise.

console-bridge Browser automation tools
Capture mode Passive, always on On-demand, explicit connect
Tab coverage All tabs simultaneously Single tab at a time
Log storage 10K logs with TTL None
Search Regex, keywords, time range Not supported
Skills Custom debugging skills (.md) Generic page access
Use case Debugging UI automation

Best for: "My app is throwing errors, help me debug" workflows.


Quick Start

console-bridge requires two components: a browser extension (captures logs) and an MCP server (stores/queries logs).

1. Install MCP Server

Standard config (works with most MCP clients):

{
  "mcpServers": {
    "console-bridge": {
      "command": "npx",
      "args": ["-y", "console-bridge-mcp@latest"]
    }
  }
}

<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor" height="32">

<details> <summary>Claude Code</summary>

claude mcp add console-bridge -s user -- npx -y console-bridge-mcp@latest

Or add to ~/.claude.json:

{
  "mcpServers": {
    "console-bridge": {
      "command": "npx",
      "args": ["-y", "console-bridge-mcp@latest"]
    }
  }
}

</details>

<details> <summary>VS Code</summary>

Add to your VS Code settings or use the CLI:

code --add-mcp '{"name":"console-bridge","command":"npx","args":["-y","console-bridge-mcp@latest"]}'

</details>

<details> <summary>Windsurf</summary>

Follow Windsurf MCP documentation. Use the standard config above.

</details>

<details> <summary>Other clients</summary>

Add the standard config to your MCP configuration file. See MCP documentation for client-specific instructions.

</details>

2. Install Browser Extension

  1. Download console-bridge-ext-v*.zip from the latest release
  2. Unzip to a permanent location (e.g., ~/.console-bridge-extension)
  3. Open Chrome โ†’ chrome://extensions
  4. Enable "Developer mode" (toggle in top right)
  5. Click "Load unpacked" โ†’ select the unzipped folder
  6. Click the extension icon โ†’ verify it shows "Connected"

3. Verify Installation

Restart your MCP client, then try:

Show me recent console errors

If you see log data, you're all set!


Features

Log Capture & Analysis

Logs stream continuously from all browser tabs to the MCP server. Filter by level, tab, URL pattern, or time range.

Show error logs from the last 5 minutes
Show logs from localhost:3000
Tail logs from the current tab

Powerful Search

Regex and keyword search with context lines, AND/OR logic, and exclusions.

Search for "failed" OR "error" excluding "expected"
Search for /api\/users\/\d+/ with 3 lines of context

Smart Tab Suggestions

AI-assisted tab ranking based on your project context โ€” ports, domains, URL patterns.

Suggest which tab is my Next.js app

Session Scoping

Focus on logs from the current navigation only, ignoring stale logs from before the last page refresh.

Show errors from current session only

JS Execution & DOM Queries

Run JavaScript in page context or query DOM elements directly.

Execute: window.featureFlags.enableDebug = true
Query DOM for '.error-message' elements

One-Click Cursor Integration

Click "Open in Cursor" in the extension popup to instantly open Cursor with a context-aware prompt to analyze the current tab's logs.

๐Ÿง  Project Skills (Context for AI)

Teach your AI assistant how to debug your specific project. Create a .console-bridge/ directory in your project root and add Markdown files with debugging playbooks.

Why use Skills?

  • Onboard AI instantly: Define complex debugging flows once, use them forever.
  • Share knowledge: Commit your debugging guides so every team member's AI assistant knows them.
  • Context-aware: The AI discovers available skills automatically.

Example: Create .console-bridge/auth-debug.md:

---
title: Debug Authentication Flow
description: Steps to diagnose login failures
---
1. Filter logs for "AuthService"
2. Check network requests to /api/login
3. Verify JWT token in local storage

Usage:

List available debugging skills
Load the auth debugging skill

MCP Tools

Tool Purpose
console_tabs List all tabs or get smart suggestions based on project context
console_logs List, get single log, or tail with filtering (level, tab, URL, time)
console_search Regex or keyword search with context lines and exclusions
console_snapshot Quick summary of recent errors, warnings, and patterns
console_browser_execute Run JavaScript in page context
console_browser_query Query DOM elements by CSS selector
console_skills_list List project-specific debugging playbooks
console_skills_load Load a specific debugging skill

Configuration

Environment variables:

CONSOLE_MCP_PORT=9847              # WebSocket port
CONSOLE_MCP_DISCOVERY_PORT=9846    # HTTP discovery port
CONSOLE_MCP_MAX_LOGS=10000         # Max logs in memory
CONSOLE_MCP_LOG_TTL_MINUTES=60     # Auto-cleanup (0 = disable)

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     WebSocket      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      stdio       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                 โ”‚    (port 9847)     โ”‚                 โ”‚                  โ”‚                 โ”‚
โ”‚  Browser Ext.   โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ถ โ”‚   MCP Server    โ”‚ โ—€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ถ โ”‚  AI Assistant   โ”‚
โ”‚  (all tabs)     โ”‚    log batches     โ”‚  (stores/query) โ”‚    MCP protocol  โ”‚ (Cursor/Claude) โ”‚
โ”‚                 โ”‚                    โ”‚                 โ”‚                  โ”‚                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        โ”‚                                      โ”‚
        โ”‚ captures console.*                   โ”‚ in-memory storage
        โ”‚ intercepts errors                    โ”‚ filtering engine
        โ”‚ sanitizes credentials                โ”‚ search engine
        โ”‚                                      โ”‚

Data flow:

  1. Extension content script intercepts console.log/warn/error/debug
  2. Logs are batched (50 logs/100ms) and sent via WebSocket
  3. Server stores logs in-memory with configurable TTL
  4. MCP tools query and analyze logs on demand

Development

npm install && npm run build
npm run dev:server    # Hot reload server
npm run dev:extension # Hot reload extension
npm test              # Run tests

Project Structure

packages/
โ”œโ”€โ”€ server/          # MCP server + WebSocket receiver
โ”œโ”€โ”€ extension/       # Chrome extension (content script + popup)
โ””โ”€โ”€ shared/          # Shared types and Zod schemas

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured