overleaf-mcp-server
mcp
Pass
Health Pass
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 35 GitHub stars
Code Pass
- Code scan — Scanned 10 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
MCP server for Overleaf projects. Syncs LaTeX files via Git, parses sections, equations, and citations, and exposes them to AI clients for assisted paper review, LaTeX fixes, and content generation.
README.md
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
uv run overleaf-mcp
If you are running from an activated virtual environment, you can also use:
python -m src.main
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", "overleaf-mcp"],
"env": {
"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
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found