Overleaf MCP server
Read and edit Overleaf papers from any AI client. Edits can arrive as tracked-change suggestions.
0 stars159 downloads/wk
Reviews
Write oneNobody has reviewed Overleaf yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Overleaf tools (19, 1 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
add_commentAttach a review-panel comment thread to an exact snippet of text. The thread is anchored immediately;
compile_projectCompile the project locally with latexmk and report errors and warnings. Build artifacts are written outside the clone, so they are never pushed to Overleaf.
discard_local_changesThrow away every local edit that has not been pushed, returning the clone to the last version seen on Overleaf.
edit_sectionReplace the whole body of one section of a .tex file, located by its title. Include the sectioning command itself in newContent.
list_filesPull from Overleaf and list tracked files grouped by kind, including files hidden by sparse checkout. Optionally filter by extension and include unpublished new files.
list_projectsList the Overleaf projects this server is configured to reach, and which one is the default.
list_sectionsList the sectioning commands in a .tex file with their line ranges, so a section can be addressed by title instead of by line number.
list_tracked_changesRead the tracked changes and review-panel comment threads on a document, as Overleaf's review panel shows them.
project_statusReport whether the local clone is in step with Overleaf: commits pulled, edits pending, and the recent history.
project_summaryPull from Overleaf and return a JSON overview: file counts, likely main document and its section count, first ten files, pending diff statistics, and new unpublished files.
push_changesCommit the pending local edits and push them to Overleaf. Before pushing, the server re-checks Overleaf and rebases onto anything collaborators pushed in the meantime; if that cannot be done cleanly the push is refused and the conflict is reported.
read_filePull from Overleaf and read text, optionally by line range. Without mode, returns plain text. mode=full returns JSON content and revision; mode=smart with previousRevision returns unchanged, a line replacement delta, or full content when the baseline is unavailable. Deltas use 1-based startLine: split the baseline on newline, splice deleteLineCount lines with change.lines, then join on newline. Ne
read_sectionRead the body of a single section of a .tex file, located by its title.
replace_textReplace an exact snippet of text in a project file. The snippet must appear exactly once unless replaceAll is set.
search_projectSearch all tracked text files for a string or regular expression, returning matching lines.
show_diffShow the diff of everything edited locally but not yet pushed to Overleaf. Call this before push_changes.
suggest_editReplace an exact snippet of text so that it arrives in Overleaf as a tracked change, which a co-author can accept or reject,
sync_projectPull the latest commits from Overleaf into the local clone without changing anything.
write_filewrite actionOverwrite 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.
Public scan report
scanner v0.1.5 · 2026-09-19 · same rubric, same numbers if you re-run it
- Code scan69 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitystatic API keys via environment variables6/15
- Maintenancelast push 0 days ago15/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Install directly
Runs npx -y mcp-server-overleaf on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add mcp-server-overleaf -- npx -y mcp-server-overleaf
Overleaf: common questions
- Is Overleaf MCP server safe?
- Mostly: it is graded B (83/100). Read the Overleaf safety report
- How do I install Overleaf?
- It runs on your machine. Copy the Claude Code, Claude Desktop or Cursor config from the install section.
- Does Overleaf need an API key?
- Yes. The registry entry asks for
OVERLEAF_GIT_TOKEN,OVERLEAF_SESSION_COOKIE. - Is Overleaf maintained?
- The last commit was in the last day (2026-09-19). The latest release is v0.3.4.