crx-mcp
MCP server for Chrome extension testing. Access chrome.storage, Service Workers, declarativeNetRequest, and more directly from AI coding agents like Claude Code.
README
crx-mcp
MCP server for Chrome extension testing. Access chrome.storage, Service Workers, declarativeNetRequest, and more directly from AI coding agents like Claude Code.
Why?
Existing browser MCP servers (like Playwright MCP) can't access Chrome extension internals. crx-mcp fills this gap with 15 purpose-built tools for extension development and testing.
Quick Start
With Claude Code
Add to your .mcp.json:
{
"mcpServers": {
"crx-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "crx-mcp"]
}
}
}
Then in Claude Code:
> Load my extension from ./my-extension and check if storage is working
Claude will use extension_load, then storage_get to inspect chrome.storage
CLI
npx crx-mcp --extension-path ./my-extension --verbose
Tools (15)
Core
| Tool | Description |
|---|---|
extension_load |
Load an unpacked extension and launch Chrome. Returns extension ID. |
navigate |
Navigate to a URL. Returns title and status code. |
snapshot |
Accessibility tree snapshot of page, popup, or side panel. |
storage_get |
Read from chrome.storage (local/sync/session). |
storage_set |
Write to chrome.storage (local/sync/session). |
eval_service_worker |
Execute JavaScript in the Service Worker context. |
console_logs |
Get console logs from all contexts (page, SW, popup, sidepanel). |
Extension-Specific
| Tool | Description |
|---|---|
manifest_validate |
Validate manifest.json against MV3 requirements (no browser needed). |
open_popup |
Open the extension popup and return accessibility snapshot. |
open_sidepanel |
Open the side panel and return accessibility snapshot. |
dnr_rules |
List declarativeNetRequest rules (dynamic/session/static). |
permissions_check |
Compare declared vs granted permissions. |
Advanced
| Tool | Description |
|---|---|
screenshot |
Take a PNG screenshot (base64). |
network_requests |
List captured network requests with URL filter. |
content_script_eval |
Execute JS in page context (ISOLATED or MAIN world). |
reload_extension |
Hot-reload the extension and re-attach to Service Worker. |
CLI Options
crx-mcp [options]
--extension-path <path> Pre-load extension at startup
--chrome-path <path> Path to Chrome executable
--user-data-dir <path> Chrome user data directory
--no-sandbox Disable sandbox (for CI/Docker)
--verbose Debug logging to stderr
Requirements
- Node.js >= 18
- Google Chrome installed (detected automatically on Windows, macOS, Linux)
- Extensions require headed mode (no headless)
How It Works
extension_loadlaunches Chrome with--load-extensionand detects the extension ID- Service Worker communication uses Chrome DevTools Protocol (CDP) sessions
chrome.storage,declarativeNetRequest, andpermissionsare accessed via JS evaluation in the SW context- Console logs are collected from all contexts (page, SW, popup, sidepanel) into a ring buffer
- Network requests are monitored via CDP
Network.enable - Popup and side panel are opened in new tabs (actual popup/sidepanel UI requires user gestures)
Use Cases
- Automated testing of Chrome extensions during development
- AI-assisted debugging — let Claude inspect storage, logs, and network traffic
- CI/CD validation — validate manifests and permissions without manual testing
- Extension factory workflows — quickly test multiple extensions in sequence
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。