olcli — Claude Code MCP server: what it does, how to install
olcli connects AI coding assistants to Overleaf projects to edit LaTeX files, run cloud compilation, download PDFs, and inspect comments.
MIT ★ 270 updated 2026-10-29
claude mcp add --env OVERLEAF_SESSION=<OVERLEAF_SESSION> --env OVERLEAF_BASE_URL=<OVERLEAF_BASE_URL> --env OVERLEAF_COOKIE_NAME=<OVERLEAF_COOKIE_NAME> --transport stdio olcli -- npx -y @aloth/olcliWhat olcli does
The server gives your coding assistant access to Overleaf projects, supporting both official overleaf.com and self-hosted ShareLaTeX setups. The agent can inspect file trees, pull documents locally, push edits, and trigger remote cloud compilation. It can download finished PDF files along with compile artifacts like .bbl and .aux needed for arXiv.
Review workflows are supported directly. The tool lets the agent check peer review threads, reply to comments, and accept or reject tracked changes. It also supports marked-up revisions with latexdiff to highlight changes for journal submissions.
Authentication requires a valid session token. Without setting OVERLEAF_SESSION, requests to the remote project will fail.
What it helps with
- compile remote Overleaf LaTeX projects into PDF documents
- download compile artifacts like aux and bbl files for arXiv
- review feedback threads and accept tracked edits
- sync local LaTeX edits back to an Overleaf workspace
Example prompts for the agent
- Compile the Overleaf project and download the resulting PDF
- List unresolved comments and tracked changes in chapter2.tex
- Push local changes to the Overleaf paper and check the diff
How to install olcli
Platform CLI
claude mcp add --env OVERLEAF_SESSION=<OVERLEAF_SESSION> --env OVERLEAF_BASE_URL=<OVERLEAF_BASE_URL> --env OVERLEAF_COOKIE_NAME=<OVERLEAF_COOKIE_NAME> --transport stdio olcli -- npx -y @aloth/olcliReplace <…> with your own values
Platform CLI
codex mcp add olcli --env OVERLEAF_SESSION=<OVERLEAF_SESSION> --env OVERLEAF_BASE_URL=<OVERLEAF_BASE_URL> --env OVERLEAF_COOKIE_NAME=<OVERLEAF_COOKIE_NAME> -- npx -y @aloth/olcliReplace <…> with your own values
Config file
{
"mcpServers": {
"olcli": {
"command": "npx",
"args": [
"-y",
"@aloth/olcli"
],
"env": {
"OVERLEAF_SESSION": "<OVERLEAF_SESSION>",
"OVERLEAF_BASE_URL": "<OVERLEAF_BASE_URL>",
"OVERLEAF_COOKIE_NAME": "<OVERLEAF_COOKIE_NAME>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"olcli": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@aloth/olcli"
],
"env": {
"OVERLEAF_SESSION": "<OVERLEAF_SESSION>",
"OVERLEAF_BASE_URL": "<OVERLEAF_BASE_URL>",
"OVERLEAF_COOKIE_NAME": "<OVERLEAF_COOKIE_NAME>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e OVERLEAF_SESSION=<OVERLEAF_SESSION> -e OVERLEAF_BASE_URL=<OVERLEAF_BASE_URL> -e OVERLEAF_COOKIE_NAME=<OVERLEAF_COOKIE_NAME> olcli npx -y @aloth/olcliReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about olcli
How do I install olcli in Claude Code?
Run claude mcp add olcli -e OVERLEAF_SESSION=<OVERLEAF_SESSION> -- npx -y @aloth/olcli in your terminal. Replace <OVERLEAF_SESSION> with your active Overleaf session cookie value.
What does the olcli MCP server do?
It exposes tools for managing Overleaf projects from your AI agent. You can fetch sources, compile documents in the cloud, track review comments, and manage edits.
Does olcli support self-hosted Overleaf instances?
Yes, it connects to self-hosted ShareLaTeX setups. You configure connection parameters by setting the OVERLEAF_BASE_URL and OVERLEAF_COOKIE_NAME environment variables.