Overleaf Web MCP

io.github.mhmdaskariPublished by GitHub account mhmdaskariv0.9.0Updated Nov 7, 2026

Read, edit, compile, and review Overleaf projects through your own signed-in web session.

Overview

AI-generated overview

Lets an assistant read, edit, compile and review your Overleaf LaTeX projects through your own signed-in browser session.

What you can do
  • List, search, create, clone, import, rename, trash and restore projects, and set root document, TeX engine and TeX Live image
  • Browse the file tree, read and write documents with revision checks, create, move, rename and delete files and folders, upload and download files or the whole project
  • Compare a local folder with the project and sync only what changed, optionally deleting what is gone locally
  • Parse, read and replace individual sections, including across input and include files
  • Compile the project and report errors and warnings by file and line, read logs, save the PDF, stop a build
  • List, reply to, add, resolve and reopen review comments; list, accept and reject tracked changes; poll…
When to use it
Useful when you write or maintain LaTeX papers in Overleaf and want an assistant to draft and revise text, keep figures and sources in sync with a local folder, fix compile errors, or work through reviewer comments and tracked changes without leaving the chat.
Requirements
Runs locally via npx, so it needs Node.js 20 or newer, a Chrome-family browser and an Overleaf account. You sign in once with npx overleaf-web-mcp login; the session lasts five days from last use unless kept alive. Optional environment variables set the Overleaf base URL for self-hosted instances, the cookie jar location, and access limits on projects, local folders and change kinds.
Before you install
It drives Overleaf's private web APIs, which can change without notice, and automating the hosted service may carry Terms-of-Service and account risk. Many tools write, upload, delete or replace project content, and accepting or rejecting tracked changes needs a plan that includes track changes. The saved session cookie is stored on your machine and must be protected. Access limits set by OVERLEAF_ALLOWED_PROJECTS, OVERLEAF_ALLOWED_EFFECTS, OVERLEAF_LOCAL_READ_ROOTS and…

Installation

In SourceWeft

  1. Open Overleaf Web MCP in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

Overleaf Web MCP

Read, edit, compile, and review your Overleaf projects, signed in as you,
from Claude, Codex, Cursor, or any MCP client, or from a shell or a TypeScript program.

Docs  ·  Get started  ·  Command line  ·  Tools  ·  Safety  ·  Compare  ·  Changelog

[npm version] [Total npm installs] [CI status] [Node.js 20 or newer] [34 MCP tools] [MIT license]
[Works with Claude Code, Codex, Cursor, and VS Code]

[An MCP client connected through an authenticated web session to an Overleaf workspace for project files, LaTeX editing, compilation, and review replies]

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."

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 automating www.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).

bash
npx overleaf-web-mcp login

2. Connect your MCP client. For Claude Code:

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

For Codex:

bash
codex mcp add overleaf -- npx -y overleaf-web-mcp serve
Claude Desktop, Cursor, VS Code, and other clients

Add this to the client's MCP configuration:

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

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:

bash
npx overleaf-web-mcp projects list --query thesisnpx overleaf-web-mcp files read <projectId> main.texnpx 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):

ts
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.
  • Browse and organize. List and search projects, 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. 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

34 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.

All 34 tools, with their annotations and local effects

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 is also overleaf-web-mcp call <name> and a method of createOverleafClient.

GroupToolWhat it doesAnnotationLocal effect
Accountauth_statusVerify the saved session and report when it expiresread-only
Accountlist_projectsList and search projects, newest firstread-only
Project lifecyclecreate_projectCreate a blank or example project
Project lifecycleclone_projectCopy a project, files and settings included
Project lifecycleimport_project_zipCreate a project from a local .zip archivereads
Project lifecyclemanage_projectRename, trash, restore, archive, unarchive, or delete a projectdestructive
Project lifecycleupdate_project_settingsSet the root document, TeX engine, TeX Live image, or spell-check language
Filesget_project_treeRead the file tree with the project's compile settingsread-only
Filesread_fileRead a text document and its revisionread-only
Fileswrite_fileReplace a document with a revision-checked edit of only the changed wordsdestructivereads
Filescreate_fileCreate a text document, optionally with content
Filesmanage_entityCreate a folder, or rename, move, or delete an entitydestructive
Filesupload_fileUpload a local file, replacing what is at that path when confirmeddestructivereads
Filesbatch_uploadUpload a list of local files to the paths given, creating missing foldersdestructivereads
Filesdownload_fileSave a document or binary file locallydestructivewrites
Filesdownload_project_zipSave the whole project locally as one zip archivedestructivewrites
Folder syncplan_syncCompare a local folder with the project and show what a sync would doread-onlyreads
Folder syncsync_directoryUpload what changed, and in mirror mode delete what is gone locallydestructivereads
Folder syncdelete_entitiesDelete several files or folders in one confirmed calldestructive
Sectionsget_full_documentRead a document with its \input and \include files flattened in, with a map back to each fileread-only
Sectionsget_sectionsParse the section headings of one file, or of a document across its included filesread-only
Sectionsget_section_contentRead one section's bodyread-only
Sectionswrite_sectionReplace one section's body, revision-checkeddestructive
Compilationcompile_projectCompile the project and report its errors and warnings from the log
Compilationstop_compileStop the active compiledestructive
Compilationget_compile_logRead the end of a build's LaTeX or BibTeX logread-only
Compilationdownload_compile_outputSave the compiled PDF, or another output file, locallydestructivewrites
Reviewlist_commentsList review threads with their locationsread-only
Reviewreply_to_commentReply in an existing thread
Reviewadd_commentAdd a comment anchored to exact text
Reviewset_comment_statusResolve or reopen a threaddestructive
Reviewlist_tracked_changesList tracked changes with their locations and authorsread-only
Reviewmanage_tracked_changesAccept or reject tracked changes in one documentdestructive
Historymonitor_project_historyPoll recent project history with a cursorread-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.

