overleaf-mcp
Enables integration with GitHub repositories linked to Overleaf projects, allowing users to check sync status, push Overleaf content as a commit, and pull the repository's default branch into Overleaf.
Provides tools for managing Overleaf projects, including listing and creating projects, reading and writing .tex/.bib files, compiling documents, reading LaTeX logs, and downloading PDFs.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@overleaf-mcpcompile my latest Overleaf project and download the PDF"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
overleaf-mcp
Let your coding agent (Claude Code, Cursor, Codex CLI, Windsurf, Claude
Desktop, …) work on your Overleaf projects: list projects, read and write
.tex/.bib files, compile, read the LaTeX log, download the PDF.
Built for our team Overleaf at overleaf.yihome.org (API at
https://github.yihome.org/api/v1, used by default). Works with any
self-hosted Overleaf running the
overleaf-selfhost companion
API — set OVERLEAF_API_URL to point elsewhere. (overleaf.com has no such API.)
Using an AI coding agent? Paste this repo's URL to it and say "install this MCP server". The agent should follow
llms-install.md, which contains everything it needs.
What you need
An API key — sign in at https://github.yihome.org with your Overleaf account → API keys → Create key. Copy it once; it's shown only once. Tip: create a separate Overleaf account for your AI and share only the projects it should touch, then make the key from that account.
(Only for other deployments) the API URL, shaped like
https://github.<domain>/api/v1, passed asOVERLEAF_API_URL.
Related MCP server: claudeleaf
Install (one command per client)
No clone, no build — npx fetches and runs it straight from GitHub.
Claude Code
claude mcp add overleaf -s user -e OVERLEAF_API_KEY=olk_... -- npx -y github:yidong72/overleaf-mcpCodex CLI (~/.codex/config.toml)
[mcp_servers.overleaf]
command = "npx"
args = ["-y", "github:yidong72/overleaf-mcp"]
env = { OVERLEAF_API_KEY = "olk_..." }Cursor (.cursor/mcp.json in the project, or ~/.cursor/mcp.json) /
Windsurf (~/.codeium/windsurf/mcp_config.json) /
Claude Desktop (claude_desktop_config.json) — same JSON shape:
{
"mcpServers": {
"overleaf": {
"command": "npx",
"args": ["-y", "github:yidong72/overleaf-mcp"],
"env": { "OVERLEAF_API_KEY": "olk_..." }
}
}
}Verify (any shell):
OVERLEAF_API_KEY=olk_... npx -y github:yidong72/overleaf-mcp --check
# → OK: connected to ... as you@example.com (key "..."); 3 project(s) visibleTools
tool | what it does |
| projects you can access (id, name, access) |
| new blank project |
| all files with sizes |
| file contents |
| atomic multi-file write (whole-file contents; |
| delete |
| compile; returns status + log tail |
| compile if needed, save the PDF locally |
| is the project linked to a GitHub repo; commits to pull / changes to push |
| push Overleaf content to the linked GitHub repo as one commit |
| pull the repo's default branch into Overleaf |
Typical agent loop: list_projects → read_file main.tex → write_files →
compile (read the log on failure, fix, repeat) → download_pdf →
optionally github_push.
The GitHub tools need the user to have linked their GitHub account and the project to a repository once in the sync web UI (the same place API keys are made); until then they return a 409 explaining what to do.
Notes
Writes are whole-file replacements applied atomically; Overleaf users editing the same file in the browser see a "changed externally" notice.
The API acts with exactly the permissions of the account that made the key.
The full REST API this wraps is documented at
https://<your api host>/api/v1/docsand, for agents,/api/v1/llms.txt.Requires Node.js ≥ 18 (for
fetchandnpx).Different Overleaf deployment? Add
-e OVERLEAF_API_URL=https://github.<domain>/api/v1(or the same key in the JSONenv).
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Edit your Overleaf LaTeX projects from Claude and ChatGPT; every change is a real Git commit.
A hosted LaTeX editor your assistant can actually use. Search 1,019 free templates, create and edit projects, and compile them to PDF on a real TeX Live farm, getting back the PDF or the compile log when a build fails. Thirteen tools behind OAuth 2.1, with nothing to install and nothing to run locally.
Persistent AI LaTeX workspace: edit and compile multi-file projects, export publication-ready PDFs.
Overleaf alternative online LaTeX editor. AI agents edit, comment, and chat. Keep or revert edits.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables LLM agents to read and update Overleaf LaTeX papers via git, with tools for reading/writing main.tex and bibliography files.-
- AlicenseNot gradedqualityCmaintenanceEnables Claude and AI agents to read and edit Overleaf documents in real time, with support for project listing, document manipulation, LaTeX compilation, and live collaboration.9814MIT
- FlicenseBqualityCmaintenanceEnables AI agents to interact with Overleaf projects directly, including creating projects, managing files, and editing documents in real-time using Overleaf's native Operational Transformation protocol.10-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to read, edit, and compile LaTeX documents in Overleaf projects with tracked changes via the Model Context Protocol.1MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yidong72/overleaf-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server