Etch Agent Bridge
Controls the Etch builder within a WordPress admin session, enabling management of blocks, styles, components, navigation, and document saving directly from MCP-capable agents.
Click on "Install 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., "@Etch Agent Bridgechange the hero section background to dark blue"
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.
Etch Agent Bridge
Local Chrome extension plus MCP server for controlling the Etch builder from MCP-capable agents such as Claude, Codex, opencode, Cursor, or similar tools.
This is not an AI chat product and it does not need model API keys. Your agent client provides the AI model. This project only connects that client to an already-open Etch builder tab through the Etch Public API.
What You Get
A Chrome MV3 extension that can see Etch builder tabs only when the URL contains
etch=magic.A local stdio MCP server that exposes Etch tools to your agent.
A local WebSocket relay on
ws://127.0.0.1:8787so several MCP clients can share the same browser extension.Direct Etch edits for blocks, styles, loops, components, navigation, history, UI color scheme, and document saving.
Related MCP server: Chrome MCP Server
Prerequisites
Git.
Bun 1.x or newer: https://bun.sh/docs/installation
Chrome, Chromium, Brave, Edge, or another Chromium browser that supports unpacked extensions.
An authenticated WordPress admin session with Etch installed.
An Etch builder page where
window.etchis available.One MCP-capable client, for example Claude Code, Claude Desktop, Codex, opencode, Cursor, or Windsurf.
Install And Build
Clone the repo and build the extension:
git clone https://github.com/honestlydesign/etch-agent-extension.git
cd etch-agent-extension
bun install
bun run buildThe browser extension build is created at:
apps/extension/distLoad The Extension
Open
chrome://extensionsin your Chromium browser.Enable
Developer mode.Click
Load unpacked.Select the
apps/extension/distfolder from this repo.Keep the extension installed while you use an MCP agent.
After every bun run build, reload the extension on chrome://extensions and reload the Etch builder tab.
The extension has a status popup only. It does not contain an editor UI.
Open An Etch Target
Log into WordPress in the same browser.
Open the Etch builder for the page or template you want to edit.
Add
etch=magicto the URL.
Examples:
https://example.test/wp-admin/admin.php?page=etch-builder&etch=magic
https://example.test/wp-admin/admin.php?page=etch-builder&post=123&etch=magicIf the URL already has query parameters, use &etch=magic. If it has no query parameters, use ?etch=magic.
The extension intentionally ignores pages without etch=magic.
Configure MCP
Each MCP client should launch the same local server:
cd /ABS/PATH/etch-agent-extension && bun run apps/mcp/src/index.ts --client-name <client-name>Use the absolute path to your cloned repo. If the MCP client cannot find bun, run which bun and replace bun in the command with the absolute Bun path.
The first MCP server process starts the relay host on port 8787. Later MCP clients connect through that existing relay. This means Claude, Codex, and opencode can all have this MCP configured at the same time. Only one agent should mutate the Etch canvas at a time.
The JSON examples below show only the relevant MCP entry. If your client already has a config file, merge the etch-agent entry into it instead of replacing the whole file. Do not commit project MCP config with your private absolute path.
Claude Code Or Claude Desktop
For Claude Code, use a project .mcp.json or your normal Claude MCP config. For Claude Desktop, put the same mcpServers block in claude_desktop_config.json.
{
"mcpServers": {
"etch-agent": {
"command": "bash",
"args": [
"-lc",
"cd /ABS/PATH/etch-agent-extension && exec bun run apps/mcp/src/index.ts --client-name claude"
]
}
}
}Restart Claude after changing the config.
Codex
Add an MCP server entry to ~/.codex/config.toml:
[mcp_servers.etch-agent]
command = "bash"
args = ["-lc", "cd /ABS/PATH/etch-agent-extension && exec bun run apps/mcp/src/index.ts --client-name codex"]Restart Codex after changing the config.
opencode
Add a local MCP entry to ~/.config/opencode/opencode.json:
{
"mcp": {
"etch-agent": {
"type": "local",
"command": [
"bash",
"-lc",
"cd /ABS/PATH/etch-agent-extension && exec bun run apps/mcp/src/index.ts --client-name opencode"
]
}
}
}Restart opencode after changing the config.
Cursor, Windsurf, And Other MCP Clients
Most MCP clients use the same JSON shape as Claude:
{
"mcpServers": {
"etch-agent": {
"command": "bash",
"args": [
"-lc",
"cd /ABS/PATH/etch-agent-extension && exec bun run apps/mcp/src/index.ts --client-name cursor"
]
}
}
}If your client supports a cwd field, you can also set cwd to the repo path and use command: "bun" with args: ["run", "apps/mcp/src/index.ts", "--client-name", "your-client"].
Verify The Setup
Start or restart your MCP client.
Open an Etch builder tab with
etch=magic.Open the extension popup. It should show relay and target status.
Ask your agent to list Etch targets or inspect the selected block.
Useful first prompt:
Use the Etch MCP tools to list available targets, inspect the selected block, and do not save anything.If the agent sees a target, the extension and MCP server are connected.
Save Behavior
Most mutation tools change the Etch canvas immediately but do not persist to the WordPress database until etch_save_document is called.
The agent should call etch_save_document only when you explicitly ask it to save. Until then, browser navigation or document switching can discard unsaved edits, depending on Etch behavior.
Component upserts and component deletes are different: Etch persists them immediately through the component API.
Troubleshooting
No Etch target appears:
Make sure the builder URL contains
etch=magic.Make sure the WordPress session is authenticated in the same browser.
Make sure the extension is loaded from
apps/extension/dist.Reload the extension and then reload the Etch builder tab.
Ask the agent to call
etch_list_targetsagain.
The MCP client starts but bun is not found:
Run
which bun.Replace
bunin the MCP config command with that absolute path.Restart the MCP client.
Port 8787 is busy:
If another Etch Agent Bridge MCP process is running, that is expected. New clients connect to it.
If a different process owns the port, stop that process and restart the MCP client.
--relay-port <port>exists for tests, but the browser extension expects8787by default.
The extension is connected but Etch tools fail:
Confirm the page is an actual Etch builder page.
Confirm
window.etchexists in that builder session.Reload the builder after reloading the extension.
Changes are not visible after editing code:
Run
bun run build.Reload the unpacked extension.
Reload the Etch builder tab.
Development Commands
bun install
bun run build
bun run typecheck
bun run test
bun run dev:mcpbun run dev:mcp starts the MCP server directly for local development. In normal use, your MCP client starts the server from its config.
Architecture
apps/extensionis the Chrome MV3 extension with a status popup, background relay connection, isolated content script, and MAIN-worldwindow.etchbridge.apps/mcpis the stdio MCP server. Each running MCP process either hosts the relay onws://127.0.0.1:8787or connects to the existing relay as a client.packages/sharedcontains shared schemas, target types, bridge protocol, activation logic, and MCP tool names.skills/etchapi/SKILL.mddescribes the agent workflow for agents working inside this repo.
Tool Coverage
Area | Tools |
Targets and status |
|
Blocks |
|
Styles |
|
Components |
|
Navigation |
|
Loops |
|
History and UI |
|
Save |
|
Fields and global stylesheets are not implemented in this bridge.
Validation Policy
This bridge is a thin pass-through to the Etch Public API. The MCP layer and page-bridge layer validate the structural shape of payloads with Zod, but they do not try to decide which content is safe or valid for Etch.
Selectors, class names, component keys, loop keys, CSS variable names, text, attribute values, CSS values, and JSON loop data are passed through.
Block types are forwarded to Etch. Etch is the source of truth for supported block types, tags, attributes, and payload shapes.
If Etch rejects a payload, the
window.etcherror is returned through the MCP tool result.
Mutations apply directly to the Etch canvas. Use etch_undo or etch_redo for Etch history operations, and use etch_save_document only when the document should be persisted.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/honestlydesign/etch-agent-extension'
If you have feedback or need assistance with the MCP directory API, please join our Discord server