Full plan lives in .agents/plans/mcp-inspector.md — read that before starting work.
Summary
An MCP server (packages/mcp) that an AI assistant calls while a developer is writing tests. Given a URL, it inspects the table DOM and returns either structured findings or a ready-to-paste useTable() config.
Two-phase approach
- Heuristic detection — fast DOM checks for preset fingerprinting (MUI/RDG/Glide), virtualization signals, pagination type, loading states
- LLM-assisted selector discovery — snapshot the DOM + send with library typings to GitHub Models (uses
GITHUB_TOKEN, no extra key needed) to get ranked selector candidates. Mirrors what works well in practice: pasting HTML + typings to an LLM produces better selectors than regex heuristics on messy real-world tables.
MCP tools
inspect_table(url, tableSelector?, authMode?) — returns structured JSON findings including preset match, virtualization signals, pagination type, and top-3 ranked selector candidates per slot
generate_config(url, tableSelector?, hints?, authMode?) — returns paste-ready TypeScript useTable() config with inline comments explaining each decision
Auth
- storageState (headless): user exports browser session with
playwright open --save-storage, passes file path to tool
- Interactive (non-headless, opt-in): launches visible browser, user logs in manually, signals ready, inspection runs — handles SSO/MFA flows
Out of scope for now
- Sorting strategy detection (backburner in main library too)
- Auto-generating fill/write strategies
Full plan lives in
.agents/plans/mcp-inspector.md— read that before starting work.Summary
An MCP server (
packages/mcp) that an AI assistant calls while a developer is writing tests. Given a URL, it inspects the table DOM and returns either structured findings or a ready-to-pasteuseTable()config.Two-phase approach
GITHUB_TOKEN, no extra key needed) to get ranked selector candidates. Mirrors what works well in practice: pasting HTML + typings to an LLM produces better selectors than regex heuristics on messy real-world tables.MCP tools
inspect_table(url, tableSelector?, authMode?)— returns structured JSON findings including preset match, virtualization signals, pagination type, and top-3 ranked selector candidates per slotgenerate_config(url, tableSelector?, hints?, authMode?)— returns paste-ready TypeScriptuseTable()config with inline comments explaining each decisionAuth
playwright open --save-storage, passes file path to toolOut of scope for now