Overleaf MCP Server
Connects to Overleaf projects via Git sync, providing tools to list, read, write, and sync files in an Overleaf project.
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 MCP Serverlist files in my Overleaf project"
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 Server
An MCP server focused only on Overleaf projects (via Overleaf Git sync).
What This Server Does
Connects MCP-compatible clients to your Overleaf project through Git sync.
Exposes file-level tools to list, read, write, and sync project content.
Keeps workflow simple: pull latest files, edit, then push back to Overleaf.
Related MCP server: Overleaf MCP Server
Architecture
flowchart LR
C[MCP Client\nClaude Desktop / other MCP host] -->|Tool Call| S[Overleaf MCP Server]
S -->|Git Sync| O[Overleaf Git Remote]
S -->|Read / Write| L[Local Repo Mirror]
L -->|Commit + Push| O
O -->|Pull / Fetch| L
S -->|Tool Result| CTool Workflow
sequenceDiagram
participant Client as MCP Client
participant Server as Overleaf MCP Server
participant Local as Local Mirror
participant Overleaf as Overleaf Git
Client->>Server: list_files / read_file
Server->>Local: Ensure local clone
Server->>Overleaf: git pull
Overleaf-->>Server: latest content
Server-->>Client: file list / file content
Client->>Server: write_file(path, content)
Server->>Local: update file
Server->>Local: git commit
Server->>Overleaf: git push
Server-->>Client: success + metadataRequirements
Python 3.13+
uvpackage managerAn Overleaf plan with Git integration (individual, group, or institution license). Check if your institution provides free access at Overleaf for Institutions - use your institutional email. If your institution is not listed, upgrade your plan.
Git Setup
Enable Git - open your project on Overleaf → Menu → enable Git under Integrations.
Copy project ID - from the browser URL (e.g.
https://www.overleaf.com/project/69a4f7cc4eaf13bd56de5b04→69a4f7cc4eaf13bd56de5b04).Generate a Git token - Account Settings → Git integration authentication tokens → Generate new token.
Configure
.env- copy.env.exampleto.envand fill in:
OVERLEAF_TOKEN=your_git_token
PROJECT_ID=your_project_id
project_idcan also be passed per tool call if you leavePROJECT_IDunset.
Quick Start
git clone https://github.com/younesbensafia/overleaf-mcp-server.git
cd overleaf-mcp-server
uv sync
cp .env.example .env # then edit with your token/project id
uv run python -m src.mainThe server listens on stdio - connect your MCP client (Claude Desktop, etc.) to it.
Available Tools
Tool | Description |
| Pull and list files from Overleaf project |
| Read file content |
| Update file, commit, and push to Overleaf |
| Force a pull/sync from Overleaf |
Claude Desktop Setup
Add to ~/.config/Claude/claude_desktop_config.json:
{
"mcpServers": {
"overleaf": {
"command": "uv",
"args": ["--directory", "/path/to/overleaf-mcp-server", "run", "python", "-m", "src.main"],
"env": {
"OVERLEAF_TOKEN": "your_git_token",
"PROJECT_ID": "your_project_id"
}
}
}
}Troubleshooting
403 Forbidden on git operations:
Your plan doesn't include Git integration - follow the Git Setup section.
Or the Git token is wrong - regenerate it at Account Settings → Git integration authentication tokens.
Wrong project content:
Set the correct
PROJECT_IDin.env.Or pass
project_idexplicitly in tool calls.
Sync conflicts:
Run
sync_projectbeforewrite_fileif the remote changed.
Server not starting:
Ensure dependencies are installed with
uv sync.Verify Python 3.13+ is available.
License
MIT - See LICENSE
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
- AlicenseBqualityCmaintenanceProvides access to Overleaf projects via Git integration, allowing Claude and other MCP clients to read LaTeX files, analyze document structure, and extract content.6113223MIT
- AlicenseAqualityDmaintenanceIntegrates with Overleaf's Git feature to manage LaTeX projects directly from MCP-enabled environments, enabling cloning, syncing, and pushing changes between local machine and Overleaf.513MIT
- Alicense-qualityBmaintenanceEnables editing Overleaf projects from Claude, with tools to list, read, edit, and sync files via Git.MIT
- Alicense-qualityDmaintenanceEnables Git repository operations and real-time monitoring via MCP tools, with support for WebSocket events, authentication, and observability.64MIT
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
Discovery, OAuth, project operations, and exact project MCP handoff for Spala backend projects.
MCP server for interacting with the Supabase platform
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/YounesBensafia/overleaf-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server