# olcli

olcli connects AI coding assistants to Overleaf projects to edit LaTeX files, run cloud compilation, download PDFs, and inspect comments.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 270 repo stars
- Author: aloth
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/aloth/olcli
- Updated: 2026-10-29
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/olcli

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `OVERLEAF_SESSION`, `OVERLEAF_BASE_URL`, `OVERLEAF_COOKIE_NAME` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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/olcli
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
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/olcli
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

**Platform CLI**
```bash
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/olcli
```
Replace <…> with your own values

## When to use it
- 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
- 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

## Similar
- [overleaf-sync](https://affpapa.org/en/nevibecode/skills/overleaf-sync.md) — skill · 493 installs
- [overleaf-mcp-server](https://affpapa.org/en/nevibecode/mcp/overleaf-mcp-server.md) — MCP server · ★ 66 repo stars
- [review-overleaf](https://affpapa.org/en/nevibecode/skills/review-overleaf.md) — skill · ★ 1216 repo stars
- [posterskill-academic-posters](https://affpapa.org/en/nevibecode/skills/posterskill-academic-posters.md) — skill · 1400 installs
- [latex-conference-template-organizer](https://affpapa.org/en/nevibecode/skills/latex-conference-template-organizer.md) — skill · 403 installs
- [overleaf-skills](https://affpapa.org/en/nevibecode/plugins/overleaf-skills.md) — plugin · ★ 1216 repo stars

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
