Skip to content
Agentmart
Submit a tool

Overleaf

Overleaf MCP server for Claude, Codex, ChatGPT, and Cursor with safe LaTeX editing and review.

Connector by yangzichao · GitHub account verified by the MCP Registry

IndexedMITLocal (stdio)
Write a review

Install

Works with Claude Code, Codex, VS Code, Claude Desktop, Cursor, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install connector/yangzichao-mcp-server-overleaf

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Overleaf MCP server for Claude, Codex, ChatGPT, and Cursor with safe LaTeX editing and review.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this server can do and what it asks for, from its tool list and install config. Checked Oct 25, 2026.

Tools
11 read · 3 write · 7 delete
Secrets
2 (API keys, tokens or passwords)
Install scripts
Not scanned yet
Runs as
Node.js package

Tools by what they do 21

Read from the source code; the running server may list different tools.

Read 11 · Look things up without changing anything.

  • compile_project
  • list_files
  • list_projects
  • list_sections
  • list_tracked_changes
  • project_status
  • project_summary
  • read_file
  • read_section
  • search_project
  • show_diff

Write 3 · Create, change, send or run things.

  • add_comment
  • suggest_edit
  • sync_project

Delete 7 · Delete, drop, revoke or wipe things.

  • delete_file
  • discard_local_changes
  • edit_section
  • move_file
  • push_changes
  • replace_text
  • write_file

Secrets and settings it asks for

Secrets: values you paste in that let it act as you.

  • OVERLEAF_GIT_TOKEN
  • OVERLEAF_SESSION_COOKIE

Other settings (environment variables or headers).

  • OVERLEAF_PROJECT_ID

Network hosts it talks to 1

  • github.com · found in install command

Files it touches

  • Any path the agent passes to its tools

