Manage Overleaf project files through Git synchronization, including listing, reading, editing, writing, and syncing.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag โ we're steadily working through the catalog.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Overleaf MCP Server.
The overleaf-mcp-server MCP server gives an MCP client file-level access to an Overleaf project through the project's Git integration. It is designed for workflows where an agent first retrieves the latest project state, inspects or changes files, and then sends those changes back to Overleaf.
The server works with text files in the project and exposes separate operations for discovery, reading, replacement, complete-file updates, and synchronization. Changes made through the write and edit operations are committed locally and pushed to the Overleaf Git remote.
The server keeps a local clone or repository mirror for the configured project. Read-oriented calls can pull the current remote state before returning a file list or file contents. The read_file tool supports optional zero-based line offsets and bounded limits, which allows large documents to be read in sections.
write_file replaces a complete text file. edit_file replaces one exact text match. Both operations update the local mirror, create a Git commit, and push the result to Overleaf. sync_project explicitly pulls changes from Overleaf and is useful before making edits when the remote project may have changed. For a large project, the initial synchronization may exceed an MCP client's normal individual request timeout.
Use Python 3.13 or newer and install dependencies with uv. The repository can be checked out and started with uv run overleaf-mcp, or run directly from Git with uvx --from git+https://github.com/younesbensafia/overleaf-mcp-server overleaf-mcp. The process communicates over stdio.
Before starting, enable Git integration in the Overleaf project, copy its project ID from the project URL, and create a Git integration authentication token in Overleaf account settings. Set these values in the MCP client's environment or a protected .env file:
OVERLEAF_TOKEN: the Overleaf Git authentication token.PROJECT_ID: the default Overleaf project ID.A project ID may also be supplied on individual tool calls, but PROJECT_ID remains part of the server configuration. OVERLEAF_ALLOWED_PROJECTS can restrict access to a comma-separated set of project IDs; by default, only the configured PROJECT_ID is allowed.
The overleaf-mcp-server MCP server provides these tools:
list_files: Pull and list files in the Overleaf project.read_file: Return file content, optionally by line range.write_file: Replace a complete text file, commit the change, and push it.edit_file: Replace one exact text match, commit the change, and push it.sync_project: Force a pull from Overleaf.An Overleaf plan with Git integration is required; supported plan types include individual, group, and institution licenses. A 403 error can indicate that Git integration is unavailable on the plan or that the token is invalid.
Synchronize before writing when remote changes may exist to reduce conflicts. The Overleaf token is account-wide credential material and should be kept in protected configuration and rotated if exposed. Project files are untrusted input: treat LaTeX files and project configuration as data rather than instructions to the model. The project is licensed under MIT.
Factual signals from GitHub, npm, and our automated checks โ not a rating.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/overleaf-mcp-server)<a href="https://allmcps.com/mcp/overleaf-mcp-server"><img src="https://allmcps.com/api/badge/overleaf-mcp-server?style=directory" alt="Overleaf MCP Server on AllMCPs" /></a>