Skip to main content
Glama

Overleaf Web MCP is a Model Context Protocol server, the overleaf-web-mcp command line, and a TypeScript library, createOverleafClient from overleaf-web-mcp/core, all over one engine with the same safety checks. It signs in to Overleaf once through a browser window you control, then lets an AI assistant, a script, or your own program work on your projects the way you would in the web editor: browse files, make revision-checked edits, optionally as tracked changes, compile, and handle review comments and tracked changes. It uses the same browser-facing endpoints the Overleaf editor uses, so no Git integration or premium plan is needed for the core workflow.

What you can say

Once connected, talk to your assistant in plain language. It picks the tools.

  • "Create a new project called Grant renewal from the folder I zipped, and make proposal.tex the root."

  • "List my Overleaf projects and open the one called Thesis."

  • "Rewrite the introduction of main.tex for a general audience, as a tracked change."

  • "Compile the paper and tell me whether it built cleanly, and where any errors are."

  • "Which figures in ./figures differ from what's in the project? Upload only those."

  • "Make the project match ~/papers/thesis, and show me what would be deleted first."

  • "Summarize the open review comments and reply to the one about Table 2."

  • "Go through the tracked changes in main.tex with me, and accept the ones I approve."

Related MCP server: Overleaf MCP

Get started

You need Node.js 20 or newer, a Chrome-family browser (Chrome, Chromium, Brave, or Edge), and an Overleaf account.

NOTE

The server uses Overleaf's private web APIs, which can change without notice, and automatingwww.overleaf.com may carry Terms-of-Service and account risk. Try it on a disposable project first and keep request volume low.

1. Sign in once. A dedicated browser window opens. Complete the normal Overleaf login, including SSO or two-factor. Only cookies for the Overleaf origin are saved, to a file only your user can read. The session lasts five days from its last use, so sign in again after five idle days, or schedule npx overleaf-web-mcp keepalive daily to keep it alive (see configuration).

npx overleaf-web-mcp login

2. Connect your MCP client. For Claude Code:

claude mcp add overleaf --scope user -- npx -y overleaf-web-mcp serve

For Codex:

codex mcp add overleaf -- npx -y overleaf-web-mcp serve

Add this to the client's MCP configuration:

{
  "mcpServers": {
    "overleaf": {
      "command": "npx",
      "args": ["-y", "overleaf-web-mcp", "serve"]
    }
  }
}

Claude Desktop can instead install the extension file attached to each release, which runs on its own Node.js; see Claude Desktop in the guide. VS Code uses a servers key and "type": "stdio" instead; the installation guide has the exact block for each client.

3. Restart the client and ask it to check your Overleaf connection.

Client-by-client steps, self-hosted Overleaf, and troubleshooting, including the "failed to connect" you get when node is older than 20, are in the installation guide.

Without an MCP client

Every tool is also a command, for scripts, CI jobs, and agents that work in a shell. After npx overleaf-web-mcp login:

npx overleaf-web-mcp projects list --query thesis
npx overleaf-web-mcp files read <projectId> main.tex
npx overleaf-web-mcp call get_sections --request request.json

Each command prints one JSON value on stdout, or one JSON error line on stderr, and its exit code says what is safe to do next: 0 complete, 1 failed, 2 fix the call, 3 not allowed, 4 read or plan again, 5 outcome unknown (never re-run it blindly), 6 partial, 7 retry later. Document text goes through a file or stdin, never the command line. The command line guide has every command and exit code. Three Agent Skills in skills/ use it to revise a manuscript, handle reviewer comments, and sync figures and sources.

From TypeScript, overleaf-web-mcp/core has one typed method per tool (TypeScript SDK):

import { createOverleafClient } from 'overleaf-web-mcp/core'

const client = await createOverleafClient()
try {
  const file = await client.readFile({ projectId, filePath: 'main.tex' })
} finally {
  await client.close()
}

What it can do

  • Start and manage projects. Create a blank or example project, clone one, or import a zip; rename, trash, restore, or archive projects with the name confirmed first; set the root document, TeX engine, and TeX Live image so the web editor's Recompile follows; and organize projects with your dashboard tags.

  • Browse and organize. List and search projects, find text across a project's documents, read the file tree with the configured root document and compiler, create folders and files, rename, move, upload one file or a list of them, download a file or the whole project as a zip, and delete with confirmation.

  • Sync a folder. Compare a local folder with the project without changing anything, then upload only what changed, and optionally delete what you removed locally, in one confirmed call. Changed text files go through the same revision-checked edits as a single write, so a collaborator's concurrent edit is never overwritten.

  • Write safely. Replace a whole document or a single section, or change only the passages you name. Every edit is checked against the revision you read first, so a collaborator's concurrent change is reported instead of overwritten. Edits can be recorded as Overleaf tracked changes.

  • Work by section. Parse \section headings in a file, read one section, replace one section. For a manuscript split across files, read it as one flattened document with a map back to each file, and list, read, and replace sections across \input, \include, \subfile, and \import, each write going to the one file that holds the section.

  • Compile. Build the project's configured root document, or any document you name, and get the errors and warnings from its log by file and line, with a clear yes or no on whether it built cleanly. Read the full log, save the PDF or any other output locally, or stop a running compile.

  • Review. List comment threads with their locations, reply, add a comment anchored to exact text, and resolve or reopen threads. List tracked changes with their authors and locations, and accept or reject them once you have confirmed which. Accepting or rejecting them needs a project whose owner's Overleaf plan includes track changes, and on self-hosted Overleaf an edition that includes it; otherwise the decision is refused with nothing changed.

  • Follow history. Poll recent project history with a version cursor to see who changed what.

Tools

37 tools in eight groups: account, project lifecycle, files, folder sync, sections, compilation, review, and history. Read-only tools change nothing on Overleaf and write nothing on your computer. Destructive tools can replace or remove existing content, and all but stop_compile need a value repeated back first: the path, name, or count of what they delete, the revision of the document they replace, the planToken of a folder sync, or overwrite for a file that exists.

