VisualDoc
Click on "Install 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., "@VisualDocRun autofix on my document.docx with review mode."
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.
VisualDoc
Visual-layout QA untuk dokumen — "Playwright, tapi untuk DOCX / Google Docs / Word." Satu MCP server yang dipakai identik oleh Claude Code dan OpenCode: render → ukur → cek → patch → diff → ulangi.
Status: Fase 0 + Fase 1 (+ penguatan) ✅ terverifikasi end-to-end lewat klien MCP
stdio sungguhan, 47 pytest hijau. Loop tertutup: doc_autofix membawa dokumen contoh
dari {critical:1} → {critical:0} dalam 1 iterasi. Penguatan: anchor stabil
w14:paraId, mode review/safe/full, regression guard (revisi yang
memunculkan isu baru → rollback), dan guardrails input: validasi DOCX, deteksi halaman
di luar rentang, serta error terstruktur {ok:false, error{code}} — menutup celah
"laporan hijau padahal salah".
doc_render_report → 1 critical (table_overflow) + 1 warning (image_low_dpi)
doc_autofix → baseline{critical:1} → final{critical:0} accepted=True
iter1: set_table_width(el-4) → resolved [p1:table_overflow]
unresolved: [p1:image_low_dpi] (butuh aset resolusi lebih tinggi)Loop (Fase 1)
doc_get_structure ──► el-N (posisional) + anchor (w14:paraId, stabil) + version_hash
│
doc_apply_patch(ops, expected_version_hash) ──► revisi + validasi round-trip
│ target = el-N | anchor (file asli tak disentuh)
doc_render_report(revisi) ──► ukur ulang
│
doc_diff_versions ──► resolved / new(regresi) / delta
↺ (dibungkus jadi satu tool: doc_autofix — mode review|safe|full)
berhenti saat tak ada yang bisa diperbaiki / max_iter / regression guard
(revisi yang memunculkan warning baru → dibuang, versi sebelumnya dipertahankan)Loop hidup sebagai satu tool (doc_autofix), bukan Claude Code hook — supaya
portabel ke OpenCode (docs/01-compatibility.md). Agen juga
bisa menyetir loop lebih halus sendiri via doc_get_structure + doc_apply_patch.
Related MCP server: docx-forge-mcp
Struktur
namanya-nanti/
├── .mcp.json · pyproject.toml · README.md
├── docs/ 00-concept · 01-compatibility · 02-preview-model (DOCX vs LaTeX)
├── src/visualdoc/
│ ├── server.py # MCP server (FastMCP, stdio) — 7 tool
│ ├── core/ # FORMAT-AGNOSTIC (bekerja atas PDF apa pun)
│ │ ├── geometry.py # PDF -> bbox/font/DPI/tabel
│ │ ├── rules.py # rule engine (+ engine_sensitivity)
│ │ ├── report.py # analyze_pdf()
│ │ ├── diff.py # diff_reports() before/after
│ │ └── raster.py # PDF page -> PNG (kanal visual opsional)
│ └── adapters/docx/ # FORMAT-SPECIFIC
│ ├── render.py # DOCX -> PDF (LibreOffice)
│ ├── meta.py # margin/style OOXML
│ ├── patch.py # get_structure + ops aman + validasi round-trip
│ ├── autofix.py # loop deterministik (structure-driven, render-verified)
│ └── pipeline.py # build_report()
├── rules/general.yaml · configs/ · scripts/
└── workspace/ original/ revisions/ renders/ reports/Tool (7)
Tool | Fungsi |
| Cek kesehatan (soffice/PyMuPDF/python-docx) + daftar |
| Render + ukur + cek → JSON ( |
| Elemen ter-alamat: |
| Op aman ke salinan (target |
| Loop tertutup + regression guard → revisi final + |
| Diff dua versi: |
| Opsional: PNG satu halaman (mahal token; pakai hemat). |
Op aman (doc_apply_patch): set_spacing, set_keep_with_next,
set_page_break_before, set_paragraph_style, set_font, set_table_width.
Tiap op melapor applied/error independen; op salah tak menggagalkan yang benar.
target bisa el-N (posisional) atau anchor (w14:paraId — bertahan lintas-edit;
doc_get_structure(assign_anchors=true) menuliskannya ke normalized_output).
Mode doc_autofix: review (rencana saja) · safe (invariant: fit tabel) ·
full (safe + heading keep_with_next + clamp spacing). Warning membawa
engine_sensitivity (invariant benar di renderer manapun; dependent hanya valid untuk
layout LibreOffice ini) — lihat docs/02-preview-model.md.
Kontrak error: tiap tool mengembalikan ok: true saat sukses, atau
{ok: false, error: {code, message, detail?}} saat gagal — code ∈ {not_found,
invalid_docx, invalid_rules, pages_out_of_range, stale_version, bad_argument,
no_ops, no_ops_applied, render_unavailable, render_failed, internal}. Input DOCX &
rule-pack divalidasi (bukan-DOCX / .doc lama / korup / YAML rusak ditolak), render yang
gagal/timeout terbedakan dari input salah, dan halaman di luar rentang tak pernah menghasilkan
laporan "hijau" palsu (semua di luar rentang → error; sebagian → di-flag). apply_patch yang
0-perubahan tidak menulis file (no_ops/no_ops_applied).
Keandalan tabel (#4): table_overflow dikoroborasi dengan lebar OOXML (patch._table_width_mm)
— jumlah kolom di pesan direkonsiliasi ke angka OOXML yang otoritatif (mis. render 7 → OOXML 8),
tiap tabel render dijembatani ke element_id, dan overflow yang tak terdeteksi renderer (mis.
tabel tanpa border) tetap muncul sebagai isu struktural, bukan hilang diam-diam.
Prinsip desain
Semua analisis di server, dikembalikan sebagai teks/JSON — bukan gambar ke model. Rule engine jalan murni atas angka geometri (PyMuPDF), tanpa vision → murah token, deterministik, jalan di kedua klien bahkan dengan model text-only. Alasan: docs/01-compatibility.md.
Quickstart
# Prasyarat sistem (sekali):
sudo apt-get install -y --no-install-recommends libreoffice-writer python3-venv fonts-liberation
python3 -m venv .venv && .venv/bin/pip install -e .
# Coba:
.venv/bin/python scripts/make_sample.py # -> workspace/original/sample.docx
.venv/bin/python scripts/mcp_smoke.py # uji 7 tool end-to-end lewat protokol MCP
.venv/bin/mcp dev src/visualdoc/server.py # (opsional) MCP Inspector interaktif
# Test (mengunci semua perilaku agar tak regres):
.venv/bin/pip install -e ".[test]" && .venv/bin/python -m pytestRegistrasi di klien
Claude Code —
.mcp.jsonsudah ada di root:/mcp→ approvevisualdoc(perlu restart sesi; server MCP tak hot-load).OpenCode — salin
configs/opencode.jsonkeopencode.jsonproject Anda.
Contoh perintah ke agen: "jalankan doc_autofix pada workspace/original/sample.docx, ringkas apa yang diperbaiki dan apa yang tersisa."
Batasan (jujur, by design)
Anchor elemen stabil (
w14:paraId) sudah ada; pemetaan elemen↔halaman presisi (korelasi render↔OOXML, mis. inject-marker) masih penyempurnaan lanjut.Auto-fix: table overflow (
safe) + headingkeep_with_next& clamp spacing (full).image_low_dpi&orphan_headingdilaporkan, belum di-auto-fix (butuh aset/keputusan).Satu engine (LibreOffice) — temuan
dependent(page-break/orphan) perlu engine target (Word) untuk kepercayaan penuh. Multi-engine = Fase 4.Belum ada
preview-ui/(viewer manusia) dan adapter non-DOCX. Roadmap → docs/00-concept.md.
Available Tools
2 toolsdoc_diff_versionsB
Render two DOCX versions and diff their layout reports: what got resolved,
what regressed (new), page-count delta, and per-severity count deltas.
| Name | Required | Description | Default |
|---|---|---|---|
| after | Yes | ||
| rules | No | ||
| before | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It does not disclose whether the tool is read-only, mutates data, requires permissions, or has rate limits. 'Render two DOCX versions' suggests a read operation, but there is no explicit statement about behavioral traits beyond the basic action.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that fronts the main action and diff outputs. It is concise and avoids redundancy, but could be improved by structuring with bullet points or clearer separation of actions and outputs.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has three parameters (two required), no output schema, and no annotations, the description is incomplete. It does not specify the return format, behavior on errors, prerequisites (e.g., document existence), or what 'layout reports' are. The provided detail about diff outputs is helpful but insufficient for full understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has three parameters ('before', 'after', 'rules') with 0% schema description coverage. The description does not explain any parameter, leaving the agent to infer what 'before' and 'after' refer to (version identifiers?) and what 'rules' controls. This is a significant gap for a tool with no output schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool renders two DOCX versions and diffs their layout reports, listing specific outputs like resolved/regressed items, page-count delta, and severity count deltas. This verb+resource combination is specific and distinguishes from the sibling tool 'doc_get_page_image'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for comparing DOCX versions but provides no explicit guidance on when to use it versus alternatives, nor any exclusions or prerequisites. The sibling tool 'doc_get_page_image' is different, but no direct comparison or when-not-to-use is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
doc_get_page_imageA
OPTIONAL visual channel: render ONE page of the DOCX to a PNG for the agent to eyeball a specific concern.
Use sparingly — images are costly in model context (see docs/01-compatibility.md); the deterministic doc_render_report (no images) is the primary signal. dpi is clamped to 36..300. On failure returns a structured {ok:false, error} instead.
| Name | Required | Description | Default |
|---|---|---|---|
| dpi | No | ||
| page | No | ||
| document | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full disclosure burden. It mentions that dpi is clamped (36-300), on failure returns a structured {ok:false, error}, and that images are costly. However, it does not specify whether the tool is read-only or any side effects, though the 'render' action implies no mutation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with three sentences. It front-loads the purpose, adds usage guidance, and finishes with behavioral details. Every sentence earns its place without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description fails to explain the success return format (presumably a PNG image). Without an output schema, the agent does not know what to expect on success. It also omits document input constraints (e.g., valid DOCX). Given the tool's complexity and no output schema, the description is incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage, so the description must compensate. It adds clamping info for 'dpi' and implies 'page' refers to a single page, but does not clarify page numbering (0- or 1-indexed) or the format of 'document' (path/ID). The description adds value but leaves gaps.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool renders one DOCX page to a PNG for visual inspection, using a specific verb ('render') and resource ('DOCX page'). It differentiates from sibling tool 'doc_diff_versions' by noting this is an optional visual channel, while the primary signal is 'doc_render_report'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly advises 'use sparingly' due to image cost, contrasts with the deterministic 'doc_render_report' as the primary signal, and directs to documentation for further guidance. This clearly tells the agent when and when not to use this tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
v0.1.0- First observed
doc_diff_versions - First observed
doc_get_page_image
TDQS
The two tools have clearly distinct purposes: one for comparing versions via diff, the other for extracting a single page image. There is no overlap.
Both tools follow a consistent verb_noun pattern with the 'doc_' prefix: doc_diff_versions and doc_get_page_image.
Only two tools are provided for a documentation visualization server. The description references a primary tool (doc_render_report) that is not included, making the surface too thin for its stated purpose.
The primary signal for the server (the deterministic report without images) is missing as a tool. There is no way to get the main report, only a diff and a page image, leaving a severe gap in coverage.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for visual regression testing: triage a PR's UI diffs from your coding agent.
Document-to-Markdown MCP server — convert PDF, Office and HTML into LLM-ready Markdown.
MCP server for detecting and redacting PII (Personally Identifiable Information) in PDF documents.
HTML-to-PDF MCP server — render pixel-faithful PDFs from HTML.
Related MCP Servers
- AlicenseBqualityCmaintenanceAn MCP server for reading, editing, and validating Microsoft Word documents with specialized support for track changes, comments, and footnotes. It enables structural auditing, heading extraction, and precise OOXML-level document manipulation through natural language tools.10046MIT
- AlicenseAqualityDmaintenanceMCP server for Word document (.docx) creation and manipulation — the production-grade document automation tool for AI agents.963MIT
- AlicenseCqualityDmaintenanceA unified MCP server for document processing that enables creating, editing, and converting Word documents (DOCX), PDFs, Markdown, and images, with support for templates, formatting, and batch operations.100MIT
- FlicenseAqualityDmaintenanceMCP server for generating professionally formatted Word documents (.docx). Supports corporate templates (colors, fonts, logo), headers/footers, and Markdown conversion.4-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Alvnvnc/visualdoc-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server