How it compares

The three most-starred Overleaf MCP servers and the two closest in design to this one, each checked against its own source code on 2026-10-25. They change often, so follow the links for their current state. The capability rows describe each project's MCP tools. ✅ supported, 🟡 partly (see the numbered notes), ❌ not supported.

This projectOverleafMCPolclioverleaf-mcp-serveroverleaf-mcp-rtnetique/overleaf-mcp
Connects throughWeb sessionGit bridgeWeb sessionGit bridgeWeb sessionWeb session
Tools3482152217
Works without an MCP client (command line or library)✅❌✅❌❌❌
Works without Overleaf's paid Git integration✅❌✅❌✅✅
Self-hosted Overleaf✅❌✅❌✅🟡¹
List and search your projects✅🟡²🟡³❌🟡⁴✅
Returns a document's text to the assistant✅✅🟡⁵✅✅✅
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✅❌🟡⁸❌❌✅
Reads and replaces one \section✅✅❌❌❌❌
Creates, renames, moves, and deletes files and folders✅🟡⁹🟡¹⁰🟡⁹✅❌
Uploads and downloads binary files✅❌✅❌✅🟡¹¹
Compares a local folder with the project✅❌✅❌❌❌
Compiles on Overleaf✅❌✅❌✅✅
Reads the compile log and errors✅❌❌❌✅✅
Review comments: list, reply, add, resolve✅❌✅❌✅🟡¹²
Creates, clones, imports, archives, and deletes projects✅❌🟡¹³❌❌❌
Saves the root document, compiler, and TeX Live image✅❌❌❌❌❌
Reads project history✅❌❌❌🟡¹⁴❌
Installs fromnpmnpmnpm, HomebrewPyPInpmnpm
LicenseMITMITMITMITAGPL-3.0AGPL-3.0
Notes 1–14
  1. Documented, but sign-in appears to require overleaf.com's overleaf_session2 cookie, which Community Edition does not set by default.
  2. Only the projects named in its own configuration.
  3. Lists projects without search, and leaves out archived and trashed ones.
  4. Lists projects, with no search or filter.
  5. Files are saved to the server's disk; no tool returns a document's text.
  6. Git rejects the push if Overleaf moved on after the tool's own pull, but an edit made between the assistant's read and that pull is overwritten.
  7. Only with strict_version: true; by default a concurrent edit is reported after the write.
  8. Accepts any tracked change, but rejects only in documents that use Overleaf's older ShareJS text OT, not history-ot.
  9. Creates files by writing them; no rename, move, or delete.
  10. Creates, renames, and deletes files and folders; no move.
  11. Downloads binary files; no upload.
  12. Lists, replies to, resolves, and reopens threads, but cannot add a comment.
  13. Creates and renames projects.
  14. Reports what collaborators changed during the session.

Documentation

PageWhat it covers
InstallClaude Code, Codex, Claude Desktop, Cursor, VS Code, the command line alone, self-hosted Overleaf, troubleshooting
Using itExample prompts and what happens underneath
Tool referenceAll 34 tools with parameters and results
Command lineEvery command, request formats, output, exit codes, and the Agent Skills
TypeScript SDKcreateOverleafClient, results and errors, and the stable surface
Safety modelRevisions, tracked changes, confirmations, error codes
ConfigurationEnvironment variables, the access policy, proxies, where the session is stored, and keeping it alive
InternalsProtocol notes, reliability guarantees, related projects
ContributingReporting bugs and feedback, setting up, and opening a pull request
Roadmap and ChangelogWhere this is going and what changed

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. 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.

Source: README.md at commit 6abcd5b

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

8
  1. v0.9.0LatestNov 7, 2026
  2. v0.8.1Nov 3, 2026
  3. v0.8.0Nov 1, 2026
  4. v0.7.1Oct 26, 2026
  5. v0.6.2Oct 20, 2026
  6. v0.6.1Oct 20, 2026
  7. v0.6.0Oct 19, 2026
  8. v0.5.1Oct 12, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts