Overleaf CLISAFE
Overleaf CLI - pull, push, sync, compile LaTeX projects from your terminal. Git remote helper, MCP server for AI agents, and TypeScript library.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
Command-line interface for Overleaf — Sync, manage, and compile LaTeX projects from your terminal.
[](https://github.com/aloth/olcli/actions/workflows/ci.yml) [](https://www.npmjs.com/package/@aloth/olcli) [](https://www.npmjs.com/package/@aloth/olcli) [](https://github.com/aloth/olcli) [](https://opensource.org/licenses/MIT) [](https://agentskills.io)
Work with Overleaf projects directly from your command line. Edit locally with your favorite editor, version control with Git, and sync seamlessly with Overleaf's cloud compilation.
Features
- 📋 List all your Overleaf projects
- ✨ Create blank or example projects
- ⬇️ Pull project files to local directory for offline editing
- ⬆️ Push local changes back to Overleaf
- 🔄 Sync bidirectionally with smart conflict detection
- 🔍 Diff local files against the live remote before pushing
- 📝 Marked-up revisions —
diff --latexdiffproduces the struck-through/underlined PDF advisors and journals ask for - 🔀 Git remote — use Overleaf as a native git remote (docs)
- ✌️ Two-way deletions — files removed locally are deleted on Overleaf on next sync
- 🗑️ Delete and ✏️ rename remote files by path
- 🚫 Smart ignore — LaTeX build artifacts and OS noise filtered automatically; extend with
.olignore - 📄 Compile PDFs using Overleaf's remote compiler
- 📦 Download individual files or full project archives
- 📤 Upload files to projects
- 💬 **Revi
276c1dc02365OBSERVED · 2026-10-07Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add olcli --env OVERLEAF_PASSWORD=${OVERLEAF_PASSWORD} -- npx -y @aloth/[email protected]{
"mcpServers": {
"olcli": {
"command": "npx",
"args": [
"-y",
"@aloth/[email protected]"
],
"env": {
"OVERLEAF_PASSWORD": "${OVERLEAF_PASSWORD}"
}
}
}
}Exposed tools (19)
11 read · 7 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
add_comment | write | Add a review comment to a specific location in an Overleaf project document. |
compile | read | Compile an Overleaf project using the remote LaTeX compiler. Returns the PDF URL and any log messages. |
compile_with_outputs | read | Compile an Overleaf project and return all output file metadata (PDF, BBL, logs, etc.). Useful for arXiv submission workflows. |
create_project | write | Create a new Overleaf project and return its id, name and URL. Unlike plan_project_renames, this one does apply: creating is additive, nothing existing is overwritten, and an unwanted project can be deleted afterwards. |
delete_entity | destructive | Delete a file or document from an Overleaf project by its remote path. |
diff_project | read | Compare local files against the current remote state of an Overleaf project and return the content-level differences. Read-only: nothing is uploaded or written. This is the MCP counterpart of |
download_file | read | Download a single file from an Overleaf project by its path within the project. |
download_pdf | read | Compile an Overleaf project and download the resulting PDF to a local file. |
get_entities | read | Get a flat list of all files and documents in an Overleaf project with their paths and types. |
get_project_info | read | Get detailed information about an Overleaf project including its file tree (folders, docs, and files). |
list_comments | read | List review comments on an Overleaf project. Supports filtering by status (all, open, resolved). |
list_projects | read | List all Overleaf projects in the account. Returns project IDs, names, and metadata. |
plan_project_renames | write | Preview a bulk project rename across the account. Returns the planned renames, skipped projects and any name collisions. This tool NEVER renames anything - applying the plan requires the human to run |
pull_project | read | Download and extract an Overleaf project as a zip to a local directory. Creates the directory if it does not exist. |
push_file | write | Upload a local file to an Overleaf project. The remote path is inferred from the file_path argument. |
rename_entity | write | Rename a file or document within an Overleaf project. |
rename_project | write | Rename an Overleaf project itself (not a file inside it). Use rename_entity for files and folders. |
reply_to_comment | write | Add a reply to an existing comment thread on an Overleaf project. |
resolve_comment | read | Mark a review comment thread as resolved. |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- none-observed
- Shell
- declared (1 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (7)
delete_entity
['../../escaped-twice.tex', buf('nope\n')],assert.equal(resolveWithin(base, '../../etc/passwd'), null);
assert.equal(resolveWithin(base, 'a/../../evil.sh'), null);
await run(`http://127.0.0.1:${address.port}`, () => request);@modelcontextprotocol/sdk, adm-zip, chalk, cheerio, commander, conf, diff, ignore
- **`olcli auth --password` is now optional and prompts instead** ([#50](https://github.com/aloth/olcli/issues/50)) - passing it puts the password in shell history, so `olcli auth --email you@example.
Gates applied: no_behavioural_pass.
276c1dc02365full audit observations/trust-audit/mcp-server/aloth__overleaf-cli.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-07 | 276c1dc02365 | SAFE | B | 89 | first audit |
Questions
What is the Overleaf CLI MCP server?
Overleaf CLI - pull, push, sync, compile LaTeX projects from your terminal. Git remote helper, MCP server for AI agents, and TypeScript library.
What tools does Overleaf CLI expose?
19 in total: 11 read-only, 7 that write, and 1 that can delete or overwrite (delete_entity). Every one is listed on this page with its risk.
Is Overleaf CLI safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does Overleaf CLI need?
It reads OVERLEAF_PASSWORD from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Overleaf CLI run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as @aloth/olcli at 0.13.0.
How current is this page?
The grade is for one exact copy of the source (276c1dc02365), read on 2026-10-07. The repository is watched and re-audited when it changes.