Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Copilot Bridge logo

Copilot Bridge: Page Context Extension

Microsoft Intern Hackathon 2026

Copilot Bridge is a Chrome/Chromium browser extension prototype that lets a Copilot CLI session understand the web page you are working with. Instead of copying page text, exporting tables, or describing the screen by hand, you can explicitly share structured browser context with Copilot through a local bridge.

This is a demo/prototype, not a published browser-store product. It is designed to show how an agent can inspect a user-approved page, explain what it sees, guide the user with on-page annotations, and optionally take tightly gated browser actions.

Why this exists

AI assistants are most helpful when they can see the same working context as the user. Browser pages often contain the task state: docs, dashboards, forms, tables, search results, or setup flows. Copilot Bridge gives Copilot a controlled way to see that context from the browser, while keeping the user in charge of what is shared and what actions are allowed.

With the bridge, Copilot can:

  • Summarize the current page without copy/paste.
  • Inspect page metadata, visible text, semantic structure, tables, forms, links, and action or annotation targets.
  • Include an optional screenshot when visual context is useful.
  • Follow along as the user moves through page or tab changes.
  • Draw educational annotations, highlights, and step-by-step guidance directly on the page.
  • Perform gated browser actions only when the user enables them.

Extension UI

Copilot Bridge extension popup

Basic architecture

Copilot Bridge architecture diagram

The browser extension stays local to the user. The local MCP server is the bridge between the extension and the Copilot CLI session.

Core capabilities

Share structured browser context

Copilot can inspect the active page or, when enabled, discover matching open tabs. Captures are designed to be useful to an agent without sending unnecessary raw page noise.

Context can include:

  • URL, title, canonical URL, language, and page metadata.
  • Current text selection.
  • Visible headings, landmarks, and semantic page text.
  • Tables represented as rows and cells.
  • Form and control metadata.
  • Links and images with tracking parameters stripped where possible.
  • Annotation and action targets for visible page elements.
  • Optional viewport screenshot.

Raw HTML is not sent by default because it is noisy, token-expensive, and can include hidden data the user did not intend to share.

Guide with annotations

Copilot can place local visual guidance on the page, such as:

  • Comments explaining what to look at next.
  • Highlights around important areas.
  • Cursor-style pointers.
  • A local stepper so the user can advance through a visible workflow at their own pace.

Annotations are intended for teaching and demos: Copilot can point, explain, and follow along while the user remains in control.

Follow page and tab changes

For guided workflows, Copilot can wait for the page to change, inspect the new state, and continue from there. This supports common flows like opening documentation, following setup links, moving between tabs, or waiting for a dynamic page to update.

Use gated browser actions

The prototype can also perform limited user-like browser actions, such as clicking, typing, pressing keys, scrolling, or opening a new tab. These actions are off by default and require explicit user-controlled toggles in the extension. The bridge does not provide arbitrary JavaScript execution.

Privacy and safety model

Copilot Bridge is intentionally user-controlled:

  • The extension is loaded by the user and connects to a local bridge endpoint.
  • Page context is shared through explicit Copilot tool calls or extension actions; it is not a silent background stream.
  • Screenshots are off by default.
  • Tab discovery is off by default.
  • Agent browser actions are off by default.
  • Opening new tabs has a separate toggle.
  • Browser actions are constrained to common user-like interactions.
  • The bridge does not support arbitrary JavaScript execution in pages.
  • Page content should be treated as sensitive. Review the current page before sharing it with an agent session.

The prototype includes basic redaction heuristics for likely emails, tokens, and secret-looking key/value strings, but redaction is not a guarantee. Do not share pages that contain sensitive information unless you are comfortable with that content being included in the Copilot session context.

Setup

Prerequisites

  • Chrome or another Chromium-based browser.
  • Node.js for the local bridge process.
  • GitHub Copilot CLI with MCP support.
  • A local clone of this repository.

1. Clone the repository

git clone https://github.com/abenomran/copilot-bridge.git
cd copilot-bridge

If you already have the repository locally, use that folder instead.

2. Load the extension in Chrome

  1. Open chrome://extensions.
  2. Enable Developer mode.
  3. Select Load unpacked.
  4. Choose the repository folder.
  5. Click the extension action to open the popup.

3. Configure the local MCP bridge

Configure Copilot CLI to launch the bridge command from this repository:

C:\path\to\copilot-bridge\server\mcp-bridge.cmd

The bridge listens for the extension at:

ws://127.0.0.1:8787/session

After adding or changing MCP configuration, restart Copilot CLI so the browser tool is available.

4. Connect the extension

Open the extension popup. It should connect to the local bridge. If it shows as disconnected, start or restart Copilot CLI with the MCP server configured, then select Connect bridge in the popup.

Optional capabilities are controlled from Additional options in the popup:

  • Viewport screenshot: include visible-page screenshots in captures.
  • Tab discovery: allow Copilot to search open tab titles and URLs.
  • Agent actions: allow direct browser-control actions such as click, type, key press, and scroll.
  • Open new tabs: allow Copilot to create new tabs. Closing tabs is intentionally not supported.

Try it

In Copilot CLI, approve the browser context MCP tool for the session when prompted. Example prompts:

Look at my current browser tab and summarize what is visible.
Inspect this page and point out the fields I need to fill in next.
Follow along as I move through this setup page and annotate each next step.
Find my tab about the deployment dashboard and tell me what rows are visible.

For most browser work, the agent should use the single MCP tool exposed by the bridge:

browser_context.run

That tool supports inspecting the page, listing tabs when enabled, placing annotations, waiting for page changes, checking bridge status, and performing gated actions.

Local development notes

You can run the bridge directly for local testing:

cd C:\path\to\copilot-bridge
node .\server\mcp-bridge.mjs

A small test relay is also available for development experiments:

cd C:\path\to\copilot-bridge
node .\server\relay.mjs

The relay writes the latest received page-context message to server\last-context.json.

Project status

Copilot Bridge is a prototype/demo for exploring browser page context with Copilot CLI. It is not currently presented as a production-ready or Chrome Web Store-published extension. Contributions and experiments should preserve the same design goals: user control, local bridging, clear safety gates, and useful page context for the agent.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages