
overleaf-mcp
by rangehow
🍃 Overleaf MCP Server
The most comprehensive Model Context Protocol (MCP) server for Overleaf.
18 tools covering full CRUD, LaTeX structure analysis, git history & diff, PDF compilation, and download — all from your AI assistant.
Simple setup — set two environment variables (OVERLEAF_SESSION, optional OVERLEAF_GIT_TOKEN) when registering the MCP server, and you're done.
You: "List my projects"
AI: [list_projects] You have 5 projects. Which one?
You: "Read main.tex from my thesis"
AI: [read_file] Here's the content: …
You: "Rewrite the abstract to be more concise"
AI: [edit_file] ✓ Edited and pushed
You: "Compile and download the PDF"
AI: [compile_project + download_pdf] PDF saved to ~/Desktop/thesis.pdf ✓
Note: earlier versions shipped an
overleaf_setup/overleaf_save_credentialswizard. These tools have been removed — credentials are now read straight from environment variables.
🆚 Comparison with Other Overleaf MCP Servers
| Capability | This Project | tamirsida | GhoshSrinjoy | anu2711 | Junfei-Z | mjyoo2 |
|---|---|---|---|---|---|---|
| Language | Python | Python | JS | Python | JS | JS |
| Auth | Git + Cookie | Git | Git | Cookie | Git | Git |
| list_projects | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| list_files | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| read_file | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| get_sections | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ |
| get_section_content | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ |
| create_file | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ |
| create_project | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| edit_file (surgical) | ✅ | ✅ | ✅* | ✅ | ✅* | ❌ |
| rewrite_file | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ |
| update_section | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| delete_file | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| list_history | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ |
| get_diff | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ |
| compile_project | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ |
| download_pdf | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ |
| download_log | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| page/layout (SyncTeX) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| sync_project | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| status_summary | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ |
| Multi-project | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Thread-safe locking | ✅ | ❌ | ✅ (Redis) | ❌ | ❌ | ❌ |
| Docker support | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ |
| Free Overleaf tier | ✅† | ❌ | ❌ | ✅ | ❌ | ❌ |
| Total tools | 21 | 12 | 9 | 6 | 8 | 6 |
* Full file rewrite only, not surgical old→new replacement. † Compile/download tools work on the free tier via session cookie; Git-based tools require Git integration.
✨ Key Advantages
- 21 tools — the most of any Overleaf MCP server
- Zero config — just two env vars, no config files, no per-project setup
- Dual auth — Git tokens for read/write + session cookies for compile/download
- Surgical edits —
edit_filedoes exact search-and-replace (likesed), not full rewrites - LaTeX-aware — section hierarchy parsing with indented previews
- Git history & diff — review changes, compare versions, filter by file/date
- Compilation — trigger builds and download PDFs without leaving your AI chat
- Compilation logs —
download_logfor debugging LaTeX errors - Page-layout perception —
get_page_count/locate_in_pdf/section_page_mapexpose where content lands in the rendered PDF (via SyncTeX), so the AI can answer "which page is section X on?" and drive a fill-exactly-N-pages loop - Thread-safe — per-project locks prevent concurrent git corruption
- Clean Python — modular architecture, type hints, async throughout
📦 Installation
Option 1: pip (recommended)
The package is published on PyPI as overleaf-mcp-plus (the plain
overleaf-mcp name was taken by an unrelated project). The CLI entry
point is still overleaf-mcp.
# Core (git-based tools only)
pip install overleaf-mcp-plus
# With compile/download support (recommended)
pip install "overleaf-mcp-plus[compile]"
Or run directly wit
Related servers

n8n
by n8n-io
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

@modelcontextprotocol/server-everything
OfficialMCP server that exercises all the features of the MCP protocol

@modelcontextprotocol/server-filesystem
OfficialMCP server for filesystem access