Overleaf MCP
Provides tools for managing Overleaf projects, including listing projects and files, reading and writing files, compiling projects on Overleaf's servers, retrieving compile logs, and downloading PDFs.
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., "@Overleaf MCPUpdate the abstract in main.tex and recompile"
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.
Overleaf MCP
An MCP (Model Context Protocol) server that lets AI assistants like Claude read, edit, and compile your Overleaf projects.
MCP spec compatibility: This server is built on FastMCP 3.x, which targets the classic handshake-based MCP spec (2025-11-25 and earlier) — it does not yet implement the stateless 2026-07-28 spec ("MCP 2.0"). Current clients (Claude Code, Claude Desktop, etc.) still support handshake-era servers, so it works fine today. It will move to the stateless spec once FastMCP 4 is released.
Works with free Overleaf accounts — no premium Git integration required. It authenticates with your browser session cookie and talks to Overleaf's web API via pyoverleaf.
Tools
Tool | Description |
| List all projects on your Overleaf account |
| List files in a project (supports glob filters like |
| Read any file from a project |
| Create or overwrite a file (preserves Overleaf history; creates folders as needed) |
| Compile on Overleaf's servers; returns the log tail on failure |
| Fetch the full LaTeX log from the latest compile |
| Download the compiled PDF to a local path |
Projects can be referenced by id, exact name, or a unique name substring — e.g. read_file("thesis", "main.tex").
Related MCP server: overleaf-mcp
Setup
1. Clone and install
git clone https://github.com/SudheerNaraharisetty/overleaf-mcp.git
cd overleaf-mcp
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt2. Get your Overleaf session cookie
Log in at www.overleaf.com
Open browser DevTools (F12) → Application (Chrome) or Storage (Firefox) → Cookies →
https://www.overleaf.comCopy the value of the
overleaf_session2cookie
3. Configure the cookie
Create a .env file next to server.py:
echo 'OVERLEAF_SESSION_COOKIE=<paste cookie value here>' > .envNote: The cookie expires when your Overleaf session does. If the server starts returning auth errors, grab a fresh cookie and update
.env.
4. Add to your MCP client
Claude Code:
claude mcp add overleaf -- /path/to/overleaf-mcp/.venv/bin/python /path/to/overleaf-mcp/server.pyClaude Desktop — add to claude_desktop_config.json:
{
"mcpServers": {
"overleaf": {
"command": "/path/to/overleaf-mcp/.venv/bin/python",
"args": ["/path/to/overleaf-mcp/server.py"]
}
}
}(Any other MCP client works the same way — run server.py with the venv's Python over stdio.)
5. Try it
Ask your assistant something like:
"List my Overleaf projects" "Fix the compile errors in my thesis project" "Update the abstract in main.tex and recompile"
How it works
Authenticates with the
overleaf_session2cookie (same session your browser uses)Reads/writes files through Overleaf's project API — edits show up live in the web editor and in project history
Compiles run on Overleaf's servers, so you get the exact same output as clicking "Recompile"
Security notes
Your session cookie grants full access to your Overleaf account — keep
.envprivate (it's gitignored)The server runs locally over stdio; nothing is exposed to the network
License
MIT
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.
Related MCP Servers
- Alicense-qualityDmaintenanceEnables access to Overleaf LaTeX projects through Git integration, allowing users to read files, analyze document structure, extract sections, and manage multiple projects through natural language commands.177MIT
- Alicense-qualityBmaintenanceEnables editing Overleaf projects from Claude, with tools to list, read, edit, and sync files via Git.MIT
- Alicense-qualityCmaintenanceEnables Claude and AI agents to read and edit Overleaf documents in real time, with support for project listing, document manipulation, LaTeX compilation, and live collaboration.1038MIT
- FlicenseBqualityCmaintenanceEnables AI agents to interact with Overleaf projects directly, including creating projects, managing files, and editing documents in real-time using Overleaf's native Operational Transformation protocol.10
Related MCP Connectors
Edit your Overleaf LaTeX projects from Claude and ChatGPT; every change is a real Git commit.
Search arXiv/Semantic Scholar/OpenAlex + medical evidence (PubMed/Europe PMC) + LaTeX/PDF tools.
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/SudheerNaraharisetty/overleaf-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server