uigraph
Supports building a deterministic UI knowledge graph from Angular source code and compiled bundles, parsing routes, templates, handlers, and UI elements to produce verified locators and test generation data.
Supports building a deterministic UI knowledge graph from Next.js app and pages routes, extracting routes and UI elements to produce verified locators and test generation data.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@uigraphshow me verified Playwright locators for the login screen"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
uigraph
Stop guessing locators. Give your test agent a map.
uigraph builds a deterministic UI knowledge graph from your web app — source or compiled code — covering every route, screen, element, action, and transition. Claude Code, Codex, Cursor, Copilot, and Gemini CLI query that graph through MCP or the CLI instead of re-reading the DOM, so they write Playwright tests from verified role and label locators.
No data-testid required. No model API key. Destructive controls are never clicked.
uigraph build . --adapter angular
uigraph build ./dist --adapter angular --bundles main.js --source-maps
uigraph build . --adapter next
uigraph export --out .uigraph/export
uigraph crawl --url http://localhost:4200 --from-graph
uigraph merge --static .uigraph/graph --runtime .uigraph/graph-runtime --out .uigraph/graph
uigraph path "users/:id" # ordered steps + locators + preconditions
uigraph screen "/users" # verified locators on that screen
uigraph explain "Save" # what it is, where defined, what it triggers
uigraph impact --files src/app/user-detail.ts # what a diff touchesWhy
Agents that test UIs by looking at them re-read the DOM on every step. That is
slow, and the guess is where wrong tests come from. Your code already states
what exists. uigraph extracts it once, verifies it against the running app,
and answers path, screen, and explain from the graph.
Use it when you:
generate Playwright tests from Angular or Next.js without inventing selectors
want role, label, and
formControlNamelocators instead ofnth()and CSSneed a crawler that observes the live app and refuses delete, pay, send, and logout
want Cursor, Claude Code, or any MCP client to query the UI instead of snapshotting it
Related MCP server: Semantic Hints MCP
How it works
Static pass (every commit, no AI, nothing leaves your machine): framework adapters parse your code with the framework's own compiler — Angular first (
@angular/compiler+ ts-morph), routes, templates, handlers resolved to navigations and API calls. Compiled bundles work via source maps; without them, a reduced extraction still recovers selectors, routes and static attributes.Runtime crawl (nightly / on demand): a Playwright crawler visits each route, computes real accessible names, proves locator uniqueness, observes navigations and network calls. It never clicks anything destructive.
Merge: static + runtime agreement promotes a fact to
verified. Disagreement iscontradictedand reported — never papered over.Query: CLI and MCP tools (
get_screen,path_to,locators_for,actions_of,stale_check,explain) return compact, auditable answers.unknownis a valid answer; agents are told to block, not guess.
Every fact is tagged
Confidence | Meaning |
| explicit in source |
| resolved (call graph, lazy routes) |
| seen in the live app |
| static and runtime agree, or a probe confirmed it |
| several candidates — never used silently |
| an AI read the code; a hint, never truth |
| runtime disproved the claim — likely an app bug or stale code |
Only verified locators are handed to test generators.
AI verification — no API keys
uigraph never calls a model. Low-confidence edges become tasks your own
coding agent picks up (MCP: next_task → get_bundle → submit_probe).
The agent plans a probe; uigraph validates it, runs it in a sandboxed
browser, and judges the evidence deterministically. AI judgment alone caps
at ai_reviewed. Plans are saved as recipes and replayed later without AI.
Safety is enforced by uigraph, not by the agent: schema-validated plans, an on-origin allowlist, and a denylist that rejects destructive actions (delete / pay / send / logout) no matter what the plan claims.
Locators without test ids
No data-testid required. The ladder: role + accessible name → label →
placeholder → framework-native stable attributes (formcontrolname, name,
href) → scoped text → structure (flagged). Uniqueness is proven on the live
page, and unnamed interactive elements are reported as accessibility findings.
Install
npm i -D uigraph
npx uigraph install # registers the agent skill (--project for repo-local)
npx uigraph mcp # or add as an MCP server to your agentStatus
v0.1. Angular source and compiled bundles (with source maps, or a reduced
scan without them), Next.js app and pages routes, ng-bootstrap and Angular
Material dialog profiles, crawler, CLI, MCP, verify queue, and a Graphify-style
export (graph.json, GRAPH_REPORT.md, graph.html).
License
MIT.
This server cannot be deployed
Maintenance
Related MCP Connectors
Repository knowledge graph MCP server for codebase understanding and debugging.
MCP server for visual regression testing: triage a PR's UI diffs from your coding agent.
Guarded MCP server for agent-readable business truth, provenance, readiness, and discovery.
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceA Playwright-based MCP server that exposes a live browser as a traceable, inspectable, debuggable and controllable execution environment for AI agents.3,154 npm57-
- FlicenseAqualityCmaintenanceA local stdio MCP server that exposes compact semantic observations from UI elements annotated with data-agent-* hints, designed to work alongside the official Playwright MCP for browser automation.2-
- AlicenseNot gradedqualityDmaintenanceThis MCP server builds a local flakiness knowledge graph from Playwright test run history and enables AI agents to query flaky tests, failure patterns, trends, and correlated git commits, helping diagnose test reliability without manual analysis.17 npmMIT
- FlicenseNot gradedqualityBmaintenanceEnables AI agents and MCP clients to translate high-level web automation goals into deterministic, resilient browser selector action sequences. It runs as a zero-dependency Python MCP server that returns structured execution plans and telemetry for agentic workflows.8-