An upload that would replace a file, and a folder sync without a planToken, are refused unless that replacement or unplanned sync is asked for by name. The last column shows which tools read or write files on the computer the server runs on. Every parameter and result is in the tool reference; each tool but sign_in is also overleaf-web-mcp call <name> and a method of createOverleafClient.

Group

Tool

What it does

Annotation

Local effect

Account

auth_status

Verify the saved session and report when it expires

read-only

Account

sign_in

Open a browser window for the user to sign in, and save the session; MCP only, login on the command line

writes the session

Account

list_projects

List and search projects, newest first, with their tags on request

read-only

Project lifecycle

create_project

Create a blank or example project

Project lifecycle

clone_project

Copy a project, files and settings included

Project lifecycle

import_project_zip

Create a project from a local .zip archive

reads

Project lifecycle

manage_project

Rename, trash, restore, archive, unarchive, or delete a project

destructive

Project lifecycle

update_project_settings

Set the root document, TeX engine, TeX Live image, or spell-check language

Project lifecycle

manage_tags

Create, rename, recolour, or delete your dashboard tags, and add projects to them or remove them

destructive

Files

get_project_tree

Read the file tree with the project's compile settings

read-only

Files

read_file

Read a text document and its revision

read-only

Files

search_project

Find a literal string in the project's documents, with line, column, and a preview

read-only

Files

write_file

Replace a document, or change named passages, with a revision-checked edit of only the changed words

destructive

reads

Files

create_file

Create a text document, optionally with content

Files

manage_entity

Create a folder, or rename, move, or delete an entity

destructive

Files

upload_file

Upload a local file, replacing what is at that path when confirmed

destructive

reads

Files

batch_upload

Upload a list of local files to the paths given, creating missing folders

destructive

reads

Files

download_file

Save a document or binary file locally

destructive

writes

Files

download_project_zip

Save the whole project locally as one zip archive

destructive

writes

Folder sync

plan_sync

Compare a local folder with the project and show what a sync would do

read-only

reads

Folder sync

sync_directory

Upload what changed, and in mirror mode delete what is gone locally

destructive

reads

Folder sync

delete_entities

Delete several files or folders in one confirmed call

destructive

Sections

get_full_document

Read a document with its \input and \include files flattened in, with a map back to each file

read-only

Sections

get_sections

Parse the section headings of one file, or of a document across its included files

read-only

Sections

get_section_content

Read one section's body

read-only

Sections

write_section

Replace one section's body, revision-checked

destructive

Compilation

compile_project

Compile the project and report its errors and warnings from the log

Compilation

stop_compile

Stop the active compile

destructive

Compilation

get_compile_log

Read the end of a build's LaTeX or BibTeX log

read-only

Compilation

download_compile_output

Save the compiled PDF, or another output file, locally

destructive

writes

Review

list_comments

List review threads with their locations

read-only

Review

reply_to_comment

Reply in an existing thread

Review

add_comment

Add a comment anchored to exact text

Review

set_comment_status

Resolve or reopen a thread

destructive

Review

list_tracked_changes

List tracked changes with their locations and authors

read-only

Review

manage_tracked_changes

Accept or reject tracked changes in one document

destructive

History

monitor_project_history

Poll recent project history with a cursor

read-only

How it keeps your project safe

  • Text edits require the revision from a prior read and fail with a conflict if the document changed underneath.

  • Tracked changes are opt-in and never silently downgraded to plain edits. Accepting or rejecting them needs the revision they were listed with and their number confirmed, and is verified afterwards.

  • Deleting a file requires its path to be confirmed, deleting several requires their count, and trashing or deleting a project requires its name. Projects go to the trash first; permanent deletion only works from there. Downloads, including a whole-project zip, never overwrite a local file unless asked, and never write over the saved session.

  • A write that times out is observed, never resubmitted, so nothing is applied twice. The same holds for each file in a batch upload.

  • A folder sync needs the planToken from plan_sync, and stops before changing anything if the project or the folder changed since the plan. It deletes only in mirror mode, only with the delete count confirmed, and never after a failed upload.

  • An upload never replaces a file unless asked: a binary needs overwrite, and a text document, which an upload replaces with no revision check, needs uncheckedDocumentReplace.

  • Optionally, you can limit which projects, which folders on your computer, and which kinds of change the server may touch (access policy). It keeps an assistant inside what you gave it; it is not a sandbox.

  • Your session cookie stays on your machine in a file only you can read, and is never returned by any tool, command, or SDK method.

  • While a project is open, up to 90 seconds after the last call, you may appear online to collaborators. Each command is its own session, so for many files use one sync or batch command rather than a command per file.

Security model

Your session stays in a file only your user can read and is sent nowhere but OVERLEAF_BASE_URL; nothing the server, command line, or library prints carries cookies, document text, or Overleaf's own responses; and only reads are ever retried. The safety model has the full contract, including what the access policy does not protect against.

Terms of Service

This is an unofficial client, not affiliated with Overleaf. It drives the same browser-facing endpoints the web editor uses, signed in as you, and that kind of automation of www.overleaf.com may be against Overleaf's Terms of Service and put your account at risk. You are responsible for how you use it. Keep request volume to what you would produce by hand, try it on a disposable project first, and prefer a self-hosted Overleaf for anything automated or heavy.

When Overleaf changes

Overleaf can change its private endpoints at any time; a response this release cannot read fails with PROTOCOL_UNSUPPORTED, and nothing is guessed or written on it. Run npx overleaf-web-mcp doctor <projectId> to see which step fails, and paste its output, which names no project, file, or person, into an issue.

Versioning

From 1.0.0 the tools, the command line, the stable overleaf-web-mcp/core surface, and the capabilities report follow Semantic Versioning: a breaking change waits for a major version, and a deprecation is announced a minor version ahead. The changelog records every change.

How it compares

Against the three most-starred Overleaf MCP servers and the two closest in design, each checked against its own source code on 2026-11-09. ✅ supported, 🟡 partly, ❌ not supported; the full comparison has every capability checked and what each 🟡 means.

This project

OverleafMCP

olcli

overleaf-mcp-server

overleaf-mcp-rt

