Deputy
We taught a website to describe itself to an agent — without its cooperation.
Add to Chrome · Deputy Pro · launch film · ·
接入你的智能体
从发布者处安装。不是 PlugMCP 端点。
远程 URL 还是本机命令? 两种安装方式的区别
来自发布者
We taught a website to describe itself to an agent — without its cooperation.
Add to Chrome · Deputy Pro · launch film · ·
An agent in your browser that turns any page into a typed API for other agents; Grafts WebMCP onto sites that never adopted it. Works with any MCP client.
This repository is the free, open-source version of Deputy: you build it from source, and forms
as tools need Chromium's WebMCP flag. The full Deputy is on the
Chrome Web Store.
Deputy Pro (hosted models, browser_look): razin.ai/deputy.
Measured on a busy page. An admin page with 400 orders: filter them and count the matches. Claude Sonnet in Claude Code, the same prompt, median of three runs, every run passed. Measured with the full Deputy, not this open-source build.
Method: docs/measurements.md §0.
Deputy is an agent that lives in your browser. Any MCP client — Claude Code, Codex, Cursor, your own agent — stops driving the browser itself and asks Deputy instead. It hands back a typed API for whatever page you are on, then performs the call in your real, logged-in session.
The page never enters the calling agent's context. No screenshot, no DOM, no accessibility tree.
A <form> already knows everything about itself. It knows a field is a required date, that a
dropdown has exactly three options, that a number must fall between 1 and 12. We throw all of that
away when we render to pixels, and then pay a language model to infer it back from a picture.
There is a W3C standard that fixes this — WebMCP, shipping in Chromium 152 — which lets a site declare its forms as agent-callable tools. Almost nobody has adopted it.
So Deputy adopts it on their behalf. It writes four HTML attributes onto the page's own form, and then Chromium itself generates the JSON Schema and executes the submission:
<form toolname="book_a_table" tooldescription="…">
<input name="party_size" type="number" min="1" max="12" toolparamdescription="Party size">
// what the agent receives — generated by the browser, not by us
{ "party_size": { "type": "number", "minimum": 1, "maximum": 12 },
"date": { "type": "string", "format": "date" },
"seating": { "type": "string", "enum": ["indoor", "outdoor", "bar"] } }
We wrote no schema generator and no form-filler. The browser already had both.
It also never submits for you. On any form that changes something, Deputy withholds WebMCP's auto-submit attribute, so Chromium fills the fields, focuses the submit button and waits for a person to press it. That is consent enforced by the browser, not by a check we could forget.
CopilotKit v2 ships a WebMCPRegistry that publishes an app's frontend tools to
document.modelContext — the same WebMCP registry Deputy grafts onto everything else. So the
integration needs no glue at all:
flowchart LR
ck["CopilotKit v2 app<br/>useFrontendTool(...)"] --> mc["document.modelContext"]
dp["Deputy<br/>grafts forms and ARIA widgets"] --> mc
mc --> bc["browser_capabilities"] --> agent["any MCP agent"]
Both directions work, and both are real:
document.modelContext that
CopilotKit reads through getWebMCPModelContext(). A CopilotKit copilot gains tools for forms its
developers never wired up.For CopilotKit v1, which predates the WebMCP registry, Deputy falls back to reading the actions
manifest as the app POSTs it to /api/copilotkit — read-only, request passed through untouched.
Capability without cooperation, same as the rest of Deputy.
<form>Most of the interesting web has no <form> element. Google Forms, React apps, anything that builds
a form out of divs. Deputy synthesizes the tool itself there — including the widgets that are not
form controls at all:
Measured on a Google-Forms-shaped page: 1 field captured before, 5 of 5 after. It also queries across open shadow roots, because a page built from web components looks empty otherwise.
Either way — real form or not — the agent makes one typed call. That equivalence is the point: falling back to "click this, then type that" hands the per-step cost straight back to the caller, which is the thing Deputy exists to remove.
Filling a 7-field booking form. Same prompt, same data, both through claude -p. Both succeeded.
Per observation, on the same Wikipedia page:
The baseline was given the accessibility-snapshot path, not just screenshots, so the comparison is
deliberately conservative. Method and both tasks: docs/measurements.md.
browser_capabilities first returned tool names only, to keep the payload small. The agent had
to probe for parameter names: 246,003 tokens. Returning full schemas: 155,774. Adding more
still — current values, plus every button and link with a clickable ref: 133,366, 6 turns.
~5× more data made the task 1.8× cheaper. Every probe an agent is forced to make costs more than the context that would have prevented it.
Ten, and they never change as you browse, so the caller's context stays flat.
Long pages are windowed, never silently truncated: Wikipedia's 263 links come back as
"Showing 1-25 of 263" with actionQuery to filter and actionOffset to page.
Deputy is not Claude with extra steps. It runs qwen/qwen3.7-flash via OpenRouter, because reading a
page and choosing a form is not work that needs a frontier model. Claude thinks; Deputy browses.
With no API key it falls back to a keyword planner and still works — the demo never depends on a second key being up.
bun install
cp .env.example .env # add OPENROUTER_API_KEY (optional — it degrades without one)
bun run dev # daemon + a Chromium carrying the extension
Then point any MCP client at http://127.0.0.1:7331/mcp — one streamable-HTTP endpoint, loopback
only, no auth. Deputy is not Claude-specific; it is the same ten tools whatever is calling.
Claude Code
claude mcp add --transport http deputy http://127.0.0.1:7331/mcp
Codex
codex mcp add deputy --url http://127.0.0.1:7331/mcp
Cursor — ~/.cursor/mcp.json, or .cursor/mcp.json for one project
{ "mcpServers": { "deputy": { "url": "http://127.0.0.1:7331/mcp" } } }
VS Code / GitHub Copilot — .vscode/mcp.json
{ "servers": { "deputy": { "type": "http", "url": "http://127.0.0.1:7331/mcp" } } }
Windsurf, Cline, Zed, Goose, Continue — the same mcpServers block as Cursor. Windsurf spells
the key serverUrl; Cline and Zed use url.
Claude Desktop, or any host that still speaks only stdio — bridge it:
{ "mcpServers": { "deputy": {
"command": "npx", "args": ["-y", "mcp-remote", "http://127.0.0.1:7331/mcp"] } } }
Your own agent — POST JSON-RPC at the endpoint, or hand the URL to an MCP SDK's
streamable-HTTP client. scripts/sweep.ts is a working client in about ten
lines, and doubles as a smoke test.
bun test # 88 unit tests, never launches a browser
bun run test:browser # 10 integration tests against real Chromium
bun run demo # serve the example pages used in the video
bun scripts/sweep.ts # point Deputy at 8 real sites and see what it makes of each
flowchart LR
client["Any MCP client<br/>Claude Code · Cursor · …"] -- MCP --> deputyd
subgraph deputyd ["deputyd (Bun)"]
direction TB
registry["registry: tabs → tools"]
tasks["tasks: A2A-shaped states"]
planner["planner: qwen (optional)"]
end
deputyd -- WebSocket --> extension
subgraph extension ["extension (MV3)"]
direction TB
graft["graft: annotate real forms"]
synth["synthesize: everything else"]
content["content: getTools / executeTool"]
end
extension --> webmcp["Chromium's own WebMCP"]
The daemon exists because an MV3 service worker dies after 30 s idle and cannot listen on a port.
The content script runs in the ISOLATED world, so Deputy never needs chrome.debugger and you never
see the "extension is debugging this browser" banner.
Design notes and invariants: ARCHITECTURE.md.
PinchTab solves an adjacent problem well — browser control
for agents without screenshots, via an accessibility tree with element refs. Its fill <ref> and
text commands inspired browser_fill and browser_read.
The difference: PinchTab gives an agent a better map of the page. Deputy gives it a typed API. A seven-field form is one validated call rather than seven ref-targeted actions, and Chromium performs the submission natively because the form was retrofitted into a real WebMCP tool.
Tested and running: the retrofit engine, ARIA-widget synthesis, shadow-DOM traversal, in-app copilot manifest capture, tool naming, the tab registry, the task lifecycle, the extension, the daemon, and every number above. 85 unit + 10 integration tests, the latter against live Chromium.
Not built: the A2A wire format. Deputy's task states are A2A's vocabulary — input_required,
auth_required, because a browser agent hits login walls constantly — but no Anthropic product
speaks A2A, so MCP got the time. Multi-page navigation memory is designed in ARCHITECTURE.md §8
and not built.
Known limits: needs chrome://flags/#enable-webmcp-testing (WebMCP is in origin trial through
Chrome 156). A live Google Form is untested — the fixture replicating its DOM passes, but Google's
real page is heavily obfuscated. Capabilities behind an interaction are invisible until you take it:
MDN's search lives in a modal, so Deputy offers the button, not the field.
Every bug that mattered was found by running it. executeTool in Chromium 152 wants its arguments as
a JSON string; passing an object stringifies to [object Object] and fails. That cost one full run
— 19 turns, 452,165 tokens — of Claude patiently working around a broken tool. The rest are in
docs/measurements.md.
PolyForm Shield 1.0.0. Use it, change it and share it for anything, including at work, except to provide a product that competes with Deputy. Re-publishing it counts as competing, even for free.
Versions up to and including commit 5d38eee were released under the MIT License.
An agent in your browser that turns any page into a typed API for other agents; Grafts WebMCP onto sites that never adopted it. Works with any MCP client.
工具
暂无工具列表。远程服务器在首次健康检查后会获得工具列表。
常见问题
在本页复制适用于 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 配置。它使用发布者的安装方式,而不是 PlugMCP 代理。
此记录未列出必需的环境变量。
Deputy 通过 stdio 在本地运行。
上次检查时间:2026-10-28。 An agent in your browser that turns any page into a typed API for other agents; Grafts WebMCP onto sites that never adopted it. Works with any MCP client.