← Catalog

pi-webmcp

A Pi extension that connects Pi to webpages that register WebMCP tools.

Extension

Install

Install with PiG

pig install npm:pi-webmcp

Install with Pi

pi install npm:pi-webmcp
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    ".pi/extensions/pi-webmcp.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.2.0 (README.md). PiG does not review it.

pi-webmcp

A Pi extension that connects Pi to webpages that register WebMCP tools.

[!IMPORTANT]

Both the WebMCP specification and Chrome’s implementation are in active development. Anticipate breaking changes that affect this extension.

[!CAUTION]

This extension can pose a security risk in its default operating mode once the /webmcp command is run. A malicious webpage could poison the running Pi session’s context via its WebMCP tool instructions.

Use at your own risk. Consider setting allowedOrigins to restrict which webpages Pi can connect to.

Demo

Demo video thumbnail

First-time Setup

  1. Install this extension via npm.

    pi install npm:pi-webmcp
    
  2. Enable Chrome remote debugging by visiting chrome://inspect/#remote-debugging.

Chrome remote debugging settings

  1. Enable the relevant Chrome flags for WebMCP.

Chrome WebMCP flags

Usage

  1. Run /webmcp and accept the once-per-session confirmation prompt in Chrome.

Chrome remote debugging permission prompt

  1. Navigate to a WebMCP-capable page, such as Chrome Lab’s WebMCP Travel demo.

    More can be found here.

Commands

  • /webmcp or /webmcp connect — Connect to Chrome and discover WebMCP tools.
  • /webmcp disconnect — Disconnect from Chrome WebMCP.
  • /webmcp list — Show active WebMCP tools.

Options

Configure WebMCP options under the webmcp key in Pi settings, either globally in ~/.pi/agent/settings.json or per trusted project in .pi/settings.json:

{
  "webmcp": {
    "allowedOrigins": ["googlechromelabs.github.io"]
  }
}
OptionDescription
webmcp.allowedOriginsWhen specified, Pi will only discover and connect to WebMCP tools from these origins.
webmcp.disallowedOriginsWhen specified, Pi will not discover or connect to WebMCP tools from these origins.

Browser Support

WebMCP is currently only implemented in Chrome, so this extension is scoped to Chromium-based browsers for now. We plan to support additional browsers if / when they implement WebMCP.