edge-mcp-implement
edge-mcp-implement
Turn an approved Edge MCP plan into working code: install @napster-corp/edge-mcp, lay out the integration, register the plan's tools and live-state resources against the app's real code, and verify it at runtime. The result is vendor-neutral WebMCP — any compatible agent can drive it.
Prerequisite: an approved plan. This skill implements decisions; it does not make them. If there is no approved plan from edge-mcp-plan (the tool list with safety levels, the resource list with gate justifications, the withholds), stop and run that skill first. Everything below assumes the plan exists — never add tools or resources beyond it, and if implementation reveals a problem with the plan, go back to the developer instead of silently deviating.
Hard rule — do not write or modify a single file until the developer has explicitly approved the plan. Not a green light inferred from them answering a design question ("yes, cart writes should navigate"), not "looks good?" going unchallenged — an actual, standalone "yes, build it" (or equivalent). If you cannot point to that explicit go-ahead, stop here and get it (that's edge-mcp-plan's closing approval step). Answering the planning questions is not approval. This is the single most important gate in the whole flow; a past run skipped it by treating answered clarifying questions as consent and wrote 25 tool files before anyone said go. Do not repeat that.
Sections 2–6 are the specification for what you build in section 1. Read them before writing files, not after.
1. Install the package and wire the integration
npm install @napster-corp/edge-mcp
If npm reports removing dozens of packages or flags vulnerabilities, that's the app's own tree, not edge-mcp. Edge MCP itself is small — the package plus one runtime dependency (@cfworker/json-schema, its schema validator). It pulls in nothing else at install time. When npm install prints lines like "removed 66 packages" or "2 vulnerabilities (1 high)", that's npm reconciling and auditing the app's existing dependency tree while it rewrites the lockfile — it's not something Edge MCP added. (The one optional peer, @anthropic-ai/claude-agent-sdk, is only needed if the developer later opts into the git-hook automation, and is never installed by this step.) Say this plainly if the developer is alarmed, rather than letting the noise erode trust.
Importing the package is a browser-only side effect: it polyfills the WebMCP standard so document.modelContext exists, and installs a live-state resource extension on it.