Visual QA MCP
Enables agents to verify educational, scientific, and engineering visuals by extracting structured evidence and running domain-specific checks against specs and theory.
README
Visual QA MCP
Visual QA MCP is an early project workspace for building tools that help AI agents verify educational, scientific, medical-education, and engineering visuals before they are used in serious instructional or technical contexts.
The core idea is simple: AI-generated images should be checked like code, and their visual claims should be checked against theory, references, and extracted evidence. A generated diagram, chart, mechanical illustration, anatomy teaching image, or technical visual should have a machine-readable spec, automated checks, visible error evidence, and a human review path for high-risk domains.
Project Goal
Create a toolchain that helps agents:
- Turn a lesson objective into a structured visual spec.
- Extract text, shapes, arrows, chart data, objects, and geometry from an image.
- Run domain-specific checks against the spec.
- Produce grounded findings with coordinates and evidence.
- Generate an annotated overlay and repair guidance.
Initial Scope And Long-Term Direction
The first practical scope is educational media where correctness can be measured without model fine-tuning:
- Physics diagrams: force arrows, torque, free-body diagrams, light rays, circuits.
- Charts and infographics: axes, labels, scales, bar heights, pie totals, trend/data consistency.
- Mechanical illustrations: holes, callouts, arrows, geometry, missing or extra parts.
The long-term direction is broader and stricter: medical education, open-ended anatomy, complex chemistry and biology, and full CAD reconstruction are target high-assurance tracks. They require stronger references, theory-aligned rule modules, validation datasets, and expert review before the project can claim readiness for those domains.
See docs/high-assurance-roadmap.md for the roadmap toward these harder domains.
Workspace Layout
docs/
problem-map.md
product-brief.md
mvp-scope.md
validation-plan.md
specs/
visual-spec.schema.json
findings.schema.json
examples/
skills/
educational-visual-qa/
SKILL.md
mcp-server/
README.md
tools.md
datasets/
README.md
experiments/
README.md
Design Principle
Do not ask a vision model, "Is this correct?" as the only check.
Instead, ask tools to extract evidence, then run checks grounded in specs, theory, source references, and tolerances:
image -> evidence graph -> claim graph -> domain rules -> findings + overlay
The agent can still use a vision-language model, but only as one part of an evidence-backed QA loop.
Current Executable MVP
The current runtime has six bounded executable verticals:
chart-v2: template-backed bar charts with image-read Y-axis scale evidencearrow-v1: controlled free-body diagrams with arrow identity, direction, anchor, and opt-in translational force balancegeometry-v1: controlled mechanical plates with circular-hole count, relative diameter, linear alignment/spacing, and fixed-catalog dimension labelscoordinate-graph-v1: controlled dual-axis scatter/polyline diagramsflowchart-v1: controlled rectangle/diamond flowcharts with directed topologycircuit-v1: a two-gate controlled structural-netlist verifier (v1aseries loops;v1bexplicit-junction simple-parallel and bounded series-parallel branches)
The first five can also project into an additive PrimitiveEvidenceGraph audit layer containing basic
shapes, arrows, text regions, spatial relationships, provenance, and links back to domain evidence.
Domain rules still consume the established domain graphs.
Implemented pieces:
EvidenceGraphschema with tick detections, axis mapping, and bar geometry.ClaimGraphschema and chart-v2 claim generator so rule execution consumes explicit claims instead of ad hoc spec parsing.- claim-generation gaps and
claim_graph.jsonaudit artifacts so unsupported checks degrade toneeds_reviewinstead of disappearing silently. - Local callable Python tool surface in
mcp-server/src/visual_qa_mcp/for claim generation, evidence extraction, verification, and artifact writing. - MCP server wrapper over chart, arrow, and geometry claim/extraction/verification surfaces.
- Spec-blind
parse_primitivesMCP andextract-primitivesCLI surfaces for five bounded profiles; circuit evidence remains on its typed domain graph. - Audit-oriented provenance and confidence separation:
- extractor provenance in
EvidenceGraph - stable
rule_idvalues in claims and findings - separate extraction versus rule confidence in
VisualQaReport
- extractor provenance in
- Dual tick-reader path:
- default template backend
- optional OCR backend scaffold
- Validation dataset with 24 cases:
- 8 golden
- 16 mutated
- Separate noisy chart-v2 validation dataset for Phase 2 evidence expansion.
- A separate 24-case
chart-v2-realworld-pilottrack with Pillow/Matplotlib renderer diversity, World Bank reference-backed source snapshots, provenance/license metadata, and frozen checksums. - Generic chart source records using
category/value, while retaining compatibility with the originalmonth/rainfall_mmcontrolled fixtures. - Overlay generation for flagged findings.
- Verification tests, validation summary artifacts, and advisor-gate evidence packs.
Geometry-v1 has a 14-case controlled Pillow-rendered family (7/7 typed, 2/2 ambiguity) and a
separate checksum-frozen 20-case noisy family (5/5 typed, 5/5 ambiguity, 10/10 golden). This
does not cover arbitrary mechanical drawings, independently authored images, general OCR,
calibrated units, or native CAD.
Circuit-v1a has 11 controlled cases (4/4 typed, 5/5 ambiguity, 2/2 golden,
terminal-netlist evidence 6/6). Circuit-v1b has 14 controlled cases (7/7 typed, 3/3
ambiguity, 4/4 golden, terminal-netlist and junction-count evidence 11/11). These claims cover
only controlled colored Pillow symbols, orthogonal non-crossing wires, explicit junction dots,
simple parallel, and one bounded series-parallel family. They do not cover arbitrary schematics,
crossings, OCR, electrical values/laws, or engineering certification.
The bounded readiness claim remains narrow: the validated default is the template backend on the controlled chart-v2 family and the configured noisy transform family. The real-world pilot is an evidence-expansion track, not proof of general real-world chart readiness. Its public-reference cases are locally rendered from a frozen World Bank data snapshot; they do not establish robustness across arbitrary publishers, fonts, palettes, or chart images. OCR remains a separate unvalidated backend.
See docs/chart-mvp-workflow.md for the operational workflow and advisor gates.
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.