browser-screenshot-mcp

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.

Category
Visit Server

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

  1. A loopback-only daemon pairs with the extension using a random local token.
  2. The extension creates an opaque capability and a video-only tabCapture stream when you explicitly share the active HTTP(S) tab.
  3. Codex or Claude Code can list only the aliases and capabilities you shared—not the browser's tab list.
  4. The shared tab displays an AUTO badge and remains available across navigation and while it is in the background.
  5. The MCP client requests a screenshot for one capability. The extension reads the current frame without activating or focusing the tab.
  6. 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:

  1. Open chrome://extensions or brave://extensions.
  2. Enable Developer mode.
  3. Select Load unpacked and choose the repository's extension directory.

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

  1. Open the page you want the agent to see.
  2. Open the extension and select Share this tab. Use a non-sensitive alias such as local-app.
  3. Navigate or switch tabs normally. The share remains bound to that same tab without requiring focus.
  4. Ask your MCP client to list shared tabs and take a screenshot. No per-screenshot browser approval is required.
  5. Select Stop sharing when finished.

Available MCP tools:

  • bridge_status
  • list_shared_tabs
  • request_screenshot
  • get_screenshot
  • stop_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.1 and 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

MIT

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured