latex-mcp
Compiles LaTeX documents and inspects the resulting PDF, supporting a write-compile-check-revise workflow for LaTeX projects.
Integrates with Overleaf's open-source CLSI (Common LaTeX Service Interface) to compile LaTeX documents and inspect the resulting PDF, enabling an autonomous write-compile-check-revise loop.
Click on "Deploy 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., "@latex-mcpcompile main.tex and open the PDF preview"
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.
latex-mcp
An open-source Model Context Protocol server that lets LLMs (Claude, Codex, Gemini/Antigravity, and other MCP-compatible clients) compile LaTeX documents and inspect the resulting PDF — enabling a fully autonomous write → compile → check → revise loop.
It talks to a self-hosted instance of Overleaf's open-source CLSI (Common LaTeX Service Interface) over HTTP, and also exposes a small web UI (in the spirit of Overleaf's editor) so a human can watch or collaborate on the same document a connected LLM is editing.
Status: early scaffolding, under active development.
Architecture
[LLM client (Claude / Codex / Antigravity / ...)] [Browser UI]
| MCP (stdio) | HTTP + WebSocket
v v
[latex-mcp backend service]
|
| HTTP REST
v
[Self-hosted CLSI] (Docker)
|
v
[TeX Live container] (actual compilation)Related MCP server: Overleaf MCP
Setup
Full setup instructions (CLSI via Docker, running the backend, and connecting from Claude Desktop, Claude Code, Codex CLI, Antigravity, and others) are coming as the project is built out.
License
MIT — see LICENSE. Note this project is independent and not affiliated with Overleaf; it only communicates with the open-source CLSI component over its HTTP API.
This server cannot be deployed
Maintenance
Related MCP Connectors
A hosted LaTeX editor your assistant can actually use. Search 1,019 free templates, create and edit projects, and compile them to PDF on a real TeX Live farm, getting back the PDF or the compile log when a build fails. Thirteen tools behind OAuth 2.1, with nothing to install and nothing to run locally.
MCP-Native LLM Orchestration Agent
Hosted MCP server: convert PDFs to clean, LLM-ready Markdown with tables, formulas and OCR.
LLM Orchestration MCP Agent
Related MCP Servers
- AlicenseAqualityCmaintenanceAn MCP server for Overleaf that allows Claude or other agents to navigate projects, read and edit .tex files, compile, and interact with review-panel comments via Overleaf's real-time Socket.IO API, with seamless support for tracked changes as pending suggestions.17394AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceA real-time MCP server that enables AI coding agents to read, write, and compile LaTeX projects in self-hosted Overleaf instances via native OT protocol.55AGPL 3.0
- AlicenseAqualityDmaintenanceAn MCP server that exposes LaTeX compilation, log parsing, dependency inspection, and citation checking as tools for AI agents, using latexmk under the hood.11111MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for agentic-first PDF review of LaTeX papers, enabling commenting, compiling, and visual inspection via Claude Code.7MIT