webmcp-gate
Click on "Deploy 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., "@webmcp-gate show the webmcp gate status and list the tools my logged-in tab offers"
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.
webmcp-gate
Let an agent use the tools of a web app you are logged in to, safely.
A small local relay connects your page to Claude Code, Codex or any MCP agent. Risky actions are approved by a person in the page, not by the agent. No browser extension. 한국어
agent ──(MCP · stdio)──▶ relay ◀──(WebSocket · 127.0.0.1)── your logged-in tab
runs the tools, asks you to approveExperimental (
0.1.0-alpha.0). Tried on macOS in headless Chrome, with a live Codex session and a live Claude Code session (read-only calls). Not tried on a production app or other browsers. What was checked
Why this one
A pairing code per session, never sent: both sides only prove they know it.
Allowed origins are listed one by one. No wildcard, nothing to switch off.
A person approves risky actions in the page, and the relay re-checks the call afterwards.
Thousands of tools? The agent gets
search,describe,readandcall.Your own MCP tools with
registerToolin a config file.
Related MCP server: WebMCP
Try it
git clone https://github.com/hon2be/webmcp-gate && cd webmcp-gate
npm install && npm run build
node examples/serve.mjs 01-hello # the page, on http://localhost:3000In another terminal:
cd examples/01-hello/server
node ../../../plugins/claude/dist/cli.mjs trust # approve the example config
claude --plugin-dir ../../../plugins/claudeAsk "show the webmcp-gate status", paste the wgate1.… string into the page, press Connect, then ask the agent to read demo.echo. For the approval dialog, try examples/02-approval.
Install the plugin
# Claude Code
/plugin marketplace add hon2be/webmcp-gate
/plugin install webmcp-gate@webmcp-gate
# Codex
codex plugin marketplace add hon2be/webmcp-gate
codex plugin add webmcp-gate@webmcp-gateOr run npx -y @webmcp-gate/server@next install claude (codex, all). Node 20+ is enough.
Use it in your app
npm i @webmcp-gate/client@nextimport { connectBridge } from "@webmcp-gate/client";
const host = connectBridge({ connection }); // the string the agent's `status` tool shows
await host.registerTool({
name: "app.items.list",
description: "Lists items",
annotations: { readOnlyHint: true }, // read-only tools run with `read`
execute: async () => ({ ok: true, result: [] }),
});More in docs/integrating.md. The wire protocol is documented (docs/protocol.md), so you can write your own client.
Packages: @webmcp-gate/client (your page), @webmcp-gate/server (relay and CLI), @webmcp-gate/protocol (shared types). All are 0.1.0-alpha.0, so install them with @next.
Config
Put webmcp-gate.config.ts in your project, like vite.config.ts. webmcp-gate init creates one.
import type { Config } from "@webmcp-gate/server";
export default {
origins: ["http://localhost:3000"],
tools(server, bridge, z) { // your own MCP tools
server.registerTool("list_menus", { description: "Lists menus", inputSchema: { keyword: z.string().optional() } },
async ({ keyword }) => ({ content: [{ type: "text", text: JSON.stringify(await bridge.call("app.menu.list", { keyword })) }] }));
},
} satisfies Config;A config is code, so it runs only after you approve it with webmcp-gate trust. Agents cannot approve it. All fields are in docs/config.md.
What the agent sees
Tool | Does |
| State and the connection string |
| Finds page tools |
| One tool's input shape |
| Runs a read-only page tool |
| Runs any other page tool |
| Optional. Attaches a file from the one folder you allow |
Safety
Listens on
127.0.0.1only. Only the origins you list can connect.A 20-character pairing code per session (about 100 bits). Wrong tries are rate-limited.
Approval stays in the page. The relay re-checks the call after you approve.
One tab at a time.
attach_fileis off unless you set a folder, and it stays inside it.A config runs only after
trust, as a single file.
Details and limits: docs/security.md.
More
What was checked · Related projects · Roadmap · Architecture · Plugins · Privacy
Develop
npm install
npm test # typecheck, build, end-to-end testsplugins/*/dist/cli.mjs is committed (twice) because a plugin runs alone from its folder. After changing source, run npm run build and commit the result.
MIT licensed.
If this project is useful to you, starring the repository helps other people find it.
Available Tools
5 toolscallBDestructive
Runs a tab tool by name. This includes clicking, saving, deleting and deploying. The page may ask the user to approve.
Inputs: name (required), input.
describeBRead-only
Shows one tab tool's description and input shape.
Inputs: name (required).
readARead-only
Runs a read-only tab tool. Put the tab tool's name in name. Use call for tools that change things.
Inputs: name (required), input.
searchARead-only
Finds tools of the connected tab. Returns those whose name or description contains every word of query.
Inputs: limit, query, offset, prefix.
statusARead-only
Shows whether a tab is connected, and the connection string to paste into the page to connect.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clear primary role: status for connection, search for discovery, describe for inspection, read and call for execution. The only overlap is read vs. call, since read is a restricted subset of call, but the descriptions explicitly say to use call for anything that changes state, which resolves most confusion.
All names are short, lowercase, single-word and prefix-free, giving a predictable vocabulary. The only minor deviation is that status is a noun while the others are verbs (search, describe, read, call), but the set still reads as a coherent convention.
Five tools is exactly right for a gateway: connect, discover, inspect, execute-read, execute-write. Each tool earns its place with no redundant surface area.
The lifecycle of discovering and invoking tab tools is fully covered, including a safety split between read-only and mutating execution. Minor gaps exist, such as no explicit disconnect/reset operation or a way to enumerate all tools without a query, but agents can work around these.
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Browz hosted MCP (free public beta): let an AI app drive your own Browz browser profiles from anywhere. Connect https://mcp.gobrowz.com/mcp and sign in with your Browz account (OAuth) or an agent token. Each call is relayed to the Browz app on your computer, which must be online with Remote control on and have a hardware security chip (Mac Secure Enclave or TPM 2.0). 17 tools: profiles, tabs, navigate, snapshot, act, wait, screenshot. Cookies, downloads and stored sign-ins stay on your computer.
Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that runs in the browser, letting web pages register custom tools and prompts and expose them to an MCP client over WebSocket. Enables agents to drive UI, call page-scoped APIs, and get human-in-the-loop confirmation.11 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables browser-based AI chat interfaces to use local MCP tools by injecting a tool-call protocol into the page and executing approved filesystem, shell, and downstream MCP tool calls from a local daemon.-
- FlicenseNot gradedqualityAmaintenanceExposes an OAuth-gated MCP endpoint with 38 governed tools that let web-based AI chat clients read and edit local files, run whitelisted shell commands, search, use Git and SQLite, fetch localhost/intranet APIs, automate Chromium and DevTools, and manage background tasks, ports, clipboard, notifications, and Postman. Local IDEs can connect directly over 127.0.0.1, while remote clients reach the same machine through a secure public ingress.-
- AlicenseNot gradedqualityAmaintenanceExposes a governed suite of 38 OAuth-gated tools over one MCP endpoint, letting web-based AI chat clients read and edit files, run whitelisted shell commands, search, and use Git, SQLite, browser automation, DevTools, background tasks, ports, clipboard, notifications, and localhost services on the user's own machine. It also allows local IDEs and automation tools to connect directly over localhost for offline, low-latency access.MIT