spector-agent-mcp

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.

Category
Visit Server

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)
  • debugSessionId collaboration 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)

  1. webgl_debug_playbook({ goal, url }) — deterministic tool sequence
  2. Reproduce with chrome-devtools tools / open URL
  3. webgl_bind_targetwebgl_runtime_install
  4. Stage observe: webgl_set_marker / webgl_screenshot_canvas / webgl_read_console
  5. webgl_capture_frame({ includeThumbnails: true })webgl_run_diagnostics → FBO via webgl_list_visual_attachments
  6. 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

License

MIT — see LICENSE / NOTICE (Spector.js heritage noted where applicable).

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured