olcli (Overleaf)
Lets your AI agent work on Overleaf LaTeX projects: edit files, compile PDFs, read comments and diff changes.
241 stars on GitHubby alothLicense MITUpdated 21 days ago
How to install
This MCP is local: it runs on your computer.
It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Codeβ¦). Choose your app:
Paste in the terminal:
claude mcp add olcli -e OVERLEAF_SESSION="<your value>" -- npx -y -y --package @aloth/olcli olcli-mcp
What to fill in
| Name | What it is | Required |
|---|---|---|
OVERLEAF_SESSION | Overleaf session cookie value (overleaf_session2 on overleaf.com) | Yes |
OVERLEAF_BASE_URL | Base URL of a self-hosted Overleaf instance | No |
OVERLEAF_COOKIE_NAME | Session cookie name, for self-hosted instances that use overleaf.sid | No |
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Compile my thesis and download the PDF.
List the open review comments on this project.
What it is
olcli is a command-line tool for Overleaf, and it ships an MCP server called olcli-mcp. The agent can pull and push project files, compile, download the PDF and work with review comments, while coauthors keep using the Overleaf web editor. Every tool that changes a project asks you to confirm first.
What it can do
- Pull, push and sync project files
- Diff local files against the live project
- Compile and download the PDF
- List, add, reply to and resolve review comments
- List, accept or reject tracked changes (premium projects)
- Create, rename and zip projects
When to use
- βΊWhen you want an AI to fix LaTeX in your thesis and compile it
- βΊWhen you want to read and answer your coauthors' review comments
- βΊWhen you need compile outputs such as .bbl for an arXiv submission
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
overleaf-syncLets your agent keep a local paper folder in two-way sync with an Overleaf project, so you can edit in Overleaf while the agent audits the local copy.paper-compileHelps Codex users compile a LaTeX paper into a PDF, fix build errors, and stop repeated failures for a rescue review instead of editing blindly.paper-compileHelps your agent compile a LaTeX paper into a PDF, fix the build errors, and check that the output is ready for submission.Frequently asked questions
Is it free and open source?
Yes, it is MIT licensed.
Does it work on the free Overleaf plan?
Yes, most features were checked on a free account. Tracked changes need a premium project.
Does it work with self-hosted Overleaf?
Yes, with Community Edition, using olcli config set-url.
Will it write without asking?
No. Every tool that changes a project shows what it will do and writes only after you confirm in the client.
How does sign-in work?
It uses your normal Overleaf session through a browser window or a pasted cookie. It never sees your password with browser sign-in.
Is the session cookie secure?
The readme says it is stored in plaintext in the config.
If it does not work
- βΊIf you see Session expired or invalid, run olcli auth again.
- βΊFor timeouts on large projects, run olcli config set-timeout 60000.
- βΊFor self-hosted Overleaf, set OVERLEAF_BASE_URL and OVERLEAF_COOKIE_NAME.
5 new skills a week. 1 minute to read.