netique/overleaf-mcp

Connects through

Web session

Git bridge

Web session

Git bridge

Web session

Web session

Tools

37

8

21

5

22

17

Works without an MCP client (command line or library)

✅

❌

✅

❌

❌

❌

Works without Overleaf's paid Git integration

✅

❌

✅

❌

✅

✅

Self-hosted Overleaf

✅

❌

✅

❌

✅

🟡

Sends edits as collaborative OT operations, not whole files

✅

❌

❌

❌

✅

✅

Refuses an edit if the document changed since it was read

✅

🟡

❌

🟡

✅

🟡

Writes as tracked changes when asked

✅

❌

❌

❌

❌

✅

Accepts or rejects tracked changes

✅

❌

🟡

❌

❌

✅

License

MIT

MIT

MIT

MIT

AGPL-3.0

AGPL-3.0

Documentation

Page

What it covers

Install

Claude Code, Codex, Claude Desktop, Cursor, Antigravity, VS Code, the command line alone, self-hosted Overleaf, troubleshooting

Using it

Example prompts and what happens underneath

Tool reference

All 37 tools with parameters and results

Command line

Every command, request formats, output, exit codes, and the Agent Skills

TypeScript SDK

createOverleafClient, results and errors, and the stable surface

Safety model

Revisions, tracked changes, confirmations, error codes

Configuration

Environment variables, the access policy, proxies, where the session is stored, and keeping it alive

Internals

Protocol notes, reliability guarantees, related projects

Contributing

Reporting bugs and feedback, setting up, and opening a pull request

Changelog

What changed in each release

For AI agents

The server sends usage instructions to the MCP client when it connects, and every tool description is self-contained, so an assistant does not need this README to use it correctly. An agent working in a shell can use the command line instead, with overleaf-web-mcp --help and the three Agent Skills in skills/, which call only public commands. MCP clients are offered the same three workflows as prompts. Coding agents contributing to the repository should read AGENTS.md.

Contributing

Bug reports, feedback, and pull requests are welcome. CONTRIBUTING.md explains how to report a problem without exposing your session or your manuscripts, and how to propose a change.

License

MIT. An independent project, not affiliated with or endorsed by Overleaf.

Available Tools

37 tools
add_commentB

Add and verify an anchored review comment using UTF-16 positions and expectedText. Returns threadId, the created thread (id, status, messages with author { id, displayName }, content, and ISO timestamp) when it could be read back, the resulting document revision and protocol, trackChangesActive, writeMode, and recoveredAfterTimeout when an attachment that timed out, lost its socket, or could not be read back was confirmed by observation.

Inputs: end (required), start (required), content (required), filePath (required), +3 more. Returns: thread, protocol, revision, threadId, +3 more

auth_statusA
Read-only

Verify the saved Overleaf web session without exposing cookies. sessionExpiresAt is when the session lapses unless a request refreshes it first; Overleaf sessions last five days from their last use, and the CLI command overleaf-web-mcp keepalive can be scheduled to refresh them.

Inputs: no named parameters. Returns: userId, baseUrl, warning, projectCount, +4 more

batch_uploadA
Destructive

Upload a list of local files to explicit project paths in one call, instead of one upload_file call per file. Each destinationPath is the full project path including the file name; missing folders are created. onConflict decides what happens when a document or file is already at a destination path: "fail", the default, refuses the whole call with CONFIRMATION_MISMATCH listing those paths, before anything is uploaded; "skip" leaves them untouched and lists them in skipped; "overwrite" replaces a binary file. Replacing a text document has no revision check, so with "overwrite" each one also needs uncheckedDocumentReplace: true, else that file fails with INVALID_ARGUMENT; use write_file or sync_directory for documents a collaborator may be editing. A folder at a destination path, or a file where a folder is needed, fails that file in any mode. Every path is checked before anything is sent: a duplicate destination or a missing local file fails the call with nothing uploaded. Failures are per file and nothing is retried: the call continues past a failure unless stopOnError, and stops at RATE_LIMITED (Overleaf allows about 500 uploads per project in 15 minutes). It returns status, completed (with replaced per upload), skipped, failed, remaining, and verified, which is true when the tree read back afterwards confirmed every completed entry. A timed-out upload is classified from that read-back, never resubmitted: recoveredAfterTimeout when the path holds the local bytes, OUTCOME_UNKNOWN when the tree cannot tell. It saves tool calls, not time. Confirm overwrites with the user first.

Inputs: files (required), projectId (required), onConflict, stopOnError, +1 more. Returns: failed, status, skipped, verified, +3 more

clone_projectA

Copy an existing project, its files, root document, and compiler included, into a new project with the given name. Overleaf gives the copy the account's default TeX Live image and spell-check language; set them with update_project_settings when they matter. Use it to start from a lab or journal template project.

Inputs: name (required), sourceProjectId (required). Returns: url, name, projectId

compile_projectA

Compile a project and report on the build from its logs. Omit rootFilePath to build the root document configured in Overleaf, which is what the web UI's Recompile button uses; pass it to build a different document for this call only. Check summary.builtCleanly, not status: Overleaf reports status "success" whenever a PDF came out, even when LaTeX hit errors along the way. builtCleanly is true only when a PDF was produced, output.log was read, and it reports no error. summary lists the first 20 errors and warnings as { file?, line?, message } (errorCount and warningCount count all of them), undefined references and citations, missing files, pageCount, and pdfSizeBytes; messages never quote the document. A LaTeX error that stopped the build returns status "failure" with the same summary rather than an error. outputFiles is Overleaf's listing, less an output.blg and output.bbl left over from an earlier build when BibTeX did not run for this one. buildRef names this build to get_compile_log and download_compile_output, also in a later process. stopOnFirstError gives a short log holding the one error that matters; draft skips images for faster text-only builds. Compiles spend the account's compile allowance, so read the summary instead of recompiling. Errors: COMPILE_RATE_LIMITED (Overleaf ran nothing; wait details.retryAfterMs when given, then compile once more), COMPILE_UNAVAILABLE (try later), COMPILE_TIMEOUT (the build hit the time limit; details.buildRef, when present, reaches its partial log), COMPILE_FAILED (no build to report on), and TIMEOUT (the request timed out while Overleaf may still be compiling; it is not retried).

