spector-agent-mcp
AI-first WebGL 1/2 debugging MCP server that attaches to Chrome via CDP, enables frame capture and diagnostic analysis, and collaborates with Chrome DevTools MCP for agent-driven debugging workflows.
README
spector-agent-mcp
AI-first WebGL 1/2 debugging MCP server built on Spector.js, designed for Code Agents (Cursor / Claude / Codex) collaborating with Chrome DevTools MCP.
Features
- Shared-Chrome CDP attach (no second browser)
debugSessionIdcollaboration with chrome-devtools-mcp- Summary-first tools + diagnostic rules (
WEBGL-*) - Skill Pack under
skills/(router + specialized playbooks) - Error fixtures + evals for regression of agent workflows
Quick start
1. Chrome remote debugging
# macOS example
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
--remote-debugging-port=9222 \
--user-data-dir=/tmp/chrome-webgl-debug
2. Run the published package
npx -y spector-agent-mcp --browser-url http://127.0.0.1:9222
3. MCP config
Generic MCP client configuration:
{
"mcpServers": {
"spector-agent": {
"command": "npx",
"args": ["-y", "spector-agent-mcp", "--browser-url", "http://127.0.0.1:9222"]
}
}
}
Adapter templates under adapters/ also use the published npx -y spector-agent-mcp entry. For repository development, run pnpm install && pnpm build and point the MCP command at node packages/cli/dist/cli.js instead.
Also configure chrome-devtools MCP in your host. Templates:
- Cursor:
adapters/cursor/mcp.json - Codex:
adapters/codex/config.toml - Claude plugin:
adapters/claude-plugin/
4. Agent workflow (short)
webgl_debug_playbook({ goal, url })— deterministic tool sequence- Reproduce with chrome-devtools tools / open URL
webgl_bind_target→webgl_runtime_install- Stage observe:
webgl_set_marker/webgl_screenshot_canvas/webgl_read_console webgl_capture_frame({ includeThumbnails: true })→webgl_run_diagnostics→ FBO viawebgl_list_visual_attachments- Fix workspace code → re-capture →
webgl_diff_captures
Playbooks: skills/webgl-goal-driven-debug/SKILL.md, skills/webgl-debugging/SKILL.md
Gap analysis vs Spector.js: docs/ai-debug-toolchain-gap.md
Tool list (summary)
| Group | Tools |
|---|---|
| Session | webgl_session_create, webgl_session_status, webgl_list_targets, webgl_bind_target, webgl_unbind_target, webgl_runtime_install, webgl_runtime_status |
| Capture | webgl_list_canvases, webgl_select_canvas, webgl_capture_frame, webgl_capture_sequence, webgl_capture_commands, webgl_list_captures, webgl_get_capture_overview |
| Live / stage | webgl_set_marker, webgl_clear_marker, webgl_runtime_log, webgl_screenshot_canvas, webgl_read_console, webgl_list_visual_attachments, webgl_get_visual_attachment |
| Inspect | webgl_list_draw_calls, webgl_get_command_details, webgl_list_programs, webgl_get_program_details, webgl_list_textures, webgl_list_framebuffers, webgl_get_state_diff, webgl_search_capture |
| Diagnostics | webgl_run_diagnostics, webgl_get_finding_details, webgl_diff_captures, webgl_generate_report, webgl_list_rules, webgl_debug_playbook |
| Store | webgl_export_capture, webgl_delete_capture, webgl_cleanup_store, webgl_open_capture_viewer |
Security defaults: CDP is limited to explicitly allowlisted loopback hosts, runtime injection is limited to local or --allowed-origins targets, captures are size/retention bounded, and the generic webgl_page_evaluate tool is not registered unless --allow-page-evaluate is explicitly enabled. Prefer Chrome DevTools MCP for page evaluation and interaction.
Streamable HTTP is also available with secure defaults:
export SPECTOR_AGENT_MCP_HTTP_TOKEN="replace-with-at-least-24-random-characters"
npx -y spector-agent-mcp --transport http
It listens on 127.0.0.1:9230/mcp, requires Bearer authentication, and isolates MCP sessions. Non-loopback listening requires both --allow-remote-http and an explicit --http-allowed-hosts allowlist. See docs/usage.md for all usage modes.
Skill Pack
skills/
webgl-debugging/ # main router
webgl-goal-driven-debug/ # URL+goal → capture → fix → verify
webgl-black-screen/
webgl-shader-debugging/
webgl-texture-framebuffer/
webgl-state-corruption/
webgl-geometry-draw/
webgl-performance-regression/
webgl-verify-fix/
webgl-framework-adapters/
Fixtures & evals
- Fixtures:
packages/test-fixtures/errors/* - Eval scenarios:
evals/evals.json - Report grader:
evals/graders/grade-report.mjs
Docs
docs/architecture.mddocs/protocol.md—debugSessionIdcollaborationdocs/diagnostics.md— rule listdocs/security.mddocs/usage.md— generated install and transport guidedocs/tools.md— generated tool schemas and annotationsdocs/contributing-rules.md
License
MIT — see LICENSE / NOTICE (Spector.js heritage noted where applicable).
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。