@@ -4,11 +4,12 @@ MCP (Model Context Protocol) server for Browser Echo - captures and exposes fron
44
55## Overview
66
7- This package provides an MCP server that:
7+ This package provides an MCP server using Streamable HTTP transport that:
88- Captures frontend console logs (errors, warnings, info, debug)
99- Exposes logs through MCP tools and resources for AI assistants
1010- Enables debugging of React hydration issues, network failures, and other frontend problems
1111- Supports session-based filtering and soft/hard log clearing
12+ - Runs on HTTP transport for compatibility with browser-based log forwarding
1213
1314## Installation
1415
@@ -18,7 +19,19 @@ pnpm add -D @browser-echo/mcp
1819
1920## Usage
2021
21- The MCP server is automatically started when using Browser Echo with supported frameworks (Vite, Next.js, Nuxt).
22+ Start the MCP server:
23+
24+ ``` bash
25+ # Start on default port 5179
26+ pnpm --package=@browser-echo/mcp dlx browser-echo-mcp
27+
28+ # Or with custom port
29+ pnpm --package=@browser-echo/mcp dlx browser-echo-mcp --port 8080
30+ ```
31+
32+ The server exposes:
33+ - MCP endpoint at ` http://localhost:5179/mcp `
34+ - Log ingestion at ` http://localhost:5179/__client-logs `
2235
2336### Available Tools
2437
@@ -116,8 +129,8 @@ The server also exposes logs as MCP resources:
116129
117130### Environment Variables
118131
119- - ` BROWSER_ECHO_MCP=0 ` - Disable MCP server (enabled by default in development)
120- - ` NODE_ENV=production ` - MCP is automatically disabled in production
132+ - ` BROWSER_ECHO_MCP_URL ` - Override the default MCP server URL
133+ - ` BROWSER_ECHO_BUFFER_SIZE ` - Maximum log entries to keep in memory (default: 1000)
121134
122135## API
123136
@@ -155,7 +168,17 @@ publishLogEntry({
155168
156169## Integration with AI Assistants
157170
158- The MCP server is designed to work seamlessly with AI assistants like Claude (via Cursor) or other MCP-compatible tools.
171+ The MCP server works with any MCP-compatible client. For Cursor, add to ` .cursor/mcp.json ` :
172+
173+ ``` json
174+ {
175+ "mcpServers" : {
176+ "browser-echo" : {
177+ "url" : " http://localhost:5179/mcp"
178+ }
179+ }
180+ }
181+ ```
159182
160183### Natural Language Commands
161184
0 commit comments