Inputs: projectId (required), draft, timeoutMs, rootFilePath, +1 more. Returns: stats, status, buildId, summary, +4 more

create_fileA

Create a text document and optionally record non-empty initial content as tracked changes. The content is written as by write_file once the empty document exists, so on a ShareJS (legacy editor) document, content that adds an emoji or other character outside the Basic Multilingual Plane is refused with INVALID_ARGUMENT; a timeout, a lost socket, or an Overleaf error after sending is observed, never resent; content the account may not write, such as untracked content from a review-only collaborator, is PERMISSION_DENIED before it is sent; and tracked content Overleaf applied without recording it as tracked changes by this account is PROTOCOL_UNSUPPORTED with details.kind applied_untracked, live and not reverted. If reading back or writing the content fails after the document was created, the error keeps its code and adds details.created: true; the document then exists, possibly empty, so do not create it again: read it with read_file and write the content with write_file.

Inputs: filePath (required), projectId (required), content, writeMode. Returns: protocol, revision, writeMode, trackChangesActive, +1 more

create_projectA

Create a new Overleaf project and return its projectId, url, and rootDocPath. A "blank" project still contains Overleaf's stub main.tex as its root document; after importing your own manuscript, point the project at it with update_project_settings or delete the stub with manage_entity. "example" seeds Overleaf's example paper.

Inputs: name (required), template. Returns: url, name, projectId, rootDocPath

delete_entitiesA
Destructive

Delete several documents, files, or folders in one call. confirmCount must equal the number of paths, else CONFIRMATION_MISMATCH. Every path is resolved before anything is deleted, so a missing one fails the call with NOT_FOUND and changes nothing. Deleting a folder removes everything inside it, so list the folder alone, not its contents too. Continues past a failed delete unless stopOnError, and returns status, completed, failed, and remaining. Confirm the list with the user first.

Inputs: paths (required), projectId (required), confirmCount (required), stopOnError. Returns: failed, status, completed, remaining

download_compile_outputA
Destructive

Save a build's compiled PDF, or another output file such as output.log, output.blg, or output.synctex.gz, to a local path on the server's own disk, in one call. file defaults to output.pdf and must be a relative output path without "..". Without buildRef it uses the latest build compile_project made in this server process, else NO_BUILD; a file the build did not produce, an output.blg or output.bbl left over from an earlier build included, is NOT_FOUND, and an expired build is BUILD_NOT_FOUND. The folder must exist. An existing file is replaced only when overwrite is true, else CONFIRMATION_MISMATCH and nothing is downloaded; a replacement is atomic. A .pdf that does not start with %PDF- is PROTOCOL_UNSUPPORTED and nothing is written. Returns the absolute localPath, file, sizeBytes, buildId, and replaced.

Inputs: localPath (required), projectId (required), file, buildRef, +1 more. Returns: file, buildId, replaced, localPath, +1 more

download_fileA
Destructive

Download one Overleaf document or binary file to an explicit local path. Refuses to replace an existing local file unless overwrite is set. The local path is checked before anything is fetched: an existing file without overwrite, or a folder (or a link to one) at localPath, is INVALID_ARGUMENT, a missing parent folder is NOT_FOUND, and a folder that cannot be written is INVALID_ARGUMENT with details.errno. With overwrite, an existing file is replaced atomically, keeping its permissions, so its folder must be writable.

Inputs: filePath (required), localPath (required), projectId (required), overwrite. Returns: bytes, localPath

download_project_zipA
Destructive

