Skip to content

feat: playwright-smart-table MCP inspector server #108

Description

@rickcedwhat-ai

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

  1. Heuristic detection — fast DOM checks for preset fingerprinting (MUI/RDG/Glide), virtualization signals, pagination type, loading states
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions