gasoline-mcp
v5.2.0
Published
Gasoline MCP is an AI Debugger, Inspector, and Observability toolkit. It acts as Chrome DevTools for AI Agents using the Model Context Protocol (MCP).
Maintainers
Readme
gasoline-mcp
Browser observability for AI coding agents - autonomously debug and fix issues in real time. Streams console logs, network errors, and exceptions to Claude Code, Copilot, Cursor, or any MCP-compatible assistant. Enterprise ready.
Setup (2 Steps)
Step 1: Add the MCP Server to Your AI Tool
MCP (Model Context Protocol) lets your AI assistant talk to external tools. You just need to add a config snippet — no global install required. npx downloads and runs the binary automatically.
Pick your tool and add the config:
Option A: Per-project (recommended for teams) — create .mcp.json in your project root:
{
"mcpServers": {
"gasoline": {
"type": "stdio",
"command": "npx",
"args": ["-y", "gasoline-mcp", "--port", "7890", "--persist"]
}
}
}Option B: Global — add to ~/.claude/settings.json:
{
"mcpServers": {
"gasoline": {
"type": "stdio",
"command": "npx",
"args": ["-y", "gasoline-mcp", "--port", "7890", "--persist"]
}
}
}After adding, restart Claude Code. You should see "gasoline" listed when you run /mcp.
Architecture note: Your AI tool spawns a SINGLE Gasoline process that handles both:
- HTTP server on port 7890 (for browser extension telemetry)
- stdio MCP protocol (for AI tool commands)
Both interfaces share the same browser state. Do NOT manually start Gasoline — let the MCP system manage it.
Edit your config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"gasoline": {
"type": "stdio",
"command": "npx",
"args": ["-y", "gasoline-mcp", "--port", "7890", "--persist"]
}
}
}Restart Claude Desktop after saving.
Go to Settings → MCP Servers → Add Server, or add to ~/.cursor/mcp.json:
{
"mcpServers": {
"gasoline": {
"type": "stdio",
"command": "npx",
"args": ["-y", "gasoline-mcp", "--port", "7890", "--persist"]
}
}
}Restart Cursor after saving.
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"gasoline": {
"type": "stdio",
"command": "npx",
"args": ["-y", "gasoline-mcp", "--port", "7890", "--persist"]
}
}
}Restart Windsurf after saving.
Add to ~/.continue/config.json:
{
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "npx",
"args": ["-y", "gasoline-mcp", "--port", "7890", "--persist"]
}
}
]
}
}Add to ~/.config/zed/settings.json:
{
"context_servers": {
"gasoline": {
"command": {
"path": "npx",
"args": ["-y", "gasoline-mcp", "--port", "7890", "--persist"]
}
}
}
}Step 2: Install the Browser Extension
The extension captures logs from your browser and sends them to the local Gasoline server.
- Download or clone the Gasoline repository
- Open
chrome://extensionsin Chrome - Enable Developer mode (top right toggle)
- Click Load unpacked
- Select the
extension/folder from the repository
Once installed, you'll see the Gasoline icon in your browser toolbar. Click it to check connection status.
That's It!
Your AI assistant now has access to 5 composite tools:
| Tool | What it does |
| ---- | ------------ |
| observe | Real-time browser state (errors, logs, network, websocket, actions, vitals, page) |
| analyze | Data analysis and insights (performance, api, accessibility, changes, timeline) |
| generate | Code generation from captured data (reproduction, test, pr_summary, sarif, har) |
| configure | Session and noise management (store, noise_rule, dismiss, clear) |
| query_dom | Live DOM inspection via CSS selectors |
Try it: open your web app, trigger an error, then ask your AI assistant "What browser errors do you see?"
How It Works
Browser → Extension → Local Server (localhost:7890) → Log File → AI reads via MCP- The extension captures console logs, network errors, and exceptions from your browser
- Logs are sent to the Gasoline server running on your machine (localhost only)
- Your AI assistant reads the logs through the MCP protocol
- Everything stays local — no data ever leaves your machine
Manual Server Mode (No MCP)
If your AI tool doesn't support MCP, you can run the server standalone:
npx gasoline-mcpThis starts an HTTP server on http://localhost:7890 and writes logs to ~/gasoline-logs.jsonl. Your AI can read this file directly.
Options
gasoline-mcp [options]
--port <number> Port to listen on (default: 7890)
--log-file <path> Path to log file (default: ~/gasoline-logs.jsonl)
--max-entries <number> Max log entries before rotation (default: 1000)
--mcp No-op (MCP mode is the default)
--version Show version
--help Show helpTroubleshooting
"gasoline" not showing up in my AI tool?
- Make sure you restarted the AI tool after adding the config
- Check the config file path is correct for your tool
- Try running
npx gasoline-mcp --versionto verify the package works
"bind: address already in use" error?
If MCP fails to start with a port conflict, you likely have a manually-started Gasoline instance running:
# Find and kill the conflicting process
ps aux | grep gasoline | grep -v grep
kill <PID>
# Or on macOS/Linux:
pkill -f gasolineThen reload your MCP connection. The MCP system will spawn a fresh instance. Remember: do NOT manually start Gasoline when using MCP mode.
Extension shows "Disconnected"?
- The MCP server starts automatically when your AI tool launches — check if it's running:
ps aux | grep gasoline - Verify the extension's Server URL matches your config (default:
http://localhost:7890) - Try restarting your AI tool to re-initialize the MCP connection
No logs appearing?
- Click the extension icon and check the capture level (try "All Logs")
- Make sure the page was loaded/refreshed after the extension was installed
- Check
~/gasoline-logs.jsonlto see if entries are being written
Supported Platforms
- macOS (Apple Silicon & Intel)
- Linux (x64 & ARM64)
- Windows (x64)
Privacy
100% local. Logs never leave your machine. No cloud, no analytics, no telemetry. The server only binds to 127.0.0.1.
