شعار Browser MCP Server

Browser MCP Server

المجتمع
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

الناشرUHolli
المستودعbrowser-mcp
اللغةTypeScript
التفريعات
979
النجوم
84
الأدوات المتاحة
0
نوع نقل البياناتstdio
الفئات
الترخيصApache-2.0
الروابط
  • اربط الأدوات بسير عمل الذكاء الاصطناعي

    يتيح Browser MCP Server إمكانات MCP التي يمكن لتطبيقات الذكاء الاصطناعي العميلة ووكلاء الذكاء الاصطناعي المتوافقة استخدامها.

  • الأدوات المتاحة: 0

    تصفّح الإجراءات القابلة للاستدعاء أدناه، بما في ذلك أسماؤها وأوصافها عندما يوفّرها الخادم.

  • إعدادات جاهزة للنسخ

    استخدم أمثلة إعداد التثبيت لتهيئة هذا الخادم في تطبيق MCP العميل المفضّل لديك.

  • مؤشرات الاهتمام بالمصدر المفتوح

    النجوم: 84، والنسخ المتفرعة: 979 في المستودع المرتبط.

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.

التثبيت

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

استخدم MCP الخاص بـ Browser MCP Server مع نماذج ذكاء اصطناعي متعددة

يربط TypingMind أدوات MCP على مستوى مساحة العمل، لذا بمجرد توصيل Browser MCP Server، يمكنك استخدامه مع نماذج ذكاء اصطناعي مختلفة في TypingMind بدلًا من إعداده لكل نموذج على حدة. يعمل تكامل MCP هذا محليًا عبر موصل MCP الخاص بـ TypingMind على جهازك.

دليل الإعداد لاستخدام الموصل المحلي

استخدم هذا الخيار عندما يحتاج خادم MCP إلى الوصول إلى ملفات محلية أو تطبيقات أو موارد خاصة على جهاز الكمبيوتر لديك.

1

فتح إعدادات MCP

في TypingMind، انتقل إلى «الإعدادات»، ثم «الإعدادات المتقدمة»، ثم «بروتوكول سياق النموذج»، واختر «إعداد الموصل».

  1. افتح TypingMind في متصفحك.
  2. انقر على أيقونة الإعدادات.
  3. انتقل إلى الإعدادات المتقدمة.
  4. افتح قسم بروتوكول سياق النموذج.
  5. انقر على «إعداد الموصل» واختر «هذا الجهاز».
شاشة إعداد موصل MCP في TypingMind مع تحديد «هذا الجهاز»
2

تنفيذ أمر الموصل

اختر «هذا الجهاز»، وانسخ الأمر من TypingMind وشغّله في Terminal. أبقِ العملية قيد التشغيل أثناء استخدام MCP.

  1. انسخ أمر الإعداد الذي يعرضه TypingMind.
  2. افتح Terminal على macOS أو Windows Terminal على Windows.
  3. الصق الأمر ونفّذه.
  4. وافق على تثبيت الحزمة إذا طلب منك Terminal تأكيد المتابعة.
  5. أبقِ نافذة Terminal والعملية التي تعمل فيها قيد التشغيل أثناء استخدام أدوات MCP.
3

أضف Browser MCP Server كخادم

عندما تظهر حالة الموصل «جاهز»، انقر على «تعديل الخوادم» والصق إعدادات خادم MCP.

  1. انتظر حتى تظهر حالة الموصل «جاهز».
  2. انقر على «تعديل الخوادم».
  3. الصق إعدادات خادم MCP الخاص بـ Browser MCP Server.
  4. احفظ قائمة الخوادم.
  5. حدّث الحالة إذا أردت التأكد من أن الموصل لا يزال جاهزًا.
إعدادات MCP في TypingMind تعرض خادمًا نشطًا وزر «تعديل الخوادم»
{
  "mcpServers": {
    "uholli-browser-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@browsermcp/mcp"
      ]
    }
  }
}
4

استخدام الاتصال مع نماذج مختلفة

