Agentic Browser MCP Server
Provides tools for controlling Google Chrome browser, enabling AI agents to perform browser automation tasks such as navigating pages, interacting with elements, extracting page data, and managing tabs.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Agentic Browser MCP Serveropen chrome://settings and change default search engine"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Agentic Browser MCP MVP
This repository contains a local MCP server plus a Chrome Manifest V3 extension that connects to it over a loopback WebSocket bridge.
The extension can also use Chrome Native Messaging to quietly launch a local bridge daemon and import its pairing data without opening a pairing tab.
Workspace layout
packages/server: local MCP bridge server and pairing file writerpackages/extension: Chrome extension that reconnects to the bridge and executes browser toolspackages/shared: shared protocol types and schemas
Related MCP server: Chrome MCP Server
Prerequisites
Node.js 20 or newer
npm 10 or newer
Google Chrome 116 or newer
Install dependencies
npm installBuild the project
npm run buildThis produces:
packages/server/distpackages/extension/dist
Run the local MCP bridge server
Build and start the server:
npm run server:devBy default the server now listens on the first free loopback port inside the shared discovery range 45320-45339, and the extension auto-scans that same range. Manual pairing is no longer required for the default setup.
When token auth is enabled, the server also opens a dedicated local pairing tab and the extension can capture the pairing information directly from that tab URL.
On startup the server still writes a pairing file to:
~/.agentic-browser-mcp/agentic-browser-mcp.pairing.jsonIt also logs the resolved path to stderr when the bridge starts.
Optional port and auth configuration
You can customize discovery and authentication with environment variables:
AGENTIC_BROWSER_MCP_PORT=45325
AGENTIC_BROWSER_MCP_PORT_RANGE=45320-45339
AGENTIC_BROWSER_MCP_AUTH_MODE=loopback
AGENTIC_BROWSER_MCP_AUTH_TOKEN=your-stable-token-with-at-least-32-characters
AGENTIC_BROWSER_MCP_OPEN_PAIRING_TAB=always
AGENTIC_BROWSER_MCP_PAIRING_BROWSER=\"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome\"Notes:
AGENTIC_BROWSER_MCP_PORTpins the server to one exact port.AGENTIC_BROWSER_MCP_PORT_RANGEmakes the server try each port in order until one is free.AGENTIC_BROWSER_MCP_AUTH_MODE=loopbackenables zero-config auto-discovery.AGENTIC_BROWSER_MCP_AUTH_MODE=tokenenables stricter auth while still allowing automatic pairing through the startup tab.AGENTIC_BROWSER_MCP_AUTH_TOKENkeeps the token stable across restarts when token auth is enabled.AGENTIC_BROWSER_MCP_OPEN_PAIRING_TAB=always|neveroverrides the smart default. If unset, the tab opens automatically intokenmode and stays off inloopbackmode.AGENTIC_BROWSER_MCP_PAIRING_BROWSERlets you override how the startup pairing tab is launched. By default the server prefers Chrome and then falls back to the system browser.
URL Template Resolution
When configuring custom tools, you can use URL Templates to dynamically inject values from the current browser session or tool arguments when the tool executes. The following placeholder patterns are supported:
{{args:name}}: Resolves to the value of the custom tool argumentnameprovided by the agent.{{cookie:name}}: Resolves to the value of the cookie namednamematching the active tab's URL.{{localStorage:key}}: Resolves to the value oflocalStorage.getItem('key')evaluated in the active tab context.{{sessionStorage:key}}: Resolves to the value ofsessionStorage.getItem('key')evaluated in the active tab context.
Example
If you define a custom tool with a URL template like:
https://api.example.com/user/{{args:userId}}/profile?token={{localStorage:authToken}}&session={{cookie:session_id}}When invoked with the argument userId: "123", the template will automatically resolve the active page's local storage and cookies to build the final request URL.
MCP Transports & Client Setup
The MCP server runs three transports concurrently in the same process:
Stdio (Standard Input/Output)
SSE (Server-Sent Events over HTTP)
Streamable HTTP (MCP standard Streamable HTTP over HTTP)
By default, HTTP transports listen on port 13001. You can configure the port by setting the AGENTIC_BROWSER_MCP_HTTP_PORT environment variable.
Instructions to Connect an AI Agent / Client
1. Stdio (Claude Desktop / Cursor Configuration)
To run the server as a local subprocess, use the command entry point:
{
"mcpServers": {
"agentic-browser-mcp": {
"command": "node",
"args": ["/absolute/path/to/28_mcpsrv_in_extension/packages/server/dist/index.js"]
}
}
}2. SSE (Server-Sent Events)
For clients that support SSE (e.g. standard remote/web clients), connect to the following endpoints:
SSE stream endpoint:
http://localhost:13001/sseMessage POST endpoint:
http://localhost:13001/messages
3. Streamable HTTP
For standard Streamable HTTP clients, point to:
Endpoint:
http://localhost:13001/mcp
Load the extension in Chrome
Run
npm run build.Open
chrome://extensions.Enable Developer mode.
Click
Load unpacked.Select
packages/extension/dist.
The extension now declares the nativeMessaging permission. Once a native host manifest for com.agentic_browser_mcp.host is registered for the extension ID, the service worker will try to launch the local bridge daemon automatically on startup and on reconnect. A manifest template is included at packages/server/native-host/com.agentic_browser_mcp.host.template.json.
Manual pairing override
The extension can work without importing anything. In token mode, the startup pairing tab is usually enough. If you still want to force a specific endpoint or token manually, you can import the server-generated pairing JSON:
Open the extension options page.
Either:
click the extension toolbar icon, which opens the options page, or
open the extension details page and choose
Extension options.
Load
~/.agentic-browser-mcp/agentic-browser-mcp.pairing.jsonwith the file picker, or paste its contents into the textarea.Click
Import Pairing JSON.
The extension stores the validated pairing data in chrome.storage.local, prefers that endpoint first, and then falls back to range scanning if needed.
Useful scripts
npm run build
npm run extension:build
npm run server:dev
npm run server:start
npm run cleanNotes
The extension requires the
storage,offscreen,tabs,scripting, andnativeMessagingpermissions declared in the manifest.With the default loopback auth mode, users do not need to pair the server and extension manually.
The native host entrypoint is exposed as
agentic-browser-mcp-native-hostand launchesbridgeDaemon.jswithAGENTIC_BROWSER_MCP_OPEN_PAIRING_TAB=neverso users are not disturbed by a startup tab.In token mode, the extension can auto-capture pairing information from the dedicated startup tab.
If you use token auth, disable the startup tab, and let the server generate a fresh random token on each restart, re-import the new pairing JSON through the options page.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/CodesBlobs/CustomMCPs'
If you have feedback or need assistance with the MCP directory API, please join our Discord server