Overleaf MCP
Provides tools to read and update Overleaf LaTeX papers via git, including reading and writing main.tex and bibliography files, compiling with pdflatex, and pushing changes.
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., "@Overleaf MCPread my current paper"
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 LLM agents (Claude Code, etc.) read and update Overleaf LaTeX papers via git.
Architecture
overleaf_mcp.py— FastAPI server exposingread_paperandupdate_and_push_papertools over HTTPmain.py— stdio bridge that translates JSON-RPC (MCP protocol) to HTTP calls; this is what MCP clients connect to
Related MCP server: overleaf-mcp
Prerequisites
Python 3.10+
pdflatex(for LaTeX compilation)git
Setup
Clone your Overleaf project:
git clone https://git.overleaf.com/<your-project-id> ~/path/to/your-paperConfigure the repository path:
cp .env.example .env # Edit .env and set REPO_DIR to the absolute path of your local cloneInstall dependencies:
pip install -e .
Usage
Step 1: Start the MCP server
python overleaf_mcp.pyThe server starts on http://localhost:8000 and exposes:
GET /mcp/tools— list available toolsPOST /mcp/execute— execute a toolGET /health— health check
Step 2: Connect an MCP client
The bridge (main.py) speaks JSON-RPC over stdio, the standard MCP transport. Point your MCP client to it.
Claude Code (via claude.json):
{
"mcpServers": {
"overleaf": {
"command": "python",
"args": ["/path/to/overleaf_mcp/main.py"]
}
}
}Or run the bridge directly for testing:
python main.pyTools
Tool | Description | Parameters |
| Reads the current content of | None |
| Writes new |
|
| Reads a |
|
| Writes new |
|
Example
See mcp_sample.json for a sample request payload.
This server cannot be deployed
Maintenance
Related MCP Connectors
Edit your Overleaf LaTeX projects from Claude and ChatGPT; every change is a real Git commit.
Git-backed platform for skills, tools, and context for AI agents
Search arXiv/Semantic Scholar/OpenAlex + medical evidence (PubMed/Europe PMC) + LaTeX/PDF tools.
Read and write KukGit repositories, files, issues and pull requests from an AI assistant.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables 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.11 npm9MIT
- AlicenseNot gradedqualityBmaintenanceEnables editing Overleaf projects from Claude, with tools to list, read, edit, and sync files via Git.MIT
- AlicenseNot gradedqualityBmaintenanceConnects Claude/ChatGPT to Overleaf projects via the Git integration, enabling read, edit, write, and file management through natural language commands.2AGPL 3.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to read, edit, and compile LaTeX documents in Overleaf projects with tracked changes via the Model Context Protocol.2MIT