Tools (21)

Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].

  • add_commentComment on a passage

    Anchor a review-panel comment thread to an exact snippet of text, for raising a question without changing the prose. Takes effect in Overleaf immediately; there is no separate push. The thread arrives empty: this connection cannot carry the comment text, so the first message has to be typed in Overleaf. Say so when reporting the result, and put the point you wanted to make in your own reply rather than assuming it reached the co-author.

  • compile_projectCompile the projectread-only

    Compile one project locally with latexmk -pdf and report the errors and warnings, so a broken paper is caught before collaborators see it. Call it after editing and before push_changes. It compiles the clone as it stands, local edits included, without pulling, and halts at the first error. Without mainTexFile it tries main.tex, paper.tex, manuscript.tex, root.tex, thesis.tex and article.tex at the root, then the shallowest .tex file, and stops with a message if that file has no \begin{document}. Build artifacts go to a directory outside the clone, so they are never pushed, and only the log com…

  • delete_fileDelete a project filecan change or delete data

    Delete a file from the project. The file is removed from the local clone only: it stays in Overleaf, and co-authors keep seeing it, until push_changes publishes the removal. Until then discard_local_changes brings it back, and show_diff shows the pending deletion. Deleting a file a co-author still cites or includes will break their compile, so confirm it is unused first with search_project on its path or label. To replace a file's contents instead, use write_file. path is relative to the project root, as list_files prints it; a directory is refused, and a file sparse checkout keeps off disk is…

  • discard_local_changesDiscard local editscan change or delete data

    Permanently throw away every local edit, new file and unpushed commit in one project's clone, fetching Overleaf first so the clone ends up matching its current version. The discarded work cannot be recovered from this server. Call show_diff first, and only call this once the user has said the work should be abandoned. Its main use is after push_changes refuses a conflicting change: the clone cannot be pushed again until the conflicting local commits are either published or discarded here. Only the chosen project is reset; pending work in other projects is untouched. Returns how many edited fil…

  • edit_sectionRewrite one LaTeX sectioncan change or delete data

    Replace one whole section of a .tex file, located by its title. Use replace_text for a smaller change and this to rewrite a section wholesale. The section runs from its heading to the next heading of the same or a shallower level, never swallowing trailing matter such as \end{document} or the bibliography. newContent replaces that range line for line, so it must start with the \section{...} command itself or the heading is lost, and should end with a newline to keep the blank line before the next heading. sectionTitle is compared case-insensitively with the title in braces: an exact match wins…

  • list_filesList project filesread-only

    List every file in the project, grouped by kind (LaTeX sources, bibliographies, figures, other), after pulling the latest commits from Overleaf. Use it to find exact paths before reading or editing; use project_summary when counts are enough, and search_project to find which file mentions something. Files sparse checkout keeps off disk are listed too, since they are still part of the project. extension keeps only paths ending in that suffix, case-insensitively, and filters untracked files as well; includeUntracked adds files created locally that push_changes has not committed yet, marked (untr…

  • list_projectsList Overleaf projectsread-only

    List the Overleaf projects this server is configured to reach, marking which one is the default. Reads local configuration only, so it answers without contacting Overleaf and proves nothing about access. Call this when a request is ambiguous about which paper it means, or when another tool reports an unknown project. Returns one line per registered name, marked (default) where it applies and followed by its display name when one is configured. Any project not listed can still be reached by passing its Overleaf address as `project`.

  • list_sectionsList LaTeX sectionsread-only

    List the sectioning commands in one .tex file, \part down to \subparagraph including starred forms, with their nesting depth and line ranges. Call it before read_section or edit_section to get the exact titles they match, and to address part of a paper by title instead of line numbers that shift with every edit. path names a single file: \input and \include are not followed, so list each included file separately, and commented-out headings are skipped. Pulls from Overleaf first. Returns one line per heading, indented by depth, as \section{Title} [lines start-end], or says the file has none; a …

  • list_tracked_changesList tracked changes and commentsread-only

    Read the tracked changes and review-panel comment anchors on a document, as Overleaf's review panel shows them. This reads the live editor rather than the Git bridge, so it sees suggestions nobody has accepted yet, which no other tool here can. Call it to find out what is already pending review before suggesting more. Comment threads come back as their anchored text only; the messages inside them are not readable through this connection.

  • move_fileMove or rename a project filecan change or delete data

    Move or rename a file inside one project, creating any missing parent directories. The move happens in the local clone only; nothing changes in Overleaf until push_changes. LaTeX references are not rewritten: an \input, \include or \includegraphics naming the old path will break, so search_project for it afterwards and fix the references with replace_text before pushing. Both paths are relative to the same project's root; to move a text file between projects, read_file it from one and write_file it into the other. Pulls from Overleaf first. If fromPath is not a file in the project or a file al…

  • project_statusProject statusread-only

    Report where one project's local clone stands against Overleaf: branch and head commit, commits just pulled, commits still unmerged, local commits waiting to be pushed, files edited but not committed, and the last ten commits. Call it to learn whether there is anything to push or anything new from a collaborator; use show_diff to read the pending edits themselves. It pulls as part of answering, and that pull only updates the local clone: nothing changes on Overleaf and no local edit is dropped. A conflicting pull does not fail the call; the reply adds a WARNING with the conflict and the clone …

  • project_summaryProject summaryread-only

    Summarize one project in a single structured result (file counts by kind, the likely main document and its section count, pending local work) to orient at the start of a task. Use list_files for every path, list_sections for a document's outline, and project_status for commit-level sync state. mainFile is a guess: main.tex, paper.tex, manuscript.tex, root.tex, thesis.tex or article.tex at the root, otherwise the shallowest .tex file, so check it for \begin{document} before relying on it. Pulls from Overleaf first; if that pull conflicts with unpushed local work, it fails and keeps the work. pr…

  • push_changesPush changes to Overleafcan change or delete data

    Publish every pending local edit to Overleaf as one commit. This is the only tool that changes the project collaborators see, and the change is immediate and public. Call show_diff first, and compile_project when the edit could break the build. Before pushing, the server re-checks Overleaf and rebases onto whatever collaborators pushed in the meantime. If two edits touch the same lines the push is refused, both versions are reported, and no local work is lost: nothing is overwritten and no winner is chosen. commitMessage labels the one commit made from the pending edits; commits already waitin…

  • read_fileRead a project fileread-only

    Read one text file from the project after pulling the latest commits from Overleaf. Plain calls return the text, line-numbered when startLine or endLine is given; startLine alone reads to the end, and endLine is clamped to the file. mode=full returns JSON with the content and a revision hash for a guarded edit; mode=smart with previousRevision returns kind unchanged, a delta, or full content when this server process does not know that revision or a delta would be no smaller. Use a line range to sample a large file, mode=full before an edit that passes expectedRevision, and mode=smart to re-rea…

  • read_sectionRead one LaTeX sectionread-only

    Read one section of a .tex file by its title: from its heading to the next heading at the same or a shallower level, stopping before trailing matter such as \appendix, the bibliography or \end{document}. Prefer it over read_file when revising one part of a paper, so the rest stays out of context. sectionTitle is compared case-insensitively with the title in braces, not an optional [short] title: an exact match wins, otherwise the first heading in document order that contains it, so a short fragment can pick an earlier section than intended. Pulls from Overleaf first. Returns the section's LaTe…

Show 6 more tools
  • replace_textReplace exact text in a filecan change or delete data

    Replace an exact snippet of text in a project file. Prefer it over write_file and edit_section for a targeted change: nothing outside the snippet is touched. findText must match exactly, whitespace and newlines included, and occur once unless replaceAll is set; replaceWith is inserted literally, so $$, $& and $1 stay as written. If the snippet is missing, or occurs several times without replaceAll, nothing changes and the reply gives the count; widen findText with surrounding text to make it unique. Pulls from Overleaf first, then edits only the local clone; push_changes publishes it. Returns …

  • search_projectSearch the projectread-only

    Search the project's text sources for a literal string or a regular expression, returning matching lines as path:line: text. Use it to find where a term, citation key, label or command appears when you do not know which file holds it; once you do, use read_file or read_section, and use list_files to find a file by name. Only .tex, .ltx, .bib, .cls, .sty, .bst, .txt and .md files are searched, and a file created locally is not searched until push_changes commits it. Both modes are case-insensitive and match one line at a time, so a pattern cannot span lines. A regular expression uses JavaScript…

  • show_diffShow pending changesread-only

    Show a unified diff of everything in one project's clone that Overleaf does not have yet: uncommitted edits, new and deleted files, and commits left behind by a refused push. Call it before push_changes to see exactly what collaborators will receive, and after a refused push to inspect what is still pending; use project_status when counts are enough. It does not pull first, so the comparison is against Overleaf as last fetched; it contacts Overleaf only to clone a project not opened before. Covers only the chosen project. The diff is cut off after 60,000 characters, and "No local changes pendi…

  • suggest_editSuggest an edit as a tracked change

    Replace an exact snippet of text so that it arrives in Overleaf as a tracked change a co-author can accept or reject, rather than as finished text. Unlike every other editing tool here, this reaches Overleaf immediately and there is no separate push, because it goes through the editor rather than the Git bridge. Use it when proposing a change to someone else's paper; use replace_text when the edit should simply be made. The snippet must match exactly and appear exactly once in the document. This server cannot accept or reject a suggestion afterwards — that is done in Overleaf.

  • sync_projectPull from Overleaf

    Pull the latest commits from Overleaf into one project's local clone. Nothing is sent to Overleaf and no local edit is discarded. The read tools pull on their own, so this is rarely needed first; call it to check explicitly that the clone is current, or after a collaborator says they have pushed. Use project_status for the full picture. If the pull cannot complete cleanly it fails and leaves local work untouched, rather than resolving the conflict on its own. Only the chosen project is pulled; a project not opened before is cloned instead, and reports nothing pulled. Returns how many commits w…

  • write_fileWrite a whole filecan change or delete data

    Write a whole file: create it, with any missing parent directories, or overwrite it entirely. Use it to add a new file; for an existing one prefer replace_text or edit_section, which cannot drop text you did not mean to rewrite. content is written exactly as given, as UTF-8, with no trailing newline added. expectedRevision makes the call a guarded overwrite, refused if the file changed since that read or no longer exists, so leave it out when creating a file. path must be relative and stay inside the project; absolute paths, .. escapes and the .git directory are refused. Pulls from Overleaf fi…

Signals

Stars
0
Forks
0
Open issues
0
Last commit
Oct 15, 2026 (13 days ago)
Last release
Oct 15, 2026 (13 days ago)

From GitHub (fetched Oct 24, 2026).

Details

Registry name
io.github.yangzichao/mcp-server-overleaf
Version
0.3.9
Auth
API key
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026
Cite this page

Overleaf MCP server. Agent Mart. https://agentmart.dev/connectors/yangzichao-mcp-server-overleaf (last updated 2026-10-24)