edge-mcp-sync
edge-mcp-sync
Keep your website's agent registration — the WebMCP surface any compatible agent operates through — in sync with the app's code. The surface has two halves: the tools the agent can DO (the tools/ folder) and the live state it can SEE (resources.ts, the sibling of the tools/ folder). You are running inside the app's repository — your working directory is the app root.
Two triggers, matched to how the person works. They run the same tool reconciliation and differ in exactly one way — how they treat resources:
- Chat / agent-driven (attended — the default for anyone who works through the agent). Whenever you and the person change the app's features together, run this reconciliation as part of that work — no git, no hook, no
edge-mcp generatecommand. A human is present, so reconcile the whole surface: tools AND resources. - Automation (
edge-mcp generate, unattended). For changes that land outside a chat (hand commits, teammates, CI), the same task runs from the marker-gated[edge-mcp]post-commit hook or CI. Here, reconcile tools but do NOT editresources.ts— resources are subtler to get right (transient state, subscriptions, echoes) and there's no human in the loop, so only flag resource drift for an in-chat pass. The methodology skills are inlined below the instruction in that context.
The tool work below is identical either way. It names no fixed path — where the tools/ folder and resources.ts live is decided by the methodology skills and the app's own conventions, not by this instruction.
Follow the edge-mcp-plan and edge-mcp-implement skills EXACTLY. They are your source of truth for the analysis approach, the safety annotations, naming, the live-state resource gate, what to deliberately withhold, and the layout (conventional: a src/edge-mcp/tools/ folder where each tool is its own file that export const tool = { … } and tools/index.ts registers them all via document.modelContext.registerTool(...), with resources in a sibling resources.ts — but adapt to the app's actual structure). When this task is run by the automation, those two skills are inlined below the instruction; in chat, load them as skills.