Overleaf MCP Server
Enables MCP clients to manage Overleaf projects via Git sync, including listing, reading, writing, and syncing files.
README
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.
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| C
Tool 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 + metadata
Quick Start
git clone https://github.com/younesbensafia/overleaf-mcp-server.git
cd overleaf-mcp-server
uv sync
# Configure environment
cp .env.example .env
# then edit .env with your token/project id
PYTHONPATH=. uv run src/main.py
If you are running from an activated virtual environment, you can also use:
PYTHONPATH=. python src/main.py
Environment
.env example:
OVERLEAF_TOKEN=your_git_token
PROJECT_ID=your_project_id
Notes:
OVERLEAF_TOKENis required.project_idcan be passed per tool call, or use defaultPROJECT_ID.- Overleaf Git access requires a plan that supports Git integration.
Available Tools
| Tool | Description |
|---|---|
list_files |
Pull and list files from Overleaf project |
read_file |
Read file content |
write_file |
Update file, commit, and push to Overleaf |
sync_project |
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", "src/main.py"],
"env": {
"PYTHONPATH": ".",
"OVERLEAF_TOKEN": "your_git_token",
"PROJECT_ID": "your_project_id"
}
}
}
}
Troubleshooting
- Authentication fails:
- Confirm
OVERLEAF_TOKENis valid and has Git access. - Re-check your Overleaf subscription supports Git integration.
- Confirm
- Wrong project content:
- Set the correct
PROJECT_IDin.env. - Or pass
project_idexplicitly in tool calls.
- Set the correct
- Sync conflicts:
- Run
sync_projectbeforewrite_fileif the remote changed.
- Run
- Server not starting:
- Ensure dependencies are installed with
uv sync. - Verify Python 3.13+ is available.
- Ensure dependencies are installed with
Requirements
- Python 3.13+
uvpackage manager
License
MIT - See LICENSE
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.