# mcp-server-overleaf

Read and edit Overleaf papers from any AI client. Edits can arrive as tracked-change suggestions.

- **Type:** MCP server
- **Trust:** 85/100 (A), scored on the package rubric
- **Verification:** verified (build provenance)
- **Version:** 0.3.4
- **Author:** io.github.yangzichao
- **License:** MIT
- **npm:** mcp-server-overleaf
- **Source:** https://github.com/yangzichao/mcp-server-overleaf
- **Compatible clients:** claude-code, cursor, copilot, gemini (basis: transport)

## Trust

85/100 (A), scored on the package rubric
- Publisher verified: no
- Build provenance: verified attestation
- npm trusted publishing (OIDC): yes
- Install scripts: nothing suspicious found
- Prompt-injection scan: not run
- Obfuscation scan: not run
- Evidence age: 1 day

## Security scan

- **Status:** clean
- **Scanned:** 2026-09-13T10:13:15.748Z
- **Version scanned:** 0.3.4
- **CVEs:** none found by OSV at scan time

## Tools

19 declared. Statically extracted from the shipped source — a floor on the surface, not a census.
- `list_files` — Pull from Overleaf and list tracked files grouped by kind, including files hidden by sparse checkout. Optionally filter by extension and include unpublished new
- `project_summary` — Pull from Overleaf and return a JSON overview: file counts, likely main document and its section count, first ten files, pending diff statistics, and new unpubl
- `read_file` — Pull from Overleaf and read text, optionally by line range. Without mode, returns plain text. mode=full returns JSON content and revision; mode=smart with previ
- `replace_text` — Replace an exact snippet of text in a project file. The snippet must appear exactly once unless replaceAll is set.
- `edit_section` — Replace the whole body of one section of a .tex file, located by its title. Include the sectioning command itself in newContent.
- `write_file` — Overwrite a project file with new content, creating it if it does not exist. Prefer replace_text or edit_section for changes to an existing file.
- `show_diff` — Show the diff of everything edited locally but not yet pushed to Overleaf. Call this before push_changes.
- `discard_local_changes` — Throw away every local edit that has not been pushed, returning the clone to the last version seen on Overleaf.
- `list_projects` — List the Overleaf projects this server is configured to reach, and which one is the default.
- `list_sections` — List the sectioning commands in a .tex file with their line ranges, so a section can be addressed by title instead of by line number.
- `read_section` — Read the body of a single section of a .tex file, located by its title.
- `search_project` — Search all tracked text files for a string or regular expression, returning matching lines.
- `list_tracked_changes` — Read the tracked changes and review-panel comment threads on a document, as Overleaf's review panel shows them.
- `suggest_edit` — Replace an exact snippet of text so that it arrives in Overleaf as a tracked change, which a co-author can accept or reject,
- `add_comment` — Attach a review-panel comment thread to an exact snippet of text. The thread is anchored immediately;
- `project_status` — Report whether the local clone is in step with Overleaf: commits pulled, edits pending, and the recent history.
- `sync_project` — Pull the latest commits from Overleaf into the local clone without changing anything.
- `compile_project` — Compile the project locally with latexmk and report errors and warnings. Build artifacts are written outside the clone, so they are never pushed to Overleaf.
- `push_changes` — Commit the pending local edits and push them to Overleaf. Before pushing, the server re-checks Overleaf and rebases onto anything collaborators pushed in the me

## Install

**Verdict: install** — No blocking findings and no open coverage gaps — safe to install as configured.
**Config** (claude-code):
```json
"{\n  \"mcpServers\": {\n    \"mcp-server-overleaf\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"mcp-server-overleaf\"\n      ],\n      \"env\": {\n        \"OVERLEAF_GIT_TOKEN\": \"<YOUR_OVERLEAF_GIT_TOKEN>\",\n        \"OVERLEAF_SESSION_COOKIE\": \"<YOUR_OVERLEAF_SESSION_COOKIE>\"\n      }\n    }\n  }\n}"
```
**Credentials it will ask for** (names only — Forge never holds a value):
- `OVERLEAF_GIT_TOKEN` — Overleaf Git Token (required)
- `OVERLEAF_SESSION_COOKIE` — Overleaf Session Cookie (optional)
Placeholders only. Forge never holds, brokers, or transmits a credential value — replace each <YOUR_NAME> in your own config file. Do not send a value back to Forge; no Forge endpoint accepts one.
- This entry needs 2 credentials (1 required). The generated config carries placeholders, so it will fail in the editor rather than at runtime if they are left unset.

## Blast radius

Extensive blast radius — mutates data; holds an api key.
- Floor 49, ceiling 49 (tier: extensive)
- This is impact, not likelihood. A high radius is not a defect: a filesystem server is supposed to write files. It is never part of the trust score.

## Machine-readable views of this entry

- Signed JSON: https://forgeregistry.com/api/v1/packages/mcp-server-overleaf
- Install plan: https://forgeregistry.com/api/v1/packages/mcp-server-overleaf/install-plan
- Alternatives: https://forgeregistry.com/api/v1/alternatives/mcp-server-overleaf
- HTML page: https://forgeregistry.com/registry/mcp-server-overleaf
- MCP: POST https://forgeregistry.com/api/mcp → `forge_get_package` / `forge_install_plan`

## About this document

Generated by Forge (https://forgeregistry.com) — a compact rendering of the same record served, signed, at the JSON URL above. Trust and scan facts are the registry's own measurements; anything Forge did not measure is named as unmeasured rather than omitted.
