Repository navigation
TeXFlow MCP v1.0.0
LaTeX document compiler with MCP interface. AI agents operate on a structured document model — sections, paragraphs, figures, tables — while TeXFlow handles all LaTeX mechanics.
Install
pip install texflow-mcpConfigure with Claude Code:
claude mcp add texflow -- uvx texflow-mcpFeatures
6 MCP Tools
- document — create, ingest markdown, show outline, read sections
- layout — columns, fonts, paper, margins, headers/footers, TOC
- edit — insert, replace, delete, move blocks (section, paragraph, figure, table, code, equation, list, raw)
- render — compile to PDF, preview page as PNG, export .tex
- reference — search LaTeX commands, symbols, packages, error help
- queue — batch multiple operations in one call with a single disk write
Workflow State Machine
Every tool response includes a computed state hint showing where you are and what to do next. States flow: no_document → empty → drafting → styled → compiled. Error responses include contextual guidance.
Formatter Layer
Consistent, scannable text output across all tools via shared formatting primitives (truncation, indentation, status icons).
Two Entry Flows
- Scaffold —
document(action="create")builds an empty skeleton, add content withedit - Markdown ingest —
document(action="ingest", source="paper.md")parses markdown into the model
Both converge on an in-memory document model that auto-saves to disk. LaTeX is only an output artifact.
Dependencies
- Python >= 3.12
fastmcp >= 3.0.0mistune >= 3.2.0- Optional:
xelatexfor PDF compilation,pdftoppmfor page preview