Logo vun Browser MCP Server

Browser MCP Server

Communautéit
UHolli

Browse MCP for the web, directly from Cursor etc that bridges AI assistants to your local browser through a Chrome extension | MCP helper | MCP assistant | MCP browser

EditeurUHolli
Repositorybrowser-mcp
SproochTypeScript
Forks
979
Stären
84
Disponibel Tools
0
Transporttypstdio
Kategorien
LizenzApache-2.0
Linken
  • Tools mat KI-Workflows verbannen

    Browser MCP Server stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    84 Stären an 979 Forks aus dem verlinkte Repository.

Browser MCP Server

A production-ready Model Context Protocol (MCP) server that bridges AI assistants to your local browser through a Chrome extension.

Control navigation, interaction, snapshots, and screenshots from Cursor, Claude Desktop, VS Code, Windsurf, and any MCP-compatible client — without launching a separate browser instance.


Table of Contents


Overview

Browser MCP connects an AI client (via stdio MCP transport) to a Chrome extension (via local WebSocket). The extension operates on your existing browser profile, preserving login sessions and reducing bot-detection friction compared to headless automation.


Architecture

Request Flow

Component Responsibilities

ModuleRole
src/index.tsCLI entry point, tool registration, lifecycle
src/server.tsMCP protocol handlers (tools/resources)
src/context.tsTyped WebSocket RPC to the extension
src/messaging/Request/response correlation over WebSocket
src/tools/Browser automation tool implementations
src/persistence/Optional Redis session metadata store
src/config/Environment-driven configuration

Features

CapabilityTools
Navigationbrowser_navigate, browser_go_back, browser_go_forward, browser_wait
Interactionbrowser_click, browser_hover, browser_type, browser_select_option, browser_drag, browser_press_key
Inspectionbrowser_snapshot, browser_screenshot, browser_get_console_logs
PersistenceOptional Redis-backed session and tool-call metadata
ObservabilityStructured stderr logging with configurable log levels
Standalone buildNo private monorepo dependencies required

Requirements

  • Node.js 18 or later
  • Chrome with the Browser MCP extension installed
  • Redis 6+ (optional, for session persistence)

Installation

From source

bash
git clone https://github.com/BrowserMCP/mcp.git
cd mcp
npm install
npm run build

MCP client configuration

Add to your MCP client settings (example for Cursor / Claude Desktop):

json
{
  "mcpServers": {
    "browsermcp": {
      "command": "node",
      "args": ["/absolute/path/to/mcp/dist/index.js"]
    }
  }
}

Or use the published binary after linking:

bash
npm link
# command: mcp-server-browsermcp

Connect the extension

  1. Start your MCP client (which launches this server).
  2. Open Chrome and click the Browser MCP extension icon.
  3. Click Connect on the active tab.
  4. Invoke tools from your AI assistant.

Configuration

Copy the example environment file and adjust values:

bash
cp .env.example .env
VariableDefaultDescription
WS_PORT9009WebSocket port for the Chrome extension
LOG_LEVELinfoLog verbosity: debug, info, warn, error
REDIS_ENABLEDfalseEnable Redis session persistence
REDIS_HOST127.0.0.1Redis hostname
REDIS_PORT6379Redis port
REDIS_PASSWORD(empty)Redis authentication password
REDIS_DB0Redis database index
REDIS_KEY_PREFIXbrowsermcp:Key namespace prefix
REDIS_CONNECT_TIMEOUT_MS10000Connection timeout
REDIS_MAX_RETRIES10Reconnection attempts
REDIS_SESSION_TTL_SECONDS86400Session key TTL (24 h)

When Redis is enabled, the server records connection events, disconnection timestamps, and tool-call counts — useful for debugging and operational monitoring.


Development

bash
# Install dependencies
npm install

# Watch mode
npm run dev

# Type check
npm run typecheck

# Lint
npm run lint

# Run all checks
npm run validate

MCP Inspector

Debug tool schemas and handlers interactively:

bash
npm run build
npm run inspector

Testing

bash
# Run all tests
npm test

# Watch mode
npm run test:watch

Tests cover environment parsing, error formatting, async utilities, and Redis session store logic (with mocked clients).


