Logo di Browser MCP Server

Browser MCP Server

Community
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

AutoreUHolli
Repositorybrowser-mcp
LinguaTypeScript
Fork
979
Stelle
84
Strumenti disponibili
0
Tipo di trasportostdio
Categorie
LicenzaApache-2.0
Link
  • Collega gli strumenti ai flussi di lavoro IA

    Browser MCP Server mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • 0 strumenti disponibili

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni quando forniti dal server.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse open source

    84 stelle e 979 fork nel repository collegato.

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.

Installazione

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

Usa MCP Browser MCP Server con più modelli IA

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso Browser MCP Server, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura MCP.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura MCP e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con Questo dispositivo selezionato
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi Browser MCP Server come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di Browser MCP Server.
  4. Salva l'elenco dei server.
  5. Aggiorna per verificare che il connettore sia ancora pronto.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "uholli-browser-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@browsermcp/mcp"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di Browser MCP Server, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di Browser MCP Server.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare Browser MCP Server per aiutarmi con questa attività?
Browser MCP Server
Certo. Ho letto.
Ecco cosa ho trovato con Browser MCP Server.

Domande frequenti

A cosa serve il server MCP Browser MCP Server?

Browser MCP Server è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare Browser MCP Server MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare Browser MCP Server con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP Browser MCP Server con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando Browser MCP Server, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego Browser MCP Server MCP a TypingMind?

Browser MCP Server funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre Browser MCP Server MCP in TypingMind?

Browser MCP Server mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare Browser MCP Server MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se Browser MCP Server richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