Download the whole project, sources and binaries, as one zip archive (Overleaf's "Download as zip") to a local path on the server's own disk. The folder must exist. An existing file is replaced only when overwrite is true, else CONFIRMATION_MISMATCH and nothing is downloaded; a replacement is atomic, so a failed or incomplete download leaves the old file intact. Offer it as a backup before a mirror sync_directory or an overwriting batch_upload. Overleaf allows about 10 downloads per project a minute, so on RATE_LIMITED wait a minute. PERMISSION_DENIED here can also mean the session expired; check auth_status. Returns the absolute localPath, bytes, and replaced.

Inputs: localPath (required), projectId (required), overwrite, timeoutMs. Returns: bytes, replaced, localPath, projectId

get_compile_logA
Read-only

Read a build's LaTeX log (output.log) or BibTeX log (kind "bibtex", the .blg file), without compiling again. kind "bibtex" is NOT_FOUND when BibTeX did not run for the build, even if Overleaf still lists an output.blg left over from an earlier build. Without buildRef it reads the latest build compile_project made in this server process, else NO_BUILD; Overleaf keeps build output only for a while, and an expired build is BUILD_NOT_FOUND. At most 1 MB of the log is read, from its start, and the last tail lines are returned (default 200, at most 2000, and at most 100000 characters). format "errors-only" returns only the lines that start an error. errorLines lists the first 100 error lines with their 1-based line numbers, each cut to 240 characters. truncated says whether anything of the log was left out. The log quotes source lines near each error; prefer compile_project's summary when that is enough.

Inputs: projectId (required), kind, tail, format, +1 more. Returns: log, file, buildId, truncated, +1 more

get_full_documentA
Read-only

Flatten a LaTeX document latexpand-style: starting from rootFilePath, or from the project's root document when it is left out, every \input, \include, \subfile, and \import (also \subimport, \inputfrom, \subinputfrom, \includefrom, \subincludefrom) is replaced by the text of the file it names, recursively, and the rest of the text is kept exactly. Directives inside % comments and verbatim text are skipped. A path resolves relative to the project root first and then to the including file's folder (the other way round for \subimport and its relatives); \input and \subfile try the name as written and then with .tex, \include always means .tex, and \subfile takes in only the named file's document body. \include does not add its page breaks to the text. A directive that cannot be followed stays as written and is listed in unresolved with file, line (1-based), target, and reason: missing (no document at any candidate path), binary_file (the path is an uploaded file, not a text document), macro_argument (the path uses a macro or parameter), or excluded_by_includeonly (an \include an \includeonly list leaves out; includeOnly lists it). Returns rootFilePath, text, files (every file visited, each once, in order), unresolved, includeOnly when a file sets it, and sourceMap: one entry per run of text copied from one file, { flattenedStart, flattenedEnd, filePath, docId, originalStart, originalEnd, revision }, offsets in UTF-16 code units, half-open, into text and into that file's LF-normalized content. revision is the file's revision as read_file returns it: route an edit decided on in the flattened view back with write_file or write_section on that file, with that revision, never by writing the flattened text anywhere. Each file is read separately, so files can change between reads; each revision matches the text it was read with. text joins each file's text to what follows its directive with nothing in between, as written; a comment on a file's last line therefore reads on into the next text if text is compiled as is, though section parsing treats each file separately. An include cycle is INCLUDE_CYCLE with details.chain; nesting deeper than maxDepth is INCLUDE_DEPTH_EXCEEDED (it never cuts the result short); a result longer than 8388608 code units is DOC_TOO_LARGE with details.kind flattened, and includes that take in files more than 10000 times in all, counting a file once per inclusion, are DOC_TOO_LARGE with details.kind includes: start from a file further down, or read the files one at a time.

Inputs: projectId (required), maxDepth, rootFilePath. Returns: text, files, sourceMap, unresolved, +2 more

get_project_treeA
Read-only

Return the project file/folder tree with entity IDs and paths, plus the root document, compiler, TeX Live image, and spell-check language Overleaf uses. Each binary file entity carries hash, a git blob hash equal to git hash-object <file>; text documents have no hash and must be compared by reading their content. includeTags adds tags, this account's dashboard tags on the project as { id, name }, from one more request; change them with manage_tags.

Inputs: projectId (required), includeTags. Returns: tags, compiler, entities, hashNote, +4 more

get_section_contentA
Read-only

Read one parsed section body. The body runs from after the heading to the next heading at the same or a higher level, so it includes nested subsections, and the last section runs to the end of its file, including \end{document} when the file holds it. By default this reads a single file. With followIncludes: true, filePath is the document get_sections started from and sectionId comes from that call; a section that lies in one file is read as that file holds it, include directives included, which is exactly what write_section replaces, and revision is that file's revision; a section in an included file ends where that file ends, so it never holds the including file's \end{document}. A section with spansFiles: true reads as flattened text across files, for reading only.

Inputs: filePath (required), projectId (required), sectionId (required), followIncludes. Returns: content, section, revision

get_sectionsA
Read-only

Parse LaTeX section headings. By default this reads one file only and never follows input/include directives: singleFileOnly is true and offsets are into that file. With followIncludes: true, filePath is the document to start from (usually the root document), the headings are parsed in the text get_full_document returns for it, and singleFileOnly is false: start, headingEnd, bodyStart, and end are offsets into that flattened text, and each section adds filePath (the file holding its heading), revision (that file's revision, for write_section), and spansFiles (true when text from another file, other than white space, falls inside the section, or when an include directive or a file end falls inside its heading, so write_section refuses it). A section whose heading is in an included file ends, at the latest, where that file ends: the including file's text after the directive, such as \bibliography or \end{document}, belongs to no section. The section id then names its file, as path#command:offset, so pass followIncludes: true to get_section_content and write_section with it; the two modes end a body in different places, so an id from one mode is NOT_FOUND in the other. unresolved lists the directives that could not be followed, as in get_full_document. revision is always filePath's own.

Inputs: filePath (required), projectId (required), followIncludes. Returns: revision, sections, unresolved, singleFileOnly

import_project_zipA

Create a new project from a local .zip archive of LaTeX sources. name defaults to the archive file name. The returned name is the one Overleaf stored, which can differ: Overleaf uses the root document's \title when present and adds " (n)" when the name is already taken; use it as confirmName. If the project was imported but its name could not be read back, the error (AUTH_EXPIRED, POLICY_DENIED, or TIMEOUT from that read, else REMOTE_ERROR) is never retryable and carries the new projectId in details; do not import again. Overleaf caps archives at about 50 MB and rate-limits this route: RATE_LIMITED means wait details.retryAfterMs before trying again, and nothing was created. Set the root document afterwards with update_project_settings if the archive has more than one .tex file at the top level.

Inputs: localZipPath (required), name. Returns: url, name, projectId

list_commentsA
Read-only

List review comment threads and lazily resolve their document positions. Defaults to open threads. author keeps threads with a message whose author display name contains it (case-insensitive) or whose author id equals it. Returns threads, each with id, status, messages (id, author { id, displayName } or null, content, ISO timestamp), resolvedAt and resolvedBy when resolved, and when located filePath, start, end (1-based line, UTF-16 column), and quotedText; a thread without a document range has unlocated: true. Without filePath, positionsUnavailable: true means the deployment has no project-wide range index and every thread is unlocated.

Inputs: projectId (required), author, status, filePath. Returns: threads, positionsUnavailable

list_projectsA
Read-only

List the projects the account can access, newest first by default. Archived and trashed projects are hidden unless includeArchived or includeTrashed is set. Returns projects with id, name, accessLevel, lastUpdated, archived, and trashed, plus totalMatched (before limit) and totalProjects (everything the account can access). includeTags adds each project's tags ({ id, name }) and tags, every tag of the account with its id, name, color, and projectCount, empty ones included; use these ids with manage_tags. tag lists only the projects in the tag with that exact name; an unknown name is NOT_FOUND. Tags are the dashboard's own labels for this account; collaborators do not see them.

Inputs: tag, sort, limit, query, +3 more. Returns: tags, projects, totalMatched, totalProjects

list_tracked_changesA
Read-only

List tracked changes (suggestions) and where they are, so they can be accepted or rejected with manage_tracked_changes. With filePath, that document is read and its list is authoritative. Without it, Overleaf's project range index only chooses which documents to read: just the documents it lists with changes are read, its change ids are never used, and it may lag or leave a document out, so name a document with filePath for an authoritative list (this matters most for history-OT documents, whose index ids are never valid). indexUnavailable: true means the deployment has no index and no document was read. type and authorId keep only matching changes; limit (default 100, at most 500) caps the changes returned across all documents, totalMatched counts every match, and truncated says some were left out. Returns documents, each with filePath, revision (pass it to manage_tracked_changes), protocol, totalChanges (every tracked change in the document, unfiltered), undecidableChanges when some changes carry no id and cannot be decided by this server, and changes: changeId, type (insert: suggested text that is visible; delete: suggested removal of text that is no longer visible), start and end (1-based line and UTF-16 column in the text read_file returns; a delete is a point, so its start equals its end), length in UTF-16 units, excerpt of the inserted or deleted text (at most excerptChars UTF-16 units, default 120, 0 for none) with excerptTruncated, authorId (an Overleaf user id, or null), an ISO timestamp, and pairedChangeId linking the insert and the delete of one replacement. Also returns trackChangesActive. Ids merge and split as the document is edited, and history-OT ids are valid only with the revision they were listed with, so list again before deciding.

Inputs: projectId (required), type, limit, authorId, +2 more. Returns: documents, truncated, totalMatched, indexUnavailable, +1 more

manage_entityA
Destructive

Create a folder, rename, move, or delete an entity. Deletion requires confirmPath to exactly equal path. A name already used in the target folder (the entity's own included), and a folder moved into itself or one of its subfolders, are INVALID_ARGUMENT before anything is sent.

Inputs: path (required), action (required), projectId (required), newName, +2 more. Returns: id, action, created, writeMode, +1 more

manage_projectA
Destructive

Rename, trash, restore, archive, unarchive, or permanently delete a project. trash, archive, and delete require confirmName to equal the current project name exactly, else CONFIRMATION_MISMATCH and nothing changes. trash is the normal way to remove a project and is reversible with restore or in the web UI. delete is permanent and only succeeds on a project that is already trashed. Confirm with the user before trashing or deleting.

Inputs: action (required), projectId (required), newName, confirmName. Returns: name, action, projectId

manage_tagsA
Destructive

Create, edit, or delete the tags that organize projects on the Overleaf dashboard, or add projects to a tag or remove them. Tags belong to this account; collaborators do not see them. Read tags and their ids with list_projects includeTags. create takes name (unique among the account's tags) and an optional color; edit takes tagId and a new name, color, or both; delete takes tagId and confirmName equal to the tag's current name, else CONFIRMATION_MISMATCH, and removes the tag, never its projects; add_projects and remove_projects take tagId and projectIds, 1 to 100: add_projects only projects this account can access, remove_projects also an id the tag holds that the account can no longer open (NOT_FOUND names any other in details.projectIds). A name another tag has is INVALID_ARGUMENT with details.kind tag_name_taken and details.tagId, and an unknown tagId is NOT_FOUND, both before anything is sent. Every change is read back: tag is the result, and verified says whether the read-back confirmed it. A change whose answer was lost is never resent: recoveredAfterTimeout means the read-back showed it applied, and OUTCOME_UNKNOWN means read the tags before acting. Overleaf allows about 30 tag changes of each kind a minute; RATE_LIMITED means wait. Confirm deletes with the user first.

Inputs: action (required), name, color, tagId, +2 more. Returns: tag, action, deleted, verified, +1 more

manage_tracked_changesA
DestructiveIdempotent

Accept or reject tracked changes in one document. First list them with list_tracked_changes and confirm them with the user, then pass that document's filePath and revision, the changeIds (1 to 500, each once), and confirmCount equal to the number of changeIds; a missing or different confirmCount is CONFIRMATION_MISMATCH and nothing is sent. Accepting an insert keeps its text and accepting a delete removes it; rejecting an insert removes its text and rejecting a delete restores it. A tracked replacement is an insert and a delete linked by pairedChangeId: pass both ids. Checked in this order before anything is sent: access (only the owner and collaborators who can edit may decide; review-only and read-only access is PERMISSION_DENIED), whether track changes is available for the project (REVIEW_UNSUPPORTED, details.kind "feature_disabled"; review may need a plan that includes it), the revision (REVISION_CONFLICT), that every id is a tracked change in this document (NOT_FOUND, details.missingChangeIds), and that no change left out overlaps a chosen one (INVALID_ARGUMENT, details.overlappingChangeIds). REVIEW_UNSUPPORTED with details.kind "route_unavailable" or "document_protocol" means this Overleaf cannot decide changes this way. The decision is sent once and verified on a fresh read of the document. One that timed out is observed, never resent: recoveredAfterTimeout: true when it applied, TIMEOUT or REMOTE_ERROR with details.outcome "not_applied" when it did not, REVISION_CONFLICT with details.outcome "unknown" when the document changed meanwhile, and OUTCOME_UNKNOWN when it could not be observed. A repeated decision changes nothing: it fails with REVISION_CONFLICT when the first one changed the document's revision, as every reject and every history-OT decision does, or with NOT_FOUND when it did not, as after an accept on a ShareJS document, which leaves the revision as it was. Rejecting on a ShareJS (legacy editor) document may notify the change's author; on a history-OT document it does not. Returns action, filePath, changeIds, the resulting revision and protocol, remainingChangeCount (tracked changes left in the document), trackChangesActive, and recoveredAfterTimeout. List again after every decision and after REVISION_CONFLICT or NOT_FOUND: ids merge and split, and history-OT ids are valid only with the revision they were listed with.

Inputs: action (required), filePath (required), revision (required), changeIds (required), +2 more. Returns: action, filePath, protocol, revision, +4 more

monitor_project_historyA
Read-only

Poll one recent project-history window and return updates newer than an optional version cursor. In a group that starts before the cursor, only project operations at or after it are listed. Returns projectId, currentVersion (null when the window is empty), nextSinceVersion (pass it back as sinceVersion; on an empty window it repeats sinceVersion, or is null without one), hasEarlierHistory, gapDetected, and updates, newest first. Each update has fromVersion, toVersion, ISO startedAt and endedAt, authors ({ id, displayName } or null), paths, projectOperations (add, rename with newPath, remove, each with atVersion), labels, and origin ({ kind, path?, timestamp?, version? } or null).

Inputs: projectId (required), sinceVersion. Returns: updates, projectId, gapDetected, currentVersion, +2 more

plan_syncA
Read-only

Compare a local folder with a project folder and report what sync_directory would do, changing nothing. Binary files compare by git blob hash at no cost; each text document with a local counterpart, or present only in the project, is read once through the project's queue, so this suits tens of documents, not thousands. Returns toUpload (new or changed), identical (a count and the first 25 paths unless verbose), remoteOnly (what mirror mode would delete, each folder collapsed to one entry that includes its contents), conflicts (a file where the other side has a folder, or non-UTF-8 text where the project has a document; sync_directory cannot apply these), ignored, and planToken. Show the plan to the user before syncing. localFolderPath is on the server's disk; a symbolic link that leads outside it fails with PATH_OUTSIDE_ROOT.

Inputs: projectId (required), localFolderPath (required), ignore, verbose, +1 more. Returns: ignored, toUpload, conflicts, identical, +4 more

read_fileA
Read-only

Read a text document as LF-normalized content and return its opaque revision. Returns content, revision (pass it unchanged to write_file or write_section), newline "LF", protocol ("sharejs" or "history-ot"), and trackChangesActive.

Inputs: filePath (required), projectId (required). Returns: content, newline, protocol, revision, +1 more

reply_to_commentA

Reply to an existing review thread. An unknown threadId fails with NOT_FOUND and posts nothing. Returns threadId and the created message (id, author { id, displayName }, content, ISO timestamp), plus trackChangesActive and writeMode. A timed-out reply is never resubmitted: it returns recoveredAfterTimeout when the thread shows exactly one new matching message from this account, else OUTCOME_UNKNOWN; do not retry it blindly.

Inputs: content (required), threadId (required), projectId (required). Returns: message, threadId, writeMode, trackChangesActive, +1 more

search_projectA
Read-only

Search a project's text documents for a literal string and return where it occurs, instead of reading every document. Returns matches [{ filePath, line, column, preview }], with 1-based line and column (UTF-16 units, as the editor counts) and preview the matching line cut to 160 characters around the match, with … where cut; totalMatches, every match including those past limit; truncated; filesSearched; and binaryFilesSkipped. query is matched literally, never as a regular expression, and ignoring case unless caseSensitive. path narrows the search to one document or a folder; one that names nothing is NOT_FOUND. Documents are read one at a time as read_file reads them, so text in a tracked deletion is not found, and at most 300 per call: it saves calls and context, not wall-clock time. A larger scope, or more matches than limit, returns what was found with truncated true.

Inputs: query (required), projectId (required), path, limit, +1 more. Returns: matches, truncated, totalMatches, filesSearched, +1 more

set_comment_statusA
DestructiveIdempotent

Resolve or reopen a review thread and verify its resulting document revision. filePath must be the document the thread is anchored in, as list_comments reports it; a thread not anchored there fails with NOT_FOUND and nothing changes. On a history-OT document a status change needs owner or edit access: review-only or read-only access is PERMISSION_DENIED before anything is sent. Returns threadId, status, the resulting revision, trackChangesActive, writeMode, and recoveredAfterTimeout when a change that timed out, lost its socket, or could not be read back was confirmed by observation.

Inputs: status (required), filePath (required), revision (required), threadId (required), +1 more. Returns: status, revision, threadId, writeMode, +2 more

sign_inA
Idempotent

Open a browser window on the user's computer for them to sign in to Overleaf, and save the session, as the login command does. Call it only when the user agrees. A session that already works is returned at once and nothing opens. It waits up to 40 seconds: status waiting means the user is still signing in, so call it again only after they say they have finished. After a failure, ask the user before calling it again. Needs Google Chrome, Chromium, Brave, or Microsoft Edge.

Inputs: no named parameters. Returns: status, userId, baseUrl, warning, +7 more

stop_compileA
DestructiveIdempotent

Stop the active Overleaf compile for a project. Returns { stopped: true }.

Inputs: projectId (required). Returns: stopped

sync_directoryA
DestructiveIdempotent

Make a project folder match a local folder: upload new and changed files, and in mirror mode also delete what exists only in the project. Call plan_sync first, confirm the plan with the user, and pass its planToken; if the project or the folder changed since, REMOTE_DRIFT is returned and nothing changes. A planToken is required: without one the call is refused with CONFIRMATION_MISMATCH before anything is read, unless an additive sync passes unplanned: true to run without a plan on purpose (planned is then false); a mirror sync always needs one. Changed text documents are replaced through revision-checked write_file edits, recorded as tracked changes when writeMode is tracked, so a concurrent edit fails that file with REVISION_CONFLICT rather than being overwritten. Binaries and new files are uploaded, and one whose path changed since the plan fails with REMOTE_DRIFT; with writeMode tracked, new .tex, .bib, and similar text files are created with tracked content instead. Missing folders are created. Uploads and writes run first. Deletes run only in mirror mode, only when confirmDeleteCount equals the number of remoteOnly entries, else CONFIRMATION_MISMATCH, and never after any upload or write failed. Failures are per file and nothing is retried: the call continues unless stopOnError, then returns status, completed, failed, remaining, and a planToken to resume with. Each failed entry carries the step's error details, and kind: applied_untracked when a tracked step applied without being recorded as tracked changes (it is live, not reverted); a create that failed with details.created left its document behind, and resuming with the planToken writes it while it is still empty or holds the local text. On a ShareJS (legacy editor) document, text that adds an emoji or another character outside the Basic Multilingual Plane, or reorders existing ones, fails that file with INVALID_ARGUMENT. It saves tool calls, not time.

Inputs: mode (required), projectId (required), localFolderPath (required), ignore, +6 more. Returns: mode, failed, status, planned, +4 more

update_project_settingsA
Idempotent

Persist the project's root document, TeX engine, TeX Live image, or spell-check language in Overleaf's own project settings, so the web UI's Recompile follows the change. rootFilePath must name an existing .tex, .ltx, .Rtex, or .Rnw document; any other extension is INVALID_ARGUMENT before any request. Settings are applied one request at a time; if one fails, the error keeps its code, lists the settings already stored in details.applied and the failed one in details.failed, and no later setting is sent. Returns the settings as re-read from the project. Provide at least one field.

Inputs: projectId (required), compiler, imageName, rootFilePath, +1 more. Returns: compiler, imageName, projectId, rootDocPath, +1 more

upload_fileA
Destructive

Upload a local file into a project folder. Overleaf decides whether it becomes a text document or a binary file, by extension and UTF-8 validity. Something already at the path is replaced only when asked for, and otherwise nothing is sent. Replacing a binary needs overwrite: true, or expectedHash equal to its hash from get_project_tree; without either it is CONFIRMATION_MISMATCH, and a different hash is REMOTE_DRIFT. expectedHash is checked just before the upload, not atomically with it. Replacing a text document is a blind write with no revision check, so it needs uncheckedDocumentReplace: true, else INVALID_ARGUMENT: prefer read_file then write_file with localPath, and pass uncheckedDocumentReplace only when nobody else is editing it. overwrite: false refuses any replacement with CONFIRMATION_MISMATCH. A replaced text document keeps its entity ID; a replaced binary file may get a new one. writeMode in the result is tracked when Overleaf records a document replacement as tracked changes, because track changes is on for this account.

Inputs: localPath (required), projectId (required), overwrite, expectedHash, +3 more. Returns: hash, path, entityId, replaced, +3 more

write_fileA
Destructive

Replace a text document with a verified OT update that changes only the words that differ, optionally recorded as tracked changes, one per changed group of words; where a changed word touches a comment or tracked change, the update is one edit from the first change to the last instead. Supply the new text through exactly one of content (the whole text), localPath (a local file holding it, never sent through the tool call), or edits: 1 to 100 { oldText, newText } applied in order to the document at revision, each oldText matching exactly once in the text the edits before it left, with whitespace and line endings exact; an empty newText deletes. An oldText that does not match is INVALID_ARGUMENT with details.kind edit_not_found, one that matches more than once edit_ambiguous, each with details.editIndex (0-based), and nothing is sent; otherwise the result is written as content would be. A write that hit a timeout, a lost socket, or an error Overleaf reported on the document after the update was sent is never resent: the live document is observed instead, and recoveredAfterTimeout: true means the intended text was confirmed. An update Overleaf refused as too large is UPDATE_TOO_LARGE with details.outcome not_applied: nothing was stored. On a ShareJS (legacy editor) document, text that adds a character outside the Basic Multilingual Plane, such as an emoji, adds another copy of one the document holds, or changes their order is INVALID_ARGUMENT with details.line (1-based) and nothing is sent, because Overleaf would store it as U+FFFD; editing text on either side of one the document already holds is fine. With writeMode tracked, a write Overleaf applied without recording it as tracked changes by this account is PROTOCOL_UNSUPPORTED with details.kind applied_untracked and details.liveRevision: it is live and not reverted, so read the file before writing again; if another update followed the write before that check, it is REVISION_CONFLICT with details.outcome unknown instead. A review-only collaborator can write only with writeMode tracked, and a read-only one cannot write: either is PERMISSION_DENIED before anything is sent.

Inputs: filePath (required), revision (required), projectId (required), edits, +3 more. Returns: protocol, revision, writeMode, trackChangesActive, +1 more

write_sectionA
Destructive

Replace one section body in a single file using a revision-checked write, optionally recorded as tracked changes. By default included files are not traversed. With followIncludes: true, filePath is the document get_sections started from, sectionId comes from that call, and revision is the section's revision from it: the body is replaced in the file holding the heading, through the same revision-checked write, and filePath in the result names that file. The revision is checked against that file first: a file changed since get_sections is REVISION_CONFLICT with details.filePath and details.liveRevision, and nothing is sent. A section with spansFiles: true is refused with INVALID_ARGUMENT, details.kind spans_files, before anything is sent; edit each file with write_file instead. A section in an included file ends where that file ends, so do not add the including file's \end{document} to content. content replaces the whole body as get_section_content returns it, including nested subsections and, for the last section, \end{document}, so read it first and keep what should survive. The write is made as by write_file: on a ShareJS (legacy editor) document, content that adds an emoji or other character outside the Basic Multilingual Plane, or reorders existing ones, is refused with INVALID_ARGUMENT; a timeout, a lost socket, or an Overleaf error after sending is observed, never resent; a review-only collaborator can write only with writeMode tracked and a read-only one cannot write, either being PERMISSION_DENIED before anything is sent; and a tracked write Overleaf applied without recording it as tracked changes by this account is PROTOCOL_UNSUPPORTED with details.kind applied_untracked, live and not reverted.

Inputs: content (required), filePath (required), revision (required), projectId (required), +3 more. Returns: filePath, protocol, revision, writeMode, +2 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 37 tools

    Disambiguation4/5

    Most tools have clearly distinct resource-and-action targets, and the detailed descriptions clarify edge cases. However, several clusters overlap: upload_file/batch_upload/sync_directory, write_file/create_file/write_section, and manage_entity/delete_entities/manage_project require careful reading to choose correctly.

    Naming Consistency4/5

    Almost all names follow a snake_case verb_noun pattern such as list_projects, create_file, and download_compile_output. A few names like auth_status and batch_upload are less verb-oriented, but the convention remains mostly predictable.

    Tool Count2/5

    With 37 tools, the surface is heavy for a single MCP server and includes many specialized variants such as batch_upload, plan_sync, sync_directory, and multiple download_* tools. While the Overleaf domain is broad, this count risks context overload and exceeds the well-scoped 3–15 range.

    Completeness4/5

    The surface is unusually complete, covering authentication, project lifecycle, file/entity CRUD, upload/download, sync, compilation, logs, comments, tracked changes, tags, and history monitoring. Remaining gaps are peripheral, such as collaborator/sharing management and project-history restore or version labeling.

    Maintenance

    ActivityActive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers