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 "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., "@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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/san-rat/latex-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server