احفظ قائمة الخوادم، وافتح «الإضافات»، وفعّل أدوات MCP الخاصة بـ Browser MCP Server، ثم اختر أي نموذج ذكاء اصطناعي مدعوم في TypingMind واستخدم الأدوات في المحادثة أو أسندها إلى وكيل ذكاء اصطناعي.

  1. افتح صفحة الإضافات في TypingMind.
  2. فعّل أدوات MCP الخاصة بـ Browser MCP Server.
  3. ابدأ محادثة واختر نموذج الذكاء الاصطناعي الذي تريد استخدامه.
  4. استخدم أدوات MCP في المحادثة أو عيّنها لوكيل ذكاء اصطناعي.
  5. انتقل إلى نموذج ذكاء اصطناعي آخر عند الحاجة دون إعادة الاتصال بـ MCP.
محادثة في TypingMind تستخدم أدوات MCP المفعّلة مع نموذج ذكاء اصطناعي محدّد
هل يمكنك استخدام Browser MCP Server لمساعدتي في هذه المهمة؟
Browser MCP Server
بالتأكيد. قرأته.
إليك ما وجدته باستخدام Browser MCP Server.

الأسئلة الشائعة

ما استخدامات خادم MCP Browser MCP Server؟

Browser MCP Server هو خادم MCP يتيح لتطبيقات الذكاء الاصطناعي المتوافقة الاتصال بأدوات ومصادر سياق خارجية. في TypingMind، يمكنك إضافة خادم MCP هذا مرة واحدة وإتاحة أدواته في مساحة عملك للذكاء الاصطناعي.

هل يمكنني استخدام خادم MCP Browser MCP Server مع نماذج ذكاء اصطناعي متعددة في TypingMind؟

نعم. يربط TypingMind أدوات MCP على مستوى مساحة العمل، لذا يمكنك استخدام Browser MCP Server مع نماذج ذكاء اصطناعي مختلفة مثل Claude أو ChatGPT أو Gemini أو غيرها من النماذج التي أعددتها في TypingMind، دون إعداد خادم MCP لكل نموذج على حدة.

لماذا تستخدم موصل MCP Browser MCP Server مع TypingMind؟

يُعد TypingMind من أفضل واجهات المحادثة مع النماذج اللغوية الكبيرة، إذ يجمع نماذج ذكاء اصطناعي متعددة ومطالبات وإضافات ووكلاء ذكاء اصطناعي ومفاتيح API وأدوات MCP في مساحة عمل واحدة. بعد توصيل Browser MCP Server، يمكنك استخدام أدوات MCP الخاصة به عبر نماذجك المفضلة مع الحفاظ على سير عمل محادثاتك منظمًا في TypingMind.

كيف أوصّل خادم MCP Browser MCP Server بـ TypingMind؟

يعمل Browser MCP Server عبر موصل MCP المحلي في TypingMind. هذا هو الخيار الأنسب عندما يحتاج خادم MCP إلى الوصول إلى ملفات محلية أو تطبيقات سطح المكتب أو أدوات سطر الأوامر أو موارد خاصة على حاسوبك.

ما الأدوات التي يوفّرها خادم MCP Browser MCP Server في TypingMind؟

يتيح Browser MCP Server إمكانات MCP يمكنك تفعيلها من صفحة الإضافات في TypingMind واستخدامها في المحادثات أو تعيينها لوكلاء ذكاء اصطناعي.

هل أحتاج إلى مشاركة مفاتيح API الخاصة بي مع TypingMind لاستخدام خادم MCP Browser MCP Server؟

لا. يعطي TypingMind الأولوية للعمل المحلي ويُبقي مزوّدي النماذج ومفاتيح API والمطالبات وإعدادات MCP تحت تحكمك. إذا كان Browser MCP Server يتطلب مصادقة، فأضف الترويسات أو إعدادات OAuth أو الإعدادات المحلية المطلوبة لخادم MCP هذا عند إنشاء الاتصال.

خوادم MCP ذات صلة

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