TeXFlow
A document authoring and composition server for creating PDFs from LaTeX and Markdown, supporting collaborative editing and project-based workflows.
TeXFlow MCP
A LaTeX document compiler with an MCP interface. AI agents operate on a structured document model — sections, paragraphs, figures, tables — while TeXFlow handles all LaTeX mechanics: packages, preamble, fonts, and compilation.
Install
pip install texflow-mcp
Or run without installing:
uvx texflow-mcp
System dependencies (optional)
TeXFlow compiles documents to PDF using XeLaTeX. Without it, you can still build and export .tex files.
# Arch
pacman -S texlive-xetex texlive-fontsrecommended texlive-fontsextra
# Debian/Ubuntu
apt install texlive-xetex texlive-fonts-recommended texlive-fonts-extra
# Fedora
dnf install texlive-xetex texlive-collection-fontsrecommended texlive-collection-fontsextra
For page preview (PNG), install poppler-utils (provides pdftoppm).
Configure with Claude Code
claude mcp add texflow -- uvx texflow-mcp
That's it. Restart Claude Code and the tools are available.
To set a workspace directory (where documents are saved):
claude mcp add texflow -- uvx texflow-mcp ~/Documents/TeXFlow
Configure with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"texflow": {
"command": "uvx",
"args": ["texflow-mcp"]
}
}
}
How it works
TeXFlow has two entry flows, both converging on the same in-memory document model:
- Scaffold —
document(action="create")builds an empty document skeleton. Add content withedit(action="insert"). - Markdown ingest —
document(action="ingest", source="paper.md")parses markdown into the model. Refine layout from there.
The model auto-saves to disk as JSON. LaTeX is only ever an output artifact — you never edit .tex directly.
Tools
| Tool | Purpose |
|---|---|
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 |
Every response includes a workflow state hint showing where you are and what to do next.
Example session
> document(action="create", title="My Paper", document_class="article")
> queue(operations=[
{"tool": "edit", "action": "insert", "block_type": "section", "title": "Introduction", "level": 1},
{"tool": "edit", "action": "insert", "content": "This paper explores...", "section": "Introduction"},
{"tool": "edit", "action": "insert", "block_type": "section", "title": "Methods", "level": 1},
{"tool": "layout", "font": "palatino", "columns": 2}
])
> render(action="compile")
Development
git clone https://github.com/aaronsb/texflow-mcp
cd texflow-mcp
uv sync
uv run pytest tests/ -v # 222 tests
uv run texflow # Start MCP server
License
MIT
関連サーバー
PDF Tools
A server for manipulating PDF files, including merging, page extraction, and searching.
PowerPoint Translator
Translate PowerPoint files using AWS Bedrock. Requires AWS credentials to be configured.
moviepy-mcp
a moviepy mcp server currently with over 20 video and audio editing tools.
Docmost
An open-source collaborative wiki and documentation software with AI integration via MCP.
Gezhe PPT
Generates PowerPoint presentations (PPTs) based on specified topics using the Gezhe API.
Markdownify
Converts various file types and web content, such as PDFs, images, audio, and web pages, into Markdown format.
Bitwarden/Vaultwarden MCP Server
An MCP server that provides Bitwarden/Vaultwarden connectivity
Notemd MCP
A backend server for the Notemd Obsidian plugin, offering AI-powered text processing and knowledge management.
JIRA
Integrate with JIRA to allow AI assistants to directly interact with JIRA issues.
Doc Reading and Converter
A server for reading and converting documents between PDF, DOCX, and Markdown formats using marker-pdf and pandoc.