Package Exports
- @extension.dev/mcp
Readme
@extension.dev/mcp
Give your AI agent hands for browser extension development. One command connects Claude Code, Claude Desktop, Cursor, or any MCP client to 26 tools that scaffold, run, inspect, debug, and publish cross-browser extensions:
claude mcp add extension-dev npx @extension.dev/mcpExtensions fail silently: content scripts that never inject, panels that never open, permissions that return undefined with no error. These tools give agents eyes on the live browser (DOM probes, unified logs from every context, storage access, event replay) so they debug from evidence instead of guessing. Scaffolding draws on the 60+ template catalog of the extension.dev platform, built on Extension.js.
What's in this package
@extension.dev/mcp
src/ MCP server source (26 tools)
claude/ Claude Code integration (CLAUDE.md, slash commands, rules)
bin/ CLI entrypointMCP server: programmatic bridge between AI assistants and the extension.dev platform. Imports from published npm packages:
extension-create: project scaffoldingextension-develop: build/dev/previewextension-install: managed browser binaries
Claude Code integration: drop-in instructions, slash commands, and rules for Claude Code:
claude/CLAUDE.md: project-level instructions for any extension projectclaude/commands/: slash commands (/extension,/extension-add,/extension-debug,/extension-publish)claude/rules/: rules for extension development, cross-browser compat, and MCP tools
Agent Skill: the knowledge companion to this server lives in @extension.dev/skill: a portable Agent Skills-format skill (SKILL.md + references) covering cross-browser rules, silent-failure gotchas, debugging playbooks, and store publishing. This server gives agents hands; the skill gives them judgment. Pair them:
mkdir -p .claude/skills && cp -R node_modules/@extension.dev/skill/skills/extension-dev .claude/skills/Browser-launching tools (dev, start, preview) shell out to the extension CLI since they require the full browser launcher infrastructure.
Setup
Claude Code
claude mcp add extension-dev npx @extension.dev/mcpClaude Desktop / .mcp.json
{
"mcpServers": {
"extension-dev": {
"command": "npx",
"args": ["@extension.dev/mcp"]
}
}
}Claude Code integration (manual)
Copy the Claude Code rules and commands into any extension project:
# Rules (how Claude understands your project)
cp node_modules/@extension.dev/mcp/claude/CLAUDE.md ~/my-extension/.claude/CLAUDE.md
# Slash commands
mkdir -p ~/my-extension/.claude/commands
cp node_modules/@extension.dev/mcp/claude/commands/*.md ~/my-extension/.claude/commands/Tools
| Tier | Tool | Integration | Description |
|---|---|---|---|
| 1 | extension_create |
extensionCreate() |
Scaffold from a template |
| 1 | extension_list_templates |
native | Browse 60+ templates |
| 1 | extension_build |
extensionBuild() |
Build for production |
| 1 | extension_dev |
CLI spawn | Dev server with HMR |
| 1 | extension_start |
CLI spawn | Build + preview |
| 1 | extension_preview |
CLI spawn | Preview production build |
| 2 | extension_get_template_source |
native | Read template source files |
| 2 | extension_manifest_validate |
native | Cross-browser manifest validation |
| 2 | extension_inspect |
native | Build output analysis |
| 2 | extension_source_inspect |
CDP WebSocket | Live DOM inspection |
| 2 | extension_dom_inspect |
agent bridge | CDP-free DOM snapshot |
| 2 | extension_list_extensions |
CDP WebSocket | List loaded extensions (Chromium) |
| 2 | extension_logs |
agent bridge | Stream logs from every context |
| 2 | extension_wait |
native | Poll ready.json contract |
| 2 | extension_add_feature |
native | Add sidebar/popup/content script |
| act | extension_eval |
agent bridge | Eval in a context (--allow-eval) |
| act | extension_storage |
agent bridge | Read/write chrome.storage |
| act | extension_reload |
agent bridge | Reload extension or tab |
| act | extension_open |
agent bridge | Open surface / trigger action,command |
| 3 | extension_install_browser |
extensionInstall() |
Install managed browser |
| 3 | extension_list_browsers |
getManagedBrowsersCacheRoot() |
List managed browsers |
| 3 | extension_detect_browsers |
native | System browser detection |
| auth | extension_login |
platform | GitHub device-code → stored token |
| auth | extension_whoami |
native | Show stored login (no token) |
| auth | extension_logout |
native | Remove stored credentials |
| auth | extension_publish |
platform | Publish to extension.dev (token) |
Development
pnpm install
pnpm compile # Build with rslib
pnpm test # Run tests
pnpm start # Start MCP serverPublishing
NPM_TOKEN=<token> pnpm publishUses prepublishOnly to run tests and compile before publishing.
The extension.dev open source stack
| Package | Use it to |
|---|---|
@extension.dev/skill |
Teach agents the cross-browser rules and silent-failure gotchas |
@extension.dev/deploy |
Ship to Chrome, Firefox, and Edge stores from CI |
@extension.dev/artifact-integrity |
Gate releases on artifact verification |
@extension.dev/compiler |
Build extensions in the browser with esbuild-wasm |
@extension.dev/core |
Authenticate and publish to the extension.dev platform |
All of it rides on Extension.js, the open-source cross-browser extension framework.
License
MIT