browser-screenshot-mcp
Enables local MCP clients to capture screenshots of explicitly shared browser tabs without broad browser permissions. Prioritizes privacy by sharing only user-selected tabs, with automatic screenshot retrieval and no global tab access.
README
Browser Screenshot MCP
Give a local MCP client screenshots of one explicitly shared browser tab without granting access to every tab.
The Chromium extension has no global tab-list, debugger, cookie, history, web-request, content-script, or all-sites permission. A tab becomes available only after you open the extension on that tab and select Share this tab. Screenshots of that exact tab are then automatic until you stop sharing it or the capture session ends.
Privacy model
- A loopback-only daemon pairs with the extension using a random local token.
- The extension creates an opaque capability and a video-only
tabCapturestream when you explicitly share the active HTTP(S) tab. - Codex or Claude Code can list only the aliases and capabilities you shared—not the browser's tab list.
- The shared tab displays an
AUTObadge and remains available across navigation and while it is in the background. - The MCP client requests a screenshot for one capability. The extension reads the current frame without activating or focusing the tab.
- The MCP client retrieves the image once; the bridge then deletes its in-memory copy.
There is no wall-clock share expiry. A share ends when you stop it, close the tab, restart the browser, reload the extension, or the capture stream otherwise ends. Incognito and non-HTTP(S) pages cannot begin a share. Chromium displays its own capture indicator for the lifetime of the stream.
Requirements
- Node.js 22.18.0 or newer
- Chrome 116+, Brave, Edge, or another compatible Chromium browser
- Codex or Claude Code with local stdio MCP support
Quick start
git clone https://github.com/szichedelic/browser-screenshot-mcp.git
cd browser-screenshot-mcp
npm ci
npm run build
REPO_DIR="$(pwd -P)"
Load the extension:
- Open
chrome://extensionsorbrave://extensions. - Enable Developer mode.
- Select Load unpacked and choose the repository's
extensiondirectory.
Pair it with the local bridge:
node "$REPO_DIR/dist/cli.js" pairing-code
node "$REPO_DIR/dist/cli.js" serve
The first command copies the code to your system clipboard and never prints it. Leave the bridge running, open the extension's Options, paste the code, keep port 39393, and save.
Add the MCP server to Codex:
codex mcp add browser-screenshot -- node "$REPO_DIR/dist/cli.js" mcp
codex mcp list
Or add it to Claude Code:
claude mcp add --transport stdio --scope user browser-screenshot -- node "$REPO_DIR/dist/cli.js" mcp
claude mcp get browser-screenshot
The MCP adapter starts the bridge automatically, so the manual serve process can be stopped after setup. See Configuration for client scopes, Windows commands, token rotation, custom paths, and troubleshooting.
Use it
- Open the page you want the agent to see.
- Open the extension and select Share this tab. Use a non-sensitive alias such as
local-app. - Navigate or switch tabs normally. The share remains bound to that same tab without requiring focus.
- Ask your MCP client to list shared tabs and take a screenshot. No per-screenshot browser approval is required.
- Select Stop sharing when finished.
Available MCP tools:
bridge_statuslist_shared_tabsrequest_screenshotget_screenshotstop_sharing
There is intentionally no tool for enumerating browser tabs, matching titles or URLs, activating another tab, or capturing whichever tab happens to be active.
Security boundaries
- The bridge binds only to
127.0.0.1and authenticates the extension and MCP adapter. - Only a user-provided alias—not the tab URL or title—is sent to the daemon.
- Tab and window IDs remain inside the extension.
- No audio track is requested, processed, or sent.
- Screenshots are not written to disk by this project. Requests expire after two minutes and ready images are one-time reads.
- The pairing token is stored in browser-local extension storage and a user-only local configuration file.
- A dedicated browser profile containing only agent-safe tabs is recommended as an additional boundary.
This project does not defend against software already running as your operating-system user. Once an MCP client receives a screenshot, that client's own retention and data-handling policies apply. See Security model for the complete boundary and reporting instructions.
Development
npm run check
npm test
npm run build
node dist/cli.js doctor
See CONTRIBUTING.md before changing permissions or the bridge protocol. The protocol deliberately never carries URLs, titles, cookies, page DOM, browsing history, stream identifiers, or an unshared-tab inventory.
License
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.