shijing
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
shijing-agent
Your AI agent changed the UI. Did it get easier?
Coding agents change interfaces every day. Tests tell you nothing broke. Nobody checks whether the task got easier for the user, or quietly got harder.
shijing-agent runs the same user task on the version before and after the change, each in a fresh browser, and reports the clicks, the path taken, and whether the output is identical. Connect it to your agent with one command, and the agent measures its own UI changes before calling them done.
npx shijing-agent setup # Claude Code · Cursor · Codex · Claude Desktop
$ npx shijing-agent demo
▶ Export the release checklist
[baseline] 1. click "More actions ▾"
[baseline] 2. click "Data management ▸"
[baseline] 3. click "Export list"
[baseline] 4. click "Choose CSV"
[baseline] 5. click "Download CSV"
[candidate] 1. click "Export CSV"
candidate completes the task in 1 click instead of 5 (-4) with identical output.Why
An agent asked to "make export easier" will move a button and report success. A UI test will confirm the page still renders. Neither tells you whether a user now finishes the task in fewer steps with the same result. That was the point of the change.
UI tests answer "does it still work?". shijing-agent answers "is it easier now?", with numbers you can put in the pull request.
It behaves like a first-time user. It doesn't follow selectors you wrote. It reads the visible controls and picks the one that best fits the goal. So:
Clicks and the path are measured, not scripted. If the new layout hides the action, the agent takes the longer path too.
Success is checked independently. The downloaded bytes are compared with an expected file, or the page text is checked. The agent never grades itself.
Same task, same start, fresh browser. Every target runs in a clean browser context with the same viewport and data.
Related MCP server: vouch
Quick start
Requirements: Node.js 20+ and Chromium (npx playwright install chromium) or Google Chrome (--chrome).
npx shijing-agent demo # built-in example: old vs new checklist page
npx shijing-agent run my-task.yaml # your own task
npx shijing-agent demo --video # also record what the agent did, per versionThe report is written to .shijing/runs/<time>/report.md, along with result.json, the downloaded files and a final screenshot for each version. With --video, you also get one .webm per version with each click highlighted.
From source:
git clone https://github.com/gengsong/shijing-agent && cd shijing-agent
npm install && npx playwright install chromium
npm run demoWrite your own task
name: Export the release checklist
goal: Export the task list as a CSV file
targets: # first = baseline, last = candidate
baseline: https://staging.example.com/checklist?ui=old
candidate: https://staging.example.com/checklist?ui=new
# local files work too: ./site/v1/index.html
success: # decided by checks, not by the agent
download:
name: "*.csv"
equals: ./expected/checklist.csv # optional byte-for-byte comparison
# text: "Export complete" # or/and: text the page must show
maxSteps: 10Full reference: docs/task-format.md.
Planners
|
| |
How it decides | Scores visible labels against the goal, opens menus when nothing matches yet | Claude reads the goal, history and visible controls and picks one action. Sonnet goes first; a target Sonnet can't finish is re-run from scratch with Opus |
Cost | Free, offline, deterministic | Uses your API key (pricing); the report shows calls and estimated cost |
Good for | CI, simple find / export / navigate tasks | Fuzzy wording, search boxes, unfamiliar layouts |
export ANTHROPIC_API_KEY=... # bring your own key; nothing is sent anywhere else
npx shijing-agent run task.yaml --planner claude # Sonnet 5.5, then Opus 5.5 if needed
npx shijing-agent run task.yaml --planner claude --model claude-opus-5-5 # pin one modelThe report's Planner row shows what ran, e.g. sonnet-5-5 (failed) → opus-5-5 (passed) · 9 calls · ~$0.03. Escalation only happens when a run fails. An error, such as a page that won't load, is not retried.
Use it from an AI agent (MCP)
shijing-agent mcp starts an MCP server on stdio. Your coding agent can then check its own UI changes: "I moved Export to the toolbar. Run compare_pages and see if it got easier."
Tool | What it does |
| Goal + baseline + candidate (URL or local HTML) + a check ( |
| Runs a task YAML |
| Runs the built-in example, offline |
One command connects it to every agent it finds (Claude Code, Claude Desktop, Cursor, Codex):
npx shijing-agent setupIt shows the plan, asks before changing anything, and backs up each config file first. For Claude Code, Cursor and Codex it also installs the shijing-ux-check skill (in ~/.claude/skills, ~/.cursor/skills and $CODEX_HOME/skills), which tells the agent to measure a UI change before calling it an improvement. Then restart your agent and ask: "I changed the export flow. Use shijing to check if it got easier."
npx shijing-agent setup --dry-run # show the plan only
npx shijing-agent setup --client cursor # one client: claude-code, claude-desktop, cursor, codex
npx shijing-agent setup --remove # undoManual setup for other clients (mcpServers in their config):
{
"mcpServers": {
"shijing": {
"command": "npx",
"args": ["-y", "shijing-agent", "mcp"],
"env": { "ANTHROPIC_API_KEY": "only needed for planner: claude" }
}
}
}Reports are written to .shijing/runs/ in the server's working directory, or to SHIJING_OUT_DIR if it is set.
Safety
The agent explores pages, so by default it is careful:
It never presses controls that look like buying, paying, deleting, signing in or out, uploading, publishing or sending.
It blocks non-GET requests (
allowWrites: truein the task lifts this, but only use it on a staging environment).It stays on the target's origin. Pop-ups are closed and dialogs dismissed.
A run stops after
maxSteps.
Only run it against sites you own or are allowed to test.
How it works
task.yaml ─▶ fresh browser ─▶ observe visible controls ─▶ planner picks one action ─▶ execute
▲ │
└──────── not done yet ◀── independent checks (download bytes, text) ◀──┘
│ done / failed / max steps
▼
report.md · result.json · downloads · screenshotsCode map: src/observe.js (what a user can act on), src/planners/ (rules, claude), src/policy.js (safety), src/checks.js (success), src/run.js (loop), src/report.js (comparison).
Roadmap
v0.1: CLI, rules and Claude planners, download and text checks, Markdown report
Demo GIF and npm release
MCP server; Claude planner escalates Sonnet → Opus
setupfor Claude Code, Claude Desktop, Cursor and Codex, with a UX-check skill for Claude Code, Cursor and CodexGitHub Action that comments the comparison on pull requests
Eval set: 30 tasks across public demo sites, tracking success rate and cost per planner
Form-filling tasks with test data, multi-page flows, mobile viewport presets
Contributing
Issues and PRs are welcome, especially tasks where the agent got it wrong. Those become eval cases. See CONTRIBUTING.md.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Visual testing for coding agents: your agent sees every UI change it makes and triages each diff.
Browser-based QA for AI-built software. Test pages with real browsers via agents.
Find UI bugs, verify fixes and run tests on your web app from your AI coding agent.
Website checker for AI coding agents. Measures your site in a real browser, with evidence.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to prove that previously working behavior still works after code changes by running the product through the same steps twice and surfacing only unintended differences as actionable findings.31 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to verify application changes by running browser workflows, executing independent state assertions, and producing replayable evidence.3 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to run live mobile and desktop browser sessions side by side and measure real UI properties — contrast ratios, touch-target sizes, overflow, clipped content and light/dark theme drift — returning precise findings as text with the offending selector attached instead of leaving the model to guess from a screenshot. It also drives the page and shares one live panel with the human, who can pin notes and frames that the agent reads back.155 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to drive live mobile and desktop browser sessions side by side and measure the UI they render, returning contrast ratios, touch-target sizes, overflow, theme drift and other findings as precise text tied to selectors rather than screenshot guesses. It also lets a human share the same live session, pinning notes and frames the agent can read back.155 npmMIT