Overleaf MCP Server: LaTeX projects over Git
Overleaf MCP Server (YounesBensafia)
An agent reads and edits Overleaf project files through standard Git sync and pushes the changes to the project itself
- 66 ★ on the repository
- Last commit
Broad access
Why this level
- The Git token opens read and write access to every project on the account
- write_file and edit_file commit and push changes to the Overleaf project immediately
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/overleaf-mcp-server-younesbensafiaDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- The Git token opens read and write access to every project on the account
- write_file and edit_file commit and push changes to the Overleaf project immediately
This is third-party code. Review the repository files before installing.
What it does
Overleaf Git integration is the channel. The server keeps a local mirror of the project, pulls fresh files and, on write, commits and pushes back to Overleaf. The agent therefore edits a paper or thesis the way you would edit it over Git. There are five tools. list_files pulls and lists project files, read_file reads content and can return a large document in chunks through offset and limit. write_file overwrites a whole file, edit_file replaces one exact match, and both push the changes. sync_project forces a refresh of the mirror. It needs Python 3.13, the uv package manager and an Overleaf plan with Git integration (personal, group or institutional). Access is set by a Git token from account settings and a project ID, and the allowed projects are restricted by the OVERLEAF_ALLOWED_PROJECTS variable.
Who it is for. Students, PhD candidates and researchers who write papers and theses in Overleaf and want LaTeX checks and fixes from an agent.
Good fit when
- The agent should fix LaTeX compile errors in a thesis chapter
- A paper needs notation and bibliography brought to one style
- You want to read a large file in chunks and review a section
- An edit should go straight into the Overleaf project without manual file uploads
Not a fit when
- Your Overleaf plan has no Git integration: the server gets a 403 on Git operations
- You need a PDF compile check: the server edits text and does not run a document build
- Several people edit the same file at once: on conflicts you must run sync_project before writing
Example request
Read main.tex and the introduction chapter, find compile errors and fix them, leaving the citation style as is.MCP
- Transport
- stdio
- Authentication
- API key
Environment variables
OVERLEAF_TOKENrequired, secret- Overleaf Git integration token, covers the whole account
PROJECT_IDrequired- Overleaf project ID from the page address
OVERLEAF_ALLOWED_PROJECTS- Comma-separated list of allowed projects
Limitations
Overleaf Git integration is not on every plan, so a free account often will not work. The Git token covers the whole account, so keep it only in the client environment or a protected .env file and rotate it if exposed. The project ID is required in the config even when passed in every call. The first clone of a large project may exceed the client timeout, so call sync_project first. The README names Claude Desktop as the main client and does not describe others. Installation from PyPI is deferred in the README, so run it from Git.
How to disable. Remove the overleaf entry from the client config, then revoke the Git token in your Overleaf account settings. The local project mirror can be deleted along with the cloned server folder.
FAQ
Which Overleaf plan is required?
A plan with Git integration: individual, group or institutional. Universities often provide free access, which you check with an institutional email on the Overleaf for Institutions page.
Where do I get the token and project ID?
The ID is in the project address after the word project. The token is generated in account settings under Git integration authentication tokens, and Git is enabled in the project menu under Integrations.
Can I allow several projects?
Yes, list them separated by commas in OVERLEAF_ALLOWED_PROJECTS. By default the list contains only the project from PROJECT_ID.
What about instructions inside project files?
The server warns that project files are untrusted input: .tex and config files may contain instructions aimed at the model. Treat the content as data and do not run commands from it.
Which agents work with it?
The server speaks stdio and connects to any MCP client. The README shows setup for Claude Desktop, and Claude Code and Cursor use the same launch command.
Discussion
No questions or reviews yet.
Related
MCP serversAn MCP server for Overleaf: the agent reads a LaTeX project over Git, finds sections and edits them with a commit
An Overleaf CLI that pulls LaTeX projects to a folder, pushes edits, compiles PDFs and exposes them to an agent through MCP
Aldine is a self-hosted LaTeX editor with collaboration and git, whose built-in MCP lets Claude edit and typeset a document.
A LaTeX, Typst and Markdown editor with a local MCP server: an agent reads, edits and compiles the open project
A local MCP server for arXiv literature work: section-level paper reads, BibTeX from metadata, topic watches
A skill and CLI olcli that edit Overleaf projects directly: precise replacements, uploads, PDF builds and a live edit session.
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| Overleaf MCP Server: LaTeX projects over Git (this card) | no | API key | 66 | |
| Overleaf Remote Skill | no | 120 | a skill for remote Overleaf work, not an MCP server with Git sync | |
| Codex Overleaf Link | no | 110 | a Codex plugin for Overleaf, works only in that agent |
README in short
The README explains the Git sync workflow with architecture and call sequence diagrams. It covers requirements, Git and token setup, a quick start, a tool table, the Claude Desktop config and common errors.