Overleaf MCP Server
An MCP server for Overleaf: the agent reads a LaTeX project over Git, finds sections and edits them with a commit
- 334 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- The Git token grants full read and write access to the whole Overleaf project
- The write_file and write_section tools change project files and create commits
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/overleaf-mcp-serverDetects 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 grants full read and write access to the whole Overleaf project
- The write_file and write_section tools change project files and create commits
This is third-party code. Review the repository files before installing.
What it does
The server connects Overleaf projects to an MCP client through Git integration. The agent gets a list of project files, .tex by default, reads any of them and parses the LaTeX document structure into sections and subsections. The content of one section can be requested by title without loading the whole file. There are eight tools, and only two write to the project. write_file replaces a file entirely, while write_section updates one section. Every write carries a required commit message. Several projects can be connected. One needs only the OVERLEAF_PROJECT_ID and OVERLEAF_GIT_TOKEN environment variables. For several, a projects.json file goes into the config directory and the tool call names projectName. Paths from the agent are confined to the cloned project: the server rejects escapes with .. and absolute paths.
Who it is for. For authors of papers and theses in LaTeX who work in Overleaf and want an agent to read and edit sections.
Good fit when
- You need the structure of a long thesis: the list of sections and subsections of main.tex
- You need to read only the Introduction section without loading the whole document
- You want the agent to rewrite one section and save the edit as a commit in Overleaf
- You work with several Overleaf projects at once and switch between them by name
- Before editing you need a project summary: files and document structure
Not a fit when
- You need a PDF build or compile check: the server works with file text
- The project lives outside Overleaf: ordinary LaTeX files need only the agent's normal folder access
- You need to work offline: the server reaches Overleaf Git over the internet
Example request
Show the sections of main.tex in the thesis project and rewrite the Introduction section shorter while keeping the citations.MCP
- Transport
- stdio
- Authentication
- API key
Environment variables
OVERLEAF_PROJECT_IDrequired- Project id from the Overleaf URL.
OVERLEAF_GIT_TOKENrequired, secret- Git Integration token from Overleaf account settings.
OVERLEAF_GIT_TOKEN_FILE- Path to a file holding the token instead of OVERLEAF_GIT_TOKEN.
OVERLEAF_PROJECTS_CONFIG- Absolute path to a non-standard projects.json.
Limitations
Node.js and an MCP client such as Claude Desktop are required. On Windows running through npx needs a cmd /c wrapper. The server reads and writes files through a Git clone of the project, and each project needs its own id and token. The file list shows only .tex by default. We have not checked whether Overleaf is reachable from Russia. If the client config is synced or backed up, move the token into a separate file.
How to disable. Remove the overleaf block from claude_desktop_config.json and restart the client. The token can be revoked in Overleaf settings under Git Integration.
FAQ
Where do I get the Overleaf project id and token?
The id is in the address of an open project: https://www.overleaf.com/project/PROJECT_ID. The token is created in Overleaf account settings under Git Integration with the Create Token button.
How do I connect several Overleaf projects?
Create projects.json in ~/.config/overleaf-mcp (on Windows in %APPDATA%\overleaf-mcp) with projectId and gitToken for each project. The env block in client settings is then unnecessary and the tool call passes projectName.
How do I keep the token out of client settings?
Set OVERLEAF_GIT_TOKEN_FILE to the path of a text file instead of OVERLEAF_GIT_TOKEN. The file is read once at startup and trailing whitespace and newlines are trimmed.
Can the agent damage the project?
It can, if it writes bad text: write_file and write_section change files and make a commit. The token gives full access to the project, so ask the agent to show the text before writing.
What does write_section do?
The tool replaces the content of one section located by its title. newContent must carry the new text including the heading line, such as the LaTeX section command, plus a required commit message.
Discussion
No questions or reviews yet.
Related
MCP serversA local MCP server for arXiv literature work: section-level paper reads, BibTeX from metadata, topic watches
An MCP server on top of pandoc: the agent converts Markdown, HTML, DOCX, LaTeX, EPUB, ODT and other formats into one another
A Zotero plugin with a built-in MCP server: the agent searches the library, reads PDFs and notes, and works with annotations and metadata
MCP PDF for large documents: the agent searches by meaning and keyword across one file or a folder and reads only the pages, tables and scans it needs
PageIndex MCP: long PDFs for an agent
PageIndex MCP
An MCP server that lets an agent read long PDFs through a document tree: retrieval by reasoning instead of a vector database
MCP for PDF and ebook files: the agent finds books in a folder and reads EPUB and PDF by chapter and page, with contents and metadata as Markdown
Comparison with similar tools
Entries that share the main search query, and how they differ.
| Entry | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| Overleaf MCP Server (this entry) | no | API key | 334 | |
| LaTeX Document Skill | no | 803 | a Claude Code skill that creates a LaTeX document from a description | |
| mcp-pandoc | no | not required | 584 | document conversion between formats built on pandoc |
README in short
Quick setup is one JSON block for Claude Desktop, with a separate Windows variant. At the end come a protocol smoke test from the shell and security notes.