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 "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 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 Server
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 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/codeCrack-01/overleaf_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server