MCP server for agent-driven Typst/LaTeX document authoring — compile, navigate, edit, review, and register research documents
typst-mcp has 12 well-named tools with consistent verb_noun patterns (doc_compile, doc_get_structure, etc.). All tools have descriptions (avg ~120 chars, within baseline 34-392). Input schemas are present and use Zod with type constraints (enums, strings, numbers, arrays, unions). However, parameter descriptions are sparse, many lack detail on format, range, or constraints. Output schemas are not documented; responses are JSON-stringified but structure is opaque to the LLM. Error handling is minimal; no recovery guidance or categorization. Security is reasonable (no secrets in params, file-based operations), but no permission gates or audit trails. Composition is sound, each tool has one responsibility, and tool names clearly distinguish operations.
Audit a .bib file against a document. Finds unused keys, missing keys (cited but not defined), and duplicate entries.
Compile a .typ (Typst) or .tex (LaTeX) document to PDF. Returns structured errors on failure.
Compare two documents at section level. Returns additions, deletions, rewrites, and unchanged sections.
List all figures in a document with their labels, captions, source files, and which sections reference them.
Extract the raw source and plain text for a named section. Returns word count, citations, and figure references.
Parse a document and return its full section tree with IDs, levels, line ranges, and word counts.
Output schemas not documented. Responses are JSON-stringified but LLMs cannot infer field structure, types, or which fields to extract for downstream calls. Breaks tool chaining.
Parameter descriptions lack format/constraint details. E.g., 'position' in doc_insert_paragraph accepts 'start'|'end'|number but description does not specify valid range for numeric index or clarify 1-based indexing.
No error handling guidance. Tools return JSON errors but do not categorize as retryable/user-fixable/fatal or suggest recovery steps. E.g., compile failure should suggest checking syntax or engine availability.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 61 | 2026-07-28+ | v2 |
Insert a paragraph into a section. Position: 'start', 'end', or a 1-based paragraph index.
Map a PDF page number to the source sections it contains, with line ranges.
Register a compiled document as a structured node (YAML) in a local ontology directory. Requires TYPST_MCP_ONTOLOGY_DIR or an explicit ontology_dir argument.
Run heuristic checks on a section: completeness, citations, clarity, structural consistency.
Replace a section's content (heading is preserved). Auto-backs up the file and rolls back if the new content causes compile errors.
Map a source line number to its PDF page and containing section.
Destructive operations (doc_rewrite_section, doc_insert_paragraph, doc_register) lack confirmation/dry-run support. Auto-backup is mentioned but no explicit rollback confirmation before commit.
No pagination or result limits documented. Tools like doc_figure_inventory and doc_get_structure may return large lists without limit/offset parameters, risking context window exhaustion.