Project Structure

mcp/
├── docs/
│   └── AUDIT.md              # Engineering audit notes
├── src/
│   ├── config/               # App + environment configuration
│   ├── messaging/            # WebSocket RPC layer
│   ├── persistence/          # Redis connection + session store
│   ├── resources/            # MCP resource type definitions
│   ├── tools/                # Browser automation tools
│   ├── types/                # Shared Zod schemas and message types
│   ├── utils/                # Logging, errors, port helpers
│   ├── context.ts            # Extension connection context
│   ├── index.ts                # CLI entry point
│   ├── server.ts             # MCP server factory
│   └── ws.ts                 # WebSocket server lifecycle
├── tests/                    # Vitest unit tests
├── .env.example              # Configuration template
├── eslint.config.js          # ESLint flat config
├── tsup.config.ts            # Build configuration
├── tsconfig.json             # TypeScript (source)
├── tsconfig.test.json        # TypeScript (tests + lint)
└── vitest.config.ts          # Test runner config

Design Decisions

  • Stdio transport only — MCP clients spawn the server as a subprocess; stdout is reserved for the protocol.
  • Stderr logging — All diagnostics go to stderr to avoid corrupting MCP messages.
  • Optional Redis — Persistence is opt-in; the server runs fully without Redis for local development.
  • Typed WebSocket RPC — Every extension message is typed end-to-end for compile-time safety.

Troubleshooting

"No connection to browser extension"

The Chrome extension is not connected. Open the extension popup and click Connect on the target tab.

Port already in use

Another process holds WS_PORT (default 9009). Either stop the conflicting process or set a different port:

bash
WS_PORT=9010 node dist/index.js

Redis connection failures

If Redis is enabled but unreachable, the server logs an error and continues without persistence. Verify Redis is running:

bash
redis-cli ping
# PONG

Tools return timeout errors

The extension did not respond within 30 seconds. Ensure the tab is active and the extension is connected. Increase load times with browser_wait.

MCP client shows no tools

Confirm the server binary path in your MCP config is absolute and that npm run build completed successfully.


Contributing

  1. Fork the repository and create a feature branch.
  2. Install dependencies: npm install
  3. Make changes with tests: npm run validate
  4. Submit a pull request with a clear description and test plan.

Commit Guidelines

  • One logical change per commit.
  • Use conventional prefixes: feat:, fix:, refactor:, test:, docs:, chore:.
  • Run npm run validate before pushing.

FAQ

Does this launch a new browser? No. It controls your existing Chrome profile through an extension.

Is my data sent to remote servers? Automation runs locally. Data only flows between your AI client, this server, and your browser.

Do I need Redis? No. Redis is optional and disabled by default.

Which browsers are supported? Chrome and Chromium-based browsers with the Browser MCP extension.

How is this different from Playwright MCP? Playwright MCP launches browser instances. Browser MCP uses your logged-in profile via a Chrome extension, reducing CAPTCHA and login friction.

Can multiple extensions connect? Only one WebSocket connection is active at a time. A new connection replaces the previous one.


License

Apache License 2.0 — see LICENSE.

Adapted from the Playwright MCP server with a browser-extension architecture for profile reuse and stealth automation.

Installatioun

TypingMind
{
  "mcpServers": {
    "uholli-browser-mcp": {
      "command": "mcp-server-browsermcp",
      "args": []
    }
  }
}

Browser MCP Server MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal Browser MCP Server verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

Browser MCP Server als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu Browser MCP Server an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "uholli-browser-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@browsermcp/mcp"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu Browser MCP Server. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu Browser MCP Server.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat Browser MCP Server?
Browser MCP Server
Jo. Ech hunn et gelies.
Dat hunn ech mat Browser MCP Server fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server Browser MCP Server benotzt?

Browser MCP Server ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech Browser MCP Server MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir Browser MCP Server mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat Browser MCP Server MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann Browser MCP Server verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech Browser MCP Server MCP mat TypingMind?

Browser MCP Server leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt Browser MCP Server MCP an TypingMind zur Verfügung?

Browser MCP Server stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir Browser MCP Server MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann Browser MCP Server eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