Changelog¶
All notable changes to this project are documented here. This project follows Semantic
Versioning. From 1.0.0 it covers the tool names, input
schemas, result shapes, and error codes, and from 1.3.0 the MCP prompt names and arguments; the
command line's commands, flags, request format, output framing, and exit codes; the
overleaf-web-mcp/core surface the SDK page
lists as stable; and the capabilities report. A breaking change to any of them waits for a major
version, a deprecation is announced at least one minor version ahead with both names working, and
every change is listed below. Before 1.0.0, a minor or patch release could change them, and each
such change is listed.
[1.4.1] - 2026-11-23¶
Dependency floors only. No tool, command, or result changes: the lowest versions of undici
and zod the package accepts move past their published advisories.
Fixed¶
- The lowest versions of
undiciandzodthe package accepts now have no published advisory.undicirises from^6.28.1to^6.29.1(GHSA-2m5v-pch6-74hx, GHSA-qrxm-fqhp-jwvm, GHSA-xjj6-f33q-929c, GHSA-4qv8-2p9j-2685, GHSA-9fm3-97px-rjf6) andzodfrom^4.3.2to^4.6.7(GHSA-mrhx-c7xc-m3w5). A fresh install,npxincluded, already resolved the fixed versions; an install into a project that held an older copy could reuse it.
Internal¶
- Development dependencies:
vitestrises to^4.1.12(GHSA-82fw-gwwq-j7x9) andtypescript-eslintto^8.74.0, whoseminimatchis past GHSA-g3hv-75wg-m249.npm auditreports no vulnerabilities. - Dependabot uses
versioning-strategy: increase, so its updates raise the ranges inpackage.jsonalong with the lockfile.
[1.4.0] - 2026-11-23¶
For history and build insight. An agent can label the project before a large edit, read a
document as it stood at any earlier version, and restore it; check a manuscript's labels,
references, and citations without compiling, .bib files linked from a reference manager
included; and map a source line to its place in the PDF and back, or count words. The server is
also offered as plugins for Claude and Cursor. There are 41 tools.
Added¶
- Plugins for Claude and Cursor (#68).
plugins/claude/andplugins/cursor/each wrap the published npm package and contain no server code: a manifest, an MCP configuration that startsnpx -y overleaf-web-mcp@X.Y.Z servepinned to the exact release, copies of the three Agent Skills, and a README that says what the plugin runs, sends, and stores..claude-plugin/marketplace.jsonmakes the repository a Claude Code plugin marketplace, so/plugin install overleaf-web-mcp --marketplace mhmdaskari/overleaf-web-mcpinstalls the server and the skills together, and.cursor-plugin/marketplace.jsonnames the Cursor plugin's folder. The npm package does not includeplugins/, and its contents are unchanged. check_references(#59), a read-only tool in thesectionstoolset, alsocall check_referencesandclient.checkReferences. FromrootFilePathor the root document it follows the include directives asget_full_documentdoes, reads the.bibfiles named by\bibliographyor\addbibresource, and returnsundefinedReferences,undefinedCitations,unusedLabels,unusedBibEntries, andduplicateLabels, each a list of{ key, filePath, line }of at most 500, withcitationsChecked,truncated,filesRead, andunresolved.\bibitemkeys count as definitions. A.bibfile Overleaf holds as an uploaded file, such as a reference manager's linked file, is downloaded and read like a text one. A bibliography file that is missing or named through a macro is listed inunresolvedwith reasonmissingormacro_argumentand does not fail the call;citationsCheckedis thenfalseandundefinedCitationsempty. It reads source text, not TeX, which its description states; it compiles nothing.manage_history(#46, #47), a destructive tool in thehistorytoolset, alsocall manage_historyandclient.manageHistory, with two actions.create_labeltakescomment(1 to 1,000 characters), labels the version current just before the call, and returnslabel{ id, comment, version, createdAt }andverified, from a read-back of the project's labels.restore_filetakesfilePath,versionorlabelId, andconfirmPath, which must equalfilePath(CONFIRMATION_MISMATCHotherwise, with nothing sent). Overleaf replaces the live document with a new one holding the old text, so the result names the newdocId,previousDocId, and the new document'srevision,protocol, andtrackChangesActive, read from a fresh join, andcontentMatches. Edits, tracked changes, and comments made since that version are gone, and comment threads get new ids. A lost or failed answer is classified from a read-back:recoveredAfterTimeout: true,REMOTE_ERRORwithdetails.outcome: "not_applied"(a restore Overleaf failed that changed nothing), orOUTCOME_UNKNOWN; neither action is ever resent. A project with no history yet isINVALID_ARGUMENTwithdetails.kind: "no_history". Its effects areoverleaf-write,overleaf-read, andoverleaf-delete.read_file_version(#47), a read-only tool in thehistorytoolset, alsocall read_file_versionandclient.readFileVersion: the text of a document at aversionor at a label's version (labelId), with no revision. A path the version lacks isNOT_FOUND, a binary file isINVALID_ARGUMENTwithdetails.kind: "binary_file", and a version past the current one isINVALID_ARGUMENTwithdetails.kind: "version_ahead"anddetails.currentVersion.inspect_build(#51), a read-only tool in thecompiletoolset, alsocall inspect_buildandclient.inspectBuild, with three actions.source_to_pdf(filePath,line, optionalcolumn) returnspositions{ page, h, v, width, height }in PDF points, andpdf_to_source(page,h,v) returnslocations{ filePath, line, column }, both from the SyncTeX data of the buildbuildRefnames, or of the latest build in this process (NO_BUILDwithout one,BUILD_NOT_FOUNDonce Overleaf has dropped it).word_countruns texcount over the current sources fromfilePathor the root document, with no build needed, and returnsrootFilePathandwordCountwithtextWords,headWords,outsideWords,totalWords,headers,floats,mathInline,mathDisplay, anderrors. Results never carry document text. AfilePathwith..or a backslash isINVALID_ARGUMENTwithdetails.kind: "invalid_path".
Fixed¶
monitor_project_historyfailed withPROTOCOL_UNSUPPORTEDon a project whose recent history holds a file restore, made in the web editor or withrestore_file: Overleaf stamps that update's origin with an ISO timestamp, not a number. Both forms are read, andorigin.timestampis returned as an ISO string as before.
Documentation¶
- A troubleshooting entry in the installation guide (#69) for an MCP client that starts an older
server, or lists no
sign_in:npx -y overleaf-web-mcp serveruns a global install of any version when there is one. It namesnpm ls -g overleaf-web-mcp, the update command, and the uninstall command, with the caveat about a scheduledkeepalive. Eachnpm install -gin the installation and command line guides now says that a global install decides whatnpxruns.
Internal¶
- The bound
test/server.test.tsholds on the names, descriptions, and input schemas oftools/listrises from 60,000 to 68,000 characters for the four new tools; the list is 67,750 characters with all 41. compile_projectsends a randomeditorIdwith each compile, as Overleaf's editor does, and itsbuildRefcarries it, so SyncTeX can find the build in Overleaf's compile cache. AbuildReffrom an earlier release still works everywhere.scripts/bump-version.tssets the version in both plugin manifests and the exactoverleaf-web-mcp@X.Y.Zpin in both plugin MCP configurations on every release, and moves the minor-version pin in the plugins' copies of the skills.scripts/preflight.tsfails when any of them differs frompackage.json, andscripts/check-pack.tsrefuses a package that containsplugins/.test/plugins.test.tskeeps the skill copies identical toskills/and holds each plugin folder to the directories' file rules: no lockfile,.npmrc, symbolic link, or file over 256 KiB.
[1.3.0] - 2026-11-18¶
For desktop apps. Claude Desktop installs the server as an extension, and any MCP client can sign
in without a terminal: serve now starts without a saved session, and the new sign_in tool
opens the sign-in window on request, on macOS, Windows, and Linux. The three workflows of the
Agent Skills are offered as MCP prompts. Two processes sharing one session file no longer
overwrite each other's session, and the installation guide covers Cursor, the Codex app, and
Antigravity.
Added¶
- MCP prompts (#56):
revise_manuscript,address_reviewer_comments, andsync_sources, the three workflows of the Agent Skills written for tool calls.prompts/listoffers them on both protocol eras, andprompts/getreturns one user message with the steps and the arguments filled in as quoted strings. Every argument is optional and at most 4,096 characters; an unknown argument is refused. A prompt runs nothing and reads no session. UnderOVERLEAF_TOOLSETS, a prompt is offered only when every tool it names is.tools/listis unchanged, and the command line and SDK are unchanged. -
A Claude Desktop extension (#52):
overleaf-web-mcp-X.Y.Z.mcpb, attached to the GitHub Release from this version on. It runsservefrom the same build as the npm package, on the Node.js Claude Desktop ships with, on macOS, Windows, and Linux. Its three optional settings are the Overleaf address (OVERLEAF_BASE_URL, defaulthttps://www.overleaf.com), the allowed project ids (OVERLEAF_ALLOWED_PROJECTS, default empty, which allows every project), and the browser used to sign in (OVERLEAF_BROWSER_PATH, default empty, found automatically). -
sign_in(#54), an MCP tool that opens a browser window on the user's computer for them to sign in to Overleaf and saves the session, asnpx overleaf-web-mcp logindoes, so a client with no terminal can sign in. A session that already works is returned withstatus: "signed_in"andalreadySignedIn: true, and nothing opens. Otherwise the sign-in runs in the background: the call waits up to 40 seconds, under the usual 60-second tool-call timeout, and answersstatus: "waiting"withdeadlinewhile the user signs in; a later call answerssigned_inwith theauth_statusfields. A failed sign-in is reported once by the next call, which opens nothing. While a window is open, other tools, and a secondlogin, fail withAUTH_EXPIREDanddetails.reason: "sign_in_in_progress". It is listed only byserve, in theaccounttoolset, and has no command or SDK method;servelists 37 tools, andcreateMcpServerlists it only for a runtime withsignIn. Its annotations are not read-only, not destructive, idempotent, and open-world. - On Linux,
sign_inandloginopen the window on the desktop even when the server was started by a desktop app, which passes no display variables:DISPLAY,WAYLAND_DISPLAY, and the related session variables are read from the user's systemd session, and a variable the server was given is never replaced. When no display can be found, they fail withNOT_FOUNDanddetails.reason: "no_display"before opening anything. - The
sign-ineffect, inEFFECTSandOVERLEAF_ALLOWED_EFFECTS. With an allowlist that leaves it out,sign_inis not listed, and a call to it isPOLICY_DENIED.
Changed¶
servestarts without a working session (#54). It used to exit withAUTH_EXPIREDbefore answering the client, which an MCP client shows only as "failed to connect"; now the client connects,tools/listis unchanged, and each tool answersAUTH_EXPIREDuntil the user signs in. A session saved later, byloginin a terminal, is picked up on the next call without a restart, and a call that finds the session expired makes the next call read the session file again. While signed out, a call sends nothing to Overleaf unless the session file has changed. A session file that others can read, and any other startup failure, still stop the server. Operation commands and the SDK still open the session up front and fail withAUTH_EXPIREDwhen there is none.- The server instructions tell the assistant, on
AUTH_EXPIRED, to callsign_inwith the user's agreement, or have the user runlogin, instead of stopping. loginlocks the browser profile while its window is open. A second sign-in on the same computer, fromloginorsign_in, fails at once withAUTH_EXPIREDanddetails.reason: "sign_in_in_progress"; before, its window closed at once and it failed as a cancelled sign-in.
Fixed¶
- A process holding an older or expired session no longer overwrites a newer one (#64). Every
runtime (the server, each command, the SDK) saves the cookies Overleaf sends back; it used to
apply them over whatever the session file held, so a server whose session had expired could
replace the session a
loginin another terminal had just saved with an anonymous one. It now leaves the file alone when a cookie it changes no longer holds the value it had, and only that process's own session fails withAUTH_EXPIRED. - A running server or SDK client whose session file was removed failed every later call with
PARTIAL_CLEANUP("Could not safely persist refreshed cookies") until restarted. It now writes nothing back, as when another process saved a different session, and keeps the session it holds.
Documentation¶
- The installation guide (#65) covers Antigravity, with its configuration files and where to open
them; the Codex app, which shares
config.tomlwith the Codex command line; and an "Add to Cursor" link that installsnpx -y overleaf-web-mcp serve. Troubleshooting explains the "spawn npx ENOENT" of apps opened from the Dock or Start menu, and the toolsets section explains clients that cap the number of tools.test/docs-install.test.tschecks every client block, registration command, and the Cursor link against the definition inserver.json.
Internal¶
scripts/build-mcpb.tsbuilds the extension afternpm run build. It installs the production dependencies in a clean folder, starts the command line and loads the MCP server from it with the default settings, then validates and packs it with themcpbcommand line pinned to 2.1.2. It fails, and removes the file, when the bundle holds anything outsidedist/, the production dependencies,manifest.json,package.json,package-lock.json, andLICENSE. CI runs it on Ubuntu with Node 24, and the publish workflow attaches the result to the release.manifest.jsonjoins the filesscripts/bump-version.tssets and preflight compares, andtest/version.test.tsholds its version topackage.json.
[1.2.0] - 2026-11-14¶
Cheaper for agents. An agent can now find text without reading every document (search_project),
change a few words without sending the whole document back (edits on write_file), see a
project's tags from its tree, and offer an MCP client only the groups of tools it needs
(OVERLEAF_TOOLSETS), with a test that bounds what the tool list costs. The command line gains
shorthands for tags and search. remove_projects can clear a tag id the account can no longer
open, and a tag delete without confirmName now fails with the code the documentation named. The
server registers 36 tools.
Added¶
OVERLEAF_TOOLSETS(#44), a comma-separated list of the eight tool groups (account,projects,files,sync,sections,compile,review,history) thatserveoffers MCP clients, so a client that needs a few groups does not load every tool's description and schema each turn. Unset or empty offers every tool, andtools/listis unchanged; a tool left out is refused as an unknown tool. A name outside the eight isINVALID_ARGUMENTat startup, and exit 2 for an operation command. It is not an access control: the command line and the SDK reach every operation.capabilitiesgainstoolsets, the groups in effect, and atoolseton each operation. In the SDK,OperationContractgainstoolset, andcheckInputfor a rule across parameters, whichwrite_fileuses;AppConfiggains the optionaltoolsets.search_project(#55), a read-only tool that finds a literal string in the project's text documents and returnsmatchesas{ filePath, line, column, preview }, withtotalMatches,truncated,filesSearched, andbinaryFilesSkipped.queryis 1 to 200 characters, matched literally and ignoring case unlesscaseSensitive;pathnarrows the search to a document or a folder, and one that names nothing isNOT_FOUND;limitis 1 to 500, default 50. It reads at most 300 documents, one at a time throughread_file's reads, and a larger scope or more matches thanlimitreturns what it found withtruncated: true. The server now registers 36 tools. The command line gainsfiles search <projectId> <query>, and the SDKclient.searchProject.write_filetakesedits(#45), 1 to 100{ oldText, newText }applied in order to the document atrevision, as the third way to give the new text besidecontentandlocalPath. EacholdTextmust occur exactly once in the text the edits before it left, matched exactly; one that occurs nowhere isINVALID_ARGUMENTwithdetails.kind: "edit_not_found", one that occurs more than oncedetails.kind: "edit_ambiguous", each with the 0-baseddetails.editIndexand nothing sent. The resulting text is written exactly ascontentwould be. Giving more than one ofcontent,localPath, andedits, or none, isINVALID_ARGUMENTwithdetails.parameters; the command line and the SDK now refuse it when the input is parsed, before any session is opened, where before the content-and-localPath case was refused after. Thefiles writeshorthand gains--edits-file <f>, a JSON array, so document text never goes in argv. AnewTextwith CRLF line endings is written with LF, ascontentis. The server instructions nameeditsbesidecontentandlocalPath.get_project_treetakes an optionalincludeTags(#42). When it istrue, the result gainstags, the account's tags on the project as{ id, name }, read with oneGET /tag, and an empty array when the project is in no tag. Left out orfalse, the result and the requests are unchanged, with notagskey. An unrecognised tag list isPROTOCOL_UNSUPPORTED. Thetreeshorthand gains--include-tags, andclient.getProjectTreethe same parameter.- Command line shorthands for
manage_tags(#41):tags create <name> [--color <c>],tags edit <tagId> [--name <n>] [--color <c>],tags delete <tagId> --confirm-name <name>,tags add <tagId> --project <id>..., andtags remove <tagId> --project <id>.... Each only builds themanage_tagsinput, and its result, errors, and exit codes are those ofcall manage_tags.
Changed¶
manage_tagsremove_projectsnow removes a project id the tag holds even when the account can no longer open the project (#43). Overleaf keeps such an id in the tag after the project's link sharing is turned off, and its project list drops the project, so the call used to be refused withNOT_FOUNDand the id could not be cleared. An id that is neither accessible nor in the tag is stillNOT_FOUND, named indetails.projectIds, and a call with one sends nothing.add_projectsstill requires access, andOVERLEAF_ALLOWED_PROJECTSstill refuses an id outside it withPOLICY_DENIEDbefore any request.
Fixed¶
manage_tagsdeletewithoutconfirmNameis nowCONFIRMATION_MISMATCHwithdetails.missing: "confirmName", as its description, the tool reference, and the safety page already said, after the tags are read; it wasINVALID_ARGUMENTbefore anything was read. Both exit 2, and nothing is deleted either way.
Internal¶
test/server.test.tsbounds whattools/listcosts a client (#44): the names, descriptions, and input schemas, as compact JSON, must stay under 60,000 characters, set just over their size with 36 tools (58,992), as the 450-word bound holds the server instructions.- Each operation's contract names its
toolset, and a test holds the README's tool table to it.
[1.1.1] - 2026-11-11¶
Foundations. A blank environment variable now counts as unset, and the work around the code is sturdier: CI runs on Windows and macOS, a weekly check compares the private API with Overleaf's source, releases are bumped and checked by script, and the repository has a security policy and issue forms. No tool was added or removed, and no result shape changed; the server still registers 35 tools.
Fixed¶
- A blank environment variable counts as unset.
OVERLEAF_BASE_URL=""failed withINVALID_ARGUMENT(exit 2) instead of usinghttps://www.overleaf.com, andOVERLEAF_COOKIE_JAR_FILE=""was used as the saved-session path instead of the platform configuration directory. Every variablereadConfigreads now takes its default when it is empty or only whitespace, as the list and folder variables already did: the paths,OVERLEAF_PROTOCOL_VERSIONS(which became[0]), and the numeric settings (which failed withINVALID_ARGUMENTon spaces). A blankXDG_CONFIG_HOMEorAPPDATAfalls back to the platform directory. A malformedOVERLEAF_BASE_URLthat is not blank is stillINVALID_ARGUMENT. (#53)
Documentation¶
SECURITY.mdsays which versions get fixes, how to report a vulnerability privately, and what counts. New issues offer a bug report form, which asks for the version, interface, client, operating system, error object, anddoctoroutput and warns against pasting cookies or document text, and a feature form in the shape planned work uses; the chooser points security reports at the private channel. Dependabot proposes npm and GitHub Actions updates weekly, minor and patch together, and leaves majors of the MCP SDK,zod, and@types/nodeto the maintainer.CONTRIBUTING.mdlinks to all of it. (#58)- The full comparison with other Overleaf MCP servers, with its notes, moved to a new Comparison page; the README keeps the rows that decide a choice and the date they were checked. Its security model, the note on Overleaf changing, and versioning are cut to a summary with a link, and the safety model now holds the session-file details the README had alone. (#50)
Internal¶
- CI also runs the type-check, the tests, and the build on Windows and macOS with Node 24, beside
every step on Ubuntu with Node 20 and 24. A
.gitattributeschecks text files out with LF endings on every system, and the interface-boundary test finds the repository root and compares paths in a way that works on Windows. (#57) scripts/bump-version.ts X.Y.Zsets a release version in every file that carries it, and moves the skills'@X.Ypin on a major or minor release;scripts/preflight.tsruns the pre-release checks that need no Overleaf session (versions agree with npm and the latest tag, the MCP SDK's major version and single copies, the length of the server instructions) and exits 1 when one fails. (#49)- A weekly
Private API checkworkflow runsscripts/check-private-api.ts, which reads every route and socket messagedocs/private-api.mdlists and confirms each is still declared inoverleaf/overleaf, and opens or updates an issue labelledprivate-apinaming any that are gone. It needs no account or secret and checks presence only. The catalogue now writes each route as its own code span, marks with † the routes Overleaf's public source does not hold (the review routes and the Socket.IO handshake), and lists the socket messages with the file that declares each. (#48)
1.1.0 - 2026-11-09¶
Project tags. The labels that organize projects on the Overleaf dashboard can now be read with
list_projects and changed with the new manage_tags tool, from MCP, the command line, and the
SDK. Every tag change is checked against a fresh read before it is sent and verified by another
afterwards, and is never sent twice. The server registers 35 tools.
Added¶
manage_tags, a destructive tool (destructiveHint: true) with five actions:create: takesname, 1 to 50 characters and unique among the account's tags, and an optionalcolor,#rrggbborhsl(H, 70%, 45%);edit: takestagIdand a newname,color, or both;delete: takestagIdandconfirmNameequal to the tag's name, elseCONFIRMATION_MISMATCH. It removes the tag, never its projects;add_projectsandremove_projects: taketagIdandprojectIds, 1 to 100 projects.
It returns { action, tag: { id, name, color?, projectIds }, deleted, verified, recoveredAfterTimeout? }.
It refuses, before anything is sent:
- an unknown tagId, with NOT_FOUND and details.tagId;
- a name another tag has, with INVALID_ARGUMENT, details.kind: "tag_name_taken", and that tag's details.tagId;
- a project the account cannot access, with NOT_FOUND and details.projectIds.
A change whose answer was lost is never resent. It is classified from the read-back: recoveredAfterTimeout: true, or OUTCOME_UNKNOWN with details.outcome: "unknown" (exit 5).
Effects and policy:
- every action needs the project-lifecycle and overleaf-read effects, and delete also needs overleaf-delete;
- with OVERLEAF_ALLOWED_PROJECTS, projectIds outside the list are POLICY_DENIED, a tag's projectIds show only allowed projects, and edit and delete are POLICY_DENIED for a tag that holds a project outside the list.
Each tool is also overleaf-web-mcp call manage_tags and client.manageTags.
- list_projects gains includeTags and tag.
- includeTags: true adds tags: [{ id, name }] to each project, and a top-level tags: [{ id, name, color?, projectCount }] listing every tag of the account, empty ones included. It costs one more request to Overleaf.
- tag lists only the projects in the tag with that exact name. An unknown name is NOT_FOUND.
Without either parameter, the result and the requests are as before.
- Command line: projects list takes --include-tags and --tag <name>.
Changed¶
- The
project-lifecycleeffect now also covers tagging a project, andoverleaf-deletecovers deleting a tag. This affectsOVERLEAF_ALLOWED_EFFECTS, and only formanage_tags.
Documentation¶
- The README comparison was checked again on 2026-11-09:
- olcli now moves files and folders;
- a new row shows that none of the compared servers manages project tags.
docs/private-api.mdlists the tag routes as Overleaf's source defines them.- The Agent Skills and the command line guide pin
npx --yes overleaf-web-mcp@1.1. - Version tags. Every tool, parameter or value added after its tool, command, environment variable, error code, and stable SDK export on the documentation site now shows the release that introduced it, and a new Version history page lists what each release added to the MCP server, the command line, and the SDK.
1.0.0 - 2026-11-09¶
The first stable release. Failures are easier to read and act on: a refused project join says
why instead of asking for a new login, and reads that fail for a passing reason are retried a few
times before ending in the new TRANSIENT_FAILURE, while writes are still never sent twice.
doctor checks an install against its Overleaf without changing anything, and capabilities
reports what the backend can do in a project. The server still registers 34 tools.
Added¶
TRANSIENT_FAILUREerror code,retryable: true, for a read that kept failing for a reason that passes, and for a project join Overleaf refused withretry, as while restarting. The failed read changed nothing. A tool that writes can return it after its change was sent, when reading the result back failed; then it is not retryable, anddetails.createdordetails.appliedsays what changed where the tool knows. The command line exits 7 for it from a read-only operation and 5 from one that writes, or 4 withdetails.createdordetails.applied.- Bounded retry for reads only. A read, a
GETor the project list'sPOST /api/project, that failed on the network, was cut off, or answered HTTP 5xx, and a project join that failed before Overleaf answered it for a passing reason (aretryrefusal, real-time's own failure, a socket that closed or failed, a handshake network failure or HTTP 5xx, or a Socket.IO error packet advising a reconnect), are tried again after a short randomized exponential backoff, up toOVERLEAF_READ_ATTEMPTSattempts in all (default 3, at most 3; 1 turns retries off). Exhausted, the call fails withTRANSIENT_FAILURE,details.attempts,details.lastCode, and, when known,details.status,details.reason,details.path, anddetails.event: "joinProject". No request that changes something is ever sent twice, and no read that timed out, was rate-limited, or was refused is retried. AppConfiggains two optional fields,readAttemptsandminRequestIntervalMs, whichreadConfigfills in from the two new variables; a configuration built without them gets the same defaults.overleaf-web-mcp doctor [projectId], a command line check of an install, read-only: the configuration and access policy, the saved session, the bootstrap page and its CSRF token and user, the project list, and with aprojectIdthe Socket.IO handshake,joinProjectand its protocol version, and a join and leave of the root document. It prints{ version, checks: [{ id, status, code? }] }withstatusok,failed,unsupported, orskipped, names no project, file, or person, sends no update, and exits 1 when any check failed or was unsupported, its report still on stdout. An environment variable it cannot read exits 2 with the usual error line. It is not an MCP tool.backendin thecapabilitiesreport:{ kind: "web-session", liveRevisions, trackedWrites, review: { list, decide }, comments, compile, history }. With aprojectId,review.decidesays whether this account can accept or reject tracked changes there; without one, or for one the access policy refuses, it is"unknown".capabilities <projectId>now joins the project's socket to find out.OVERLEAF_MIN_REQUEST_INTERVAL_MS(default 0, at most 60000) spaces the starts of REST requests from one process.- A network failure of a REST request, or an answer cut off before it was read, is
REMOTE_ERRORwithdetails.kind: "network"; before, a cut-off answer surfaced as an untypedREMOTE_ERROR. A Socket.IO handshake answered with an HTTP error carriesdetails.status,retryablefor 5xx. - Socket.IO error packets are decoded:
7:::1+0isclient not handshaken(details.reason: "not_handshaken") with the advice to reconnect,retryable: true.
Changed¶
- Socket rejections are classified. A project join Overleaf refuses is no longer
AUTH_EXPIREDfor every reason but the rate limit.invalid sessionstaysAUTH_EXPIRED;retryisTRANSIENT_FAILURE;not authorizedisPERMISSION_DENIED;project not foundisNOT_FOUND; a bad project id isINVALID_ARGUMENT;too many requestsjoins the join limiter asRATE_LIMITED; real-time's own failures are retryableREMOTE_ERROR(details.reason: "connection_error"or"realtime_error"); and anything else isREMOTE_ERRORwith the identifier its message maps to, ordetails.reason: "unrecognized". An agent is no longer told to sign in again for a failure a new login would not fix. The command line's exit code follows the new code.not authorizedcan also mean a session that is no longer signed in, as Overleaf's own editor reads it, so its message says to checkauth_status. - A signed-in project page without a CSRF token, or with an empty one, is
PROTOCOL_UNSUPPORTEDwithdetails.kind: "response_shape"anddetails.endpoint: "GET /project", notAUTH_EXPIRED. A page with no signed-in user, or a redirect to/login, is stillAUTH_EXPIRED. - Project joins that failed without an answer. A Socket.IO handshake that failed on the
network is retryable
REMOTE_ERROR(details.kind: "network"), notTIMEOUT; only a handshake that timed out isTIMEOUT. A transport error during the join, such as an upgrade refused with HTTP 502, is retryableREMOTE_ERRORwithdetails.reason: "disconnected", as a socket that closed is. AjoinProjectResponsewithout the fields this release reads isPROTOCOL_UNSUPPORTEDwithdetails.kind: "response_shape"anddetails.event: "joinProject", and every failed join closes its socket; before, such an answer could leave the socket open. update_project_settingswhose settings were all stored but whose read-back failed says so: the error keeps its code, is not retryable, and carriesdetails.applied, so the command line exits 4.- The tool output schemas that list error codes include
TRANSIENT_FAILURE. - The Agent Skills and the command line guide pin
npx --yes overleaf-web-mcp@1.0.
Removed¶
ROADMAP.mdand the documentation site's Roadmap page. The plan they described ran to this release; earlier changelog entries link to the roadmap as it stood at v0.9.0. Planned work is tracked in GitHub issues.
Documentation¶
- The README describes the security model (the saved session's permissions, stdout framing, what errors never carry, retries, and the limits of the access policy), the Terms-of-Service posture, what happens when Overleaf changes its private endpoints, and what Semantic Versioning covers from 1.0.0.
- With the roadmap gone,
AGENTS.mdand the development guide say how work is planned and released: planned work lives in GitHub issues with mechanically checkable acceptance criteria; the conventions for new tools, error codes, variables, and commands, and the files each one touches; how to choose a major, minor, or patch version; what to check before starting a release; and the release checklist, from the changelog through live tests to checking the published package. A tightened safety default is now announced in a minor release and enforced in the next major one, as Semantic Versioning requires from 1.0.0; before 1.0.0 it was enforced one minor later. - The installation guide gains a compatibility section and points at
doctorfor troubleshooting; the command line guide documentsdoctorand thebackendreport; the configuration guide documents retries and pacing; the private API catalogue lists everyconnectionRejectedpayload and the code it maps to.
Internal¶
- The stdio tests drive the real server over piped streams with a 2025-11-25 client and a 2026-07-28 client, and check that each receives the instructions and that stdout carries only JSON-RPC.
scripts/check-pack.tschecks the packed file list for the entry points, the skills, and the license, and refuses sources, tests, and session files. CI and the publish workflow run it.
0.9.0 - 2026-11-07¶
Multi-file documents. A manuscript split across \input, \include, \subfile, and \import
can be read as one flattened document with a source map back to every file, and the section tools
can list, read, and replace sections across those files, each write going through the
revision-checked write of the one file that holds the section. The server registers 34 tools, one
more than 0.8.x. Planned in
ROADMAP.md.
Added¶
get_full_document, read-only: flattens a document latexpand-style fromrootFilePath, or from the project's root document, following\input,\include,\subfile,\import,\subimport,\inputfrom,\subinputfrom,\includefrom, and\subincludefromup tomaxDepthlevels (default 10, at most 32). Directives in%comments and verbatim text are skipped. A path resolves relative to the project root, then to the including file's folder (the other way round for\subimportand its relatives);\inputtries the name and then.tex,\includealways means.texand honours\includeonly, and\subfiletakes in only the file's document body, up to its first\end{document}. ReturnsrootFilePath,text,files,includeOnlywhen set, asourceMapof{ flattenedStart, flattenedEnd, filePath, docId, originalStart, originalEnd, revision }runs, andunresolveddirectives{ file, line, target, reason }, wherereasonismissing,binary_file,macro_argument(braced or not, as in\input\chapterfileon one line;\inputused as a token, as in\let\oldinput\input, includes nothing), orexcluded_by_includeonly. A directive that cannot be followed stays in the text as written instead of failing the call. The text joins each file to what follows its directive with nothing in between, exactly as the files hold it. Each file is read through the same read asread_file, so eachrevisionroutes an edit back throughwrite_fileorwrite_section.followIncludesonget_sections,get_section_content, andwrite_section, defaultfalse. With it,filePathis the document to start from and the headings of every included file are listed in reading order. Each section addsfilePath(the file holding its heading),revision(that file's), andspansFiles, its offsets are into the flattened text, and itsidnames the file, aspath#command:offset; an id from one mode isNOT_FOUNDin the other, since the two modes end a body in different places.get_sectionsalso returnsunresolved. A section whose heading is in an included file ends at the latest where that file ends, and the including file's text after the directive belongs to no section. Comments and verbatim text are read file by file, as TeX reads them, so a%comment on the last line of an included file never hides a heading after the directive.write_sectionreplaces the body in that one file and returns itsfilePath; it checks the revision against that file before looking the section up, so a file changed since listing isREVISION_CONFLICT(details.filePath,details.liveRevision) with nothing sent, and it refuses a section withspansFiles: truewithINVALID_ARGUMENT,details.kind: "spans_files"anddetails.files, before anything is sent. White space alone from another file, such as the line break after an\inputline, does not make a section span files; an include directive inside a heading, or a file that ends inside one, does.INCLUDE_CYCLE(details.chain) andINCLUDE_DEPTH_EXCEEDED(details.maxDepth,details.chain) error codes, fromget_full_documentand the section tools withfollowIncludes: true. The command line exits 1 for both. A flattened text longer than 8,388,608 UTF-16 code units isDOC_TOO_LARGEwithdetails.kind: "flattened", and include directives that take in files more than 10,000 times in all, counting a file once per inclusion, areDOC_TOO_LARGEwithdetails.kind: "includes", so an include graph that fans out cannot exhaust the server's time or memory.- On the command line,
overleaf-web-mcp call get_full_documentandoverleaf-web-mcp schema get_full_document, and in the SDK,client.getFullDocument.
Changed¶
get_sectionsresult:singleFileOnlyis now a boolean,trueas before unlessfollowIncludes: trueis passed, andsectionsitems andget_section_content'ssectionmay carry the three fields above. A call withoutfollowIncludesreturns exactly what it returned in 0.8.x.write_sectionresult may carryfilePath, set whenfollowIncludes: truewas passed.write_sectionchecks theoverleaf-writeeffect of the access policy before it reads the document, with or withoutfollowIncludes. Under a policy withoutoverleaf-write, 0.8.x joined the project and read the document before refusing the write withPOLICY_DENIED; now nothing is sent. The error is the same.- A section id passed to
get_section_contentorwrite_sectionthat is not found now says how to list the sections again, and, for an id that names a file, thatfollowIncludes: trueis needed. The code is stillNOT_FOUND.
Documentation¶
- The tool reference documents the directives followed, how paths resolve, the
unresolvedreasons, and the source map; the user guide, safety model, and command line guide list the new tool and error codes. - The three Agent Skills, and the command line page's examples, run
npx --yes overleaf-web-mcp@0.9, pinned to this minor version as they were pinned to 0.8. Theoverleaf-revise-manuscriptskill gains "Sections across included files", which works by section across a manuscript split with\inputor\includethroughfollowIncludes.
0.8.1 - 2026-11-02¶
A fix to the check after a tracked write. No tool was added or removed, and no result shape changed; the server still registers 33 tools.
Fixed¶
- A tracked write is no longer reported as untracked on a legacy document whose tracked
deletions share a point. A document converted from history-OT to the legacy editor (ShareJS),
or restored from history, can hold such pairs. When a tracked write to one deleted text on both
sides of a character outside the Basic Multilingual Plane that it kept, such as an emoji, it was
sent as two deletes. If the first took in an existing tracked deletion, Overleaf joined each pair
across the document, in order, before the second took that pair in, and the check after the write
expected the pair's text the other way round. A write that Overleaf had recorded as tracked
changes was then
PROTOCOL_UNSUPPORTEDwithdetails.kind: "applied_untracked"(exit 4), and a trackedsync_directorystep failed, which also held back a mirror sync's deletes. The check now accepts either order. A write that landed untracked is still reported, since an untracked delete keeps none of the deleted text. Found by comparing the check with Overleaf's change tracker on documents holding such pairs (#33).
Documentation¶
- The release steps say to move the Agent Skills'
npx --yes overleaf-web-mcp@X.Ypin with a minor release;test/skills.test.tsfails until it matches the package version.
0.8.0 - 2026-10-31¶
Tracked-change review. Two new tools list a project's tracked changes, with their locations,
authors, and excerpts, and accept or reject them in one document, on both of Overleaf's document
protocols: every decision is checked before anything is sent, sent once, and verified on a fresh
read. The same work makes every document write safer: an OT write the account's access level cannot
make is refused before it is sent, a tracked write is checked for having been recorded as tracked
changes, and Overleaf's otUpdateError is classified rather than passed on. A document write now
changes only the words that differ where no comment or tracked change is in the way, so a tracked
write is usually one suggestion per changed group of words. Comments on non-ASCII text are now
located and verified correctly. The server registers 33 tools, two more than 0.7.x. Planned in
ROADMAP.md.
Added¶
list_tracked_changes, read-only: lists tracked changes withchangeId,type,startandend(1-based line and UTF-16 column in the visible text),length, a boundedexcerptthat never splits a surrogate pair,excerptTruncated,authorId,timestamp, andpairedChangeIdfor the two halves of a replacement, per document with itsrevision,protocol,totalChanges, andundecidableChangeswhen Overleaf stored a change without an id.type,authorId,limit(totalMatched,truncated), andexcerptCharsshape the result. WithfilePathit reads that document; without it, only the documents Overleaf's range index lists with changes, andindexUnavailable: truewhen there is no index, never every document. History-OT changes carry ids made up from the change itself (ht_...), valid only with the listed revision.manage_tracked_changes, destructive: accepts or rejects tracked changes in one document, given the listedrevision, thechangeIds, andconfirmCountequal to their number. Before anything is sent it refuses a missing or differentconfirmCount(CONFIRMATION_MISMATCH), access below owner or edit (PERMISSION_DENIED), a project without track changes (REVIEW_UNSUPPORTED), a stale revision (REVISION_CONFLICT), an id that is not a live change (NOT_FOUND,details.missingChangeIds), a change left out that overlaps a chosen one (INVALID_ARGUMENT,details.overlappingChangeIds), and, for a ShareJS reject, a chosen change that does not match the document text (PROTOCOL_UNSUPPORTED). A ShareJS accept goes through Overleaf's accept route; a ShareJS reject and every history-OT decision is one untracked OT update with no tracking metadata. The result is verified on a fresh join, and a decision that timed out is observed, never resent. Returns the resultingrevision,remainingChangeCount,trackChangesActive, andrecoveredAfterTimeout. The server now registers 33 tools.REVIEW_UNSUPPORTED, a new error code, withdetails.kindfeature_disabled(the project's owner's plan or the deployment has no track changes),route_unavailable(Overleaf has no accept route), ordocument_protocol(Overleaf refused the document's protocol). The command line exits 3 for it, and 4 forPROTOCOL_UNSUPPORTEDwithdetails.kind: "applied_untracked".- Command line:
tracked-changes list,tracked-changes accept, andtracked-changes reject, shorthand for the two tools. - Protocol fixtures for review: a sanitized live capture of a ShareJS document with tracked
changes and a comment on non-ASCII text, a history-OT document with tracked changes written from
Overleaf's source together with the decision operations expected for it, and a test that fails
on a 24-hex id, an
@, or a session cookie name in any file undertest/fixtures/protocol.
Changed¶
- An OT write that the account's access level cannot make is refused before it is sent.
Overleaf judges an update by its shape: one that only adds comments needs view access, one that
only makes tracked changes needs review access, and anything else needs owner or edit access.
An untracked
write_file,write_section,create_file, orsync_directorywrite from a review-only collaborator, any write from a read-only one, and a history-OT comment status change from either is nowPERMISSION_DENIED(exit 3) withdetails.accessLevelanddetails.required, and nothing is sent. Before, Overleaf answerednot authorizedand dropped the socket, which surfaced asREMOTE_ERROR. An access level this release does not know may add comments only. otUpdateErroris classified, not passed on.update is too large, matched exactly, which Overleaf sends to the sender alone after storing nothing, is nowUPDATE_TOO_LARGEwithdetails.outcome: "not_applied", so the command line exits 4 for it rather than 1. Any otherotUpdateErrorreaches every client joined to the document and can follow the update being applied, so it now leaves the write unconfirmed (OUTCOME_UNKNOWNwithdetails.event: "otUpdateError"from the socket) and the write is observed on a fresh connection, never resent, as after a timeout:write_file,write_section,create_file,sync_directory,add_comment,set_comment_status, andmanage_tracked_changesthen return the verified result withrecoveredAfterTimeout: true, orREMOTE_ERRORwithdetails.outcome: "not_applied"and the error'sdetails.reason, orREVISION_CONFLICT, orOUTCOME_UNKNOWN. Before, everyotUpdateErrorwasREMOTE_ERROR(exit 1) with no observation. Overleaf drops the socket after the event, so it is no longer reused.- More of Overleaf's fixed socket error messages have a
details.reason, matched exactly:realtime_error,null_bytes_in_op,doc_over_max_size,doc_too_large,ranges_too_large,string_too_long,ops_not_loaded,too_many_ranges,unrecognized_op,conflicting_deletes,op_too_old,op_at_future_version,version_missing,delete_mismatch, andinvalid_hash. Anything else is stillunrecognized, and no upstream text is quoted. - A tracked write is checked for being recorded as tracked changes. After a tracked
write_file,write_section,create_file, orsync_directorywrite verifies, every span it inserted must lie inside tracked inserts by this account, and every span it deleted must be held by a tracked delete by this account, unless that text was itself a tracked insert. Otherwise the result isPROTOCOL_UNSUPPORTEDwithdetails.kind: "applied_untracked"anddetails.liveRevision(exit 4), and nodetails.outcome, because the write applied: it is live and never reverted. A tracked delete, of any author, that the deleted text spanned is expected inside the merged delete, as Overleaf records it. If another update followed the write before the check, such as a decision on its tracked changes, the ranges no longer describe it: the result is thenREVISION_CONFLICTwithdetails.outcome: "unknown"anddetails.liveRevision, and the text is live. A no-op write is not checked. Async_directoryfailed entry for such a step carrieskind: "applied_untracked"beside itsdetails. - A document write changes only the words that differ, away from comments and tracked changes.
write_file,write_section,create_fileover an existing document, and async_directoryreplacement used to send one span from the first difference to the last. They now compare the text line by line and then word by word and send one update with an edit per changed group of words, words one space apart counting as one group. A tracked write therefore records one suggestion per changed word group, a deletion and an insertion side by side for a replacement, where two separated word changes used to become one long insertion and one long deletion of everything between them, and an untracked write no longer deletes and re-inserts the unchanged text between edits. Word edits are sent only when none of them touches a comment or a tracked change: an edit that would overlap one, or reach an end of one or a tracked deletion's point, is first cut down to the characters that differ, and then, where it is the same text inserted or deleted at any of several places along repeated text, moved up to 64 characters to a place clear of every range. An edit that touches nothing leaves every range as it was, only moved along. If an edit still touches a range, the write is one edit per changed run of lines on the same terms, and failing that the single span, as before. After an untracked delete on the legacy editor (ShareJS), Overleaf merges tracked deletions that share a point, and touching insertions by one author, across the whole document. Editing never leaves such a pair, but a document converted from history-OT can, so an untracked write to such a document sends the single span. As on ShareJS, a history-OT edit is split around a character outside the Basic Multilingual Plane that it would only send again, which Overleaf refuses in a history-OT insertion, so the single span on history-OT is split around such characters too, where it used to be refused. The operations every write sends change accordingly; results do not. A diff past its limits (an edit distance of 2,000 lines or words, a change more than 1,000 code units inside one word, about 100 ms of work on a 2 MB document, or placement looking at more than 4 million ranges), and a tracked write whose changes, one per deletion and one per insertion, would take the document past Overleaf's limit of 2,000 tracked changes, fall back to one edit per changed run of lines or to the single span, as before. Thewrite_filedescription and the connect-time instructions now say so instead of "a minimal edit", and the description says that a change touching a comment or tracked change is sent as one span. - ShareJS range text is decoded like the document's lines. Overleaf sends the text of a ShareJS document's comment and tracked-change ranges as the Latin-1 reading of its UTF-8 bytes, as it sends the lines; that text is now decoded the same way when the document is joined. Positions, ids, and metadata are not encoded and are read as they are, and so is the text of the project's range index, which is plain UTF-8.
- The connect-time instructions (445 words) gain the tracked-change review steps, with
add_commentunder one Review paragraph, and are tightened elsewhere to stay under 450 words. - The three Agent Skills, and the command line page's examples, run
npx --yes overleaf-web-mcp@0.8, pinned to this minor version as they were pinned to 0.7.
Fixed¶
- Comments on non-ASCII text are located and verified correctly. On a ShareJS
(legacy editor) document, a comment anchored to text with a character outside ASCII, such as
"naïve café", was read back in its encoded form:
list_commentsreported a wrongendandquotedText, andadd_commentcreated the thread and attached it, then failed withOUTCOME_UNKNOWNbecause the exact range could not be verified. Comment ranges are now decoded as the document's lines are, so both report the range that was selected. - An unconfirmed document write is reported as not applied only when the original revision was
the last thing seen. When a document write from
write_file,write_section,create_file, orsync_directorytimed out or lost its socket after sending, and a recovery read saw the original revision but every later read failed until the recovery window ended, the error wasTIMEOUT(exit 4) orREMOTE_ERROR(exit 1) withdetails.outcome: "not_applied", although the write could have applied after that sighting. It is nowOUTCOME_UNKNOWN(exit 5), as the safety page already describednot_applied: the original revision stayed live throughout the recovery window. Comment writes already worked this way. - A rate-limited project join is
RATE_LIMITED, notAUTH_EXPIRED. Overleaf allows one account about 45 joins of one project a minute, andsync_directoryjoins about once per upload, so a sync of a few dozen files could reach it. The refused join was reported asAUTH_EXPIRED(exit 3), telling the caller to log in again although the session was fine. It is nowRATE_LIMITED(exit 7), retryable, withdetails.reason: "join_rate_limited"; nothing was sent. Wait a minute before trying again. Every other refused join is stillAUTH_EXPIRED.
Documentation¶
- The tool reference documents both new tools, the access check before a write, and
applied_untracked; the safety model listsREVIEW_UNSUPPORTEDand how a decision is checked, sent, and verified; the command line page lists the new commands and exit codes; the usage guide, internals page, and README cover reviewing tracked changes, and the comparison now marks accepting and rejecting them as supported. The private API catalogue records the accept route, how a reject is sent, the range encoding, the change shapes of both protocols, the track-changes features, and whereotUpdateErrorcomes from, each marked as read in Overleaf's source, confirmed live, or both. - The roadmap records what checking v0.8.0's ten open protocol questions found.
docs/development.mddescribes the opt-in live test of tracked-change review,RUN_OVERLEAF_LIVE_TRACKED_REVIEW_TESTS=1, and the interface comparison's review task now rejects a tracked change too.- A contributing guide,
CONTRIBUTING.md, also on the site and linked from the README: how to ask a question, report a bug or a security problem without exposing a session or a manuscript, set up, where code goes, the tests, and what a pull request needs. - The TypeScript and JavaScript sources are formatted with Prettier, and CI checks it with
npm run format:check;.git-blame-ignore-revsskips the reformat commit ingit blame.
0.7.1 - 2026-10-25¶
Compile outputs on self-hosted Overleaf. No tool was added or removed, and no result shape changed; the server still registers 31 tools.
Fixed¶
- Compile outputs on per-user compiles. Overleaf Community Edition and Server Pro compile per
user by default and serve outputs under
/project/<id>/user/<userId>/build/<buildId>/output/. The output tools requested/project/<id>/build/<buildId>/output/there and got a 404, sodownload_compile_output,get_compile_log, and the compile output resources answeredBUILD_NOT_FOUNDright after a successful build, andsummary.logReadwas nevertrue.urlin the compile response is still never requested or returned: only the user ID is taken from it, when every output file that names one names this project, its own build, and the same user. The path gains/user/<userId>then and is unchanged otherwise, as on overleaf.com.buildRefcarries the user ID to a later process; an oldbuildRefwithout one still decodes, and one whose user ID is not 24 hex digits isINVALID_ARGUMENT. Result shapes are unchanged. Contributed by @chek1337 in #21.
Documentation¶
- The npm description and the README tagline lead with what the package does and name its three interfaces: an MCP client, the command line, and TypeScript.
0.7.0 - 2026-10-25¶
The operations without an MCP client. A command line reaches every tool, call <tool> with a
JSON request plus shorthand commands for the common ones, and prints one JSON result, with exit
codes that say what is safe to do next. overleaf-web-mcp/core gains createOverleafClient, one
typed method per tool, and three Agent Skills drive the command line. All three go through the
same service, checks, and safety defaults as the MCP server. Every tool now declares an
outputSchema. No tool was added or removed; the server still registers 31 tools. Planned in
ROADMAP.md.
Added¶
- A command line for every operation.
overleaf-web-mcp call <tool>runs any tool with a JSON request from--request <file>,--request -(stdin), or--json <object>, and prints its result.schema <tool> --input|--outputprints the JSON Schematools/listadvertises, andcapabilities [projectId]lists each operation's effects, annotations, the effects the access policy refuses, the error codes, and the exit codes, with the project's access level when aprojectIdis given. Shorthand commands build the input of the common tools:projects list,tree,files read,files write,files download,sync plan,sync apply,compile run,compile log,compile download, andcomments list.overleaf-web-mcp --helplists them all; the command line page documents them. - One JSON result per command, and exit codes that say what is safe to do next. A command
prints exactly one JSON value on stdout, the object the MCP server returns as
structuredContent. On failure stdout stays empty and stderr gets one line of{ code, message, retryable, details? }. The exit code is 0 complete, 1 failed, 2 fix the call, 3 not allowed (AUTH_EXPIRED,PERMISSION_DENIED,POLICY_DENIED), 4 read or plan again, 5 outcome unknown (a write may have applied: read before acting, never re-run it blindly), 6 partial (the result is on stdout), and 7 safe to retry later. ATIMEOUTexits 7 from a read-only tool or while the session is being opened, 4 from a write known not to have applied (details.outcome: "not_applied"), and 5 from any other write, because a timed-out write may have applied. An error that says part of a write applied (details.created, or a non-emptydetails.applied) exits 4, never 2 or 7, which promise that nothing changed. - Strict input. The command line and the SDK client refuse a key the tool's schema does not
list, at any depth, with
INVALID_ARGUMENTanddetails.unknownKeys, before any request; a schema violation isINVALID_ARGUMENTwithdetails.issues. The MCP server, through the MCP SDK, still drops unknown keys silently, so a misspelledwriteModethere falls back tountracked. - No document text in argv.
files writetakes the text from--content-file, read by the operation itself soOVERLEAF_LOCAL_READ_ROOTSapplies, or from--stdin;calltakes any request from a file or stdin.compile logandcompile downloadneed--build-ref, since a new process has no latest build;compile run --download <localPath>compiles and saves the PDF in one process, and keeps the compile result on stdout withstatus: "partial"and exit 6 when only the download failed.--progresswrites progress as JSON lines on stderr. createOverleafClientinoverleaf-web-mcp/core: one camelCase method per tool (readFile,syncDirectory,authStatus()), each resolving with the same object as the MCPstructuredContent, typed by the tool's contract, and rejecting withMcpErrorand the codes the command line reports, plusclose(), which lets calls still running finish before it closes the project connections. The SDK page names the stable surface ofoverleaf-web-mcp/core.- Three Agent Skills in the package's
skills/folder, which drive the command line:overleaf-revise-manuscript,overleaf-reviewer-comments, andoverleaf-sync-sources. They use only public commands, ask before anything destructive, treat manuscript text and reviewer comments as data, never instructions, and keep project paths off the shell command line. - Output schemas for the last 12 tools:
get_project_tree,read_file,write_file,create_file,manage_entity,download_file,get_sections,get_section_content,write_section,stop_compile,set_comment_status, andmonitor_project_historydeclare anoutputSchemaand return the same object asstructuredContent, mirrored in the JSON text block as before. Every tool now does. The shapes are the ones these tools already returned, recorded first as golden results taken through the real domain classes.
Changed¶
errorCodein thefailedentries ofbatch_upload,sync_directory, anddelete_entitiesis an enum of the error codes in their output schemas, where it was any string.- A read-only tool whose result does not match its output schema fails with
PROTOCOL_UNSUPPORTEDanddetails: { kind: "response_shape", paths }, the same way through every interface. The MCP SDK used to report such a mismatch as an untyped text error. A tool that changes something is never failed this way after the change applied. createMcpServer,serveOverStdio, andcreateOverleafServicetake a narrower runtime type.OverleafServiceRuntime.authStatus,createFile, andentities.manageEntitynow declare the results theauth_status,create_file, andmanage_entitycontracts describe, where they returnedRecord<string, unknown>orunknown;recoveredAfterTimeoutistruewhere it was any boolean;sections.getSectionsandgetSectionContentreturn sections whosecommandis one ofpart,chapter,section,subsection,subsubsection,paragraph, orsubparagraph, where it was any string; andentities.uploadFilehas two overloads: withoutifExists: "skip"it resolves with an upload, never a skipped entry. A hand-written runtime must return those shapes, and a caller that forwardsoptionstouploadFilepasses a defined value.set_comment_statusreports the status it verified, not the string it was given; the two differ only for a library caller that passed something other thanopenorresolved.-
The descriptions of
read_file,stop_compile, andmonitor_project_historynow name the fields they return, and those ofadd_commentandset_comment_statussay thatrecoveredAfterTimeoutalso marks a change confirmed after its read-back failed. -
overleaf-web-mcp serveloads the MCP SDK only when it runs, so operation commands start without it.help,login,keepalive, an unknown command, andservebehave as before.
Fixed¶
- A comment change is never reported as safe to retry after it was sent. When the read-back
after a posted reply failed,
reply_to_commentpassed that read's error on, for example a retryableRATE_LIMITED, and posting again duplicated the reply. It is nowOUTCOME_UNKNOWNwithdetails.threadId, as is a failed read-back afteradd_commenttimed out creating its thread and afterset_comment_statusapplied a change. When only the final read of the new thread fails,add_commentreturns its result withoutthread, as its description allows. - A progress callback that throws never fails the call. Progress is advisory, but a library
caller's
onProgressthat threw or rejected failedbatch_upload,plan_sync,sync_directory, ordelete_entities, possibly after deletes or writes applied. The MCP server already ignored failed progress notifications. - Exactly one leading byte order mark is dropped from a local file's text, as for
write_filewithlocalPathand the filesplan_syncandsync_directorycompare. A zero-width no-break space right after it was dropped too. get_project_treereportshashonly when it is a string. A binary file whosehashin the joined project wasnullor another non-string value was listed with that value, which the new output schema, like the documentation, does not allow; the entity now has nohash.- A heading inside another heading's title is part of that title. For
\section{Outer \section{Inner}},get_sectionslisted both, the outer section ending before its own body started, andwrite_sectionon it wrote part of the heading a second time. Section tools now read a heading inside a title or a short title as part of it.
Documentation¶
- New pages for the command line and the
TypeScript SDK. The README and the
installation guide describe using the package without an MCP client, the tool reference
documents the result of every tool, and the safety model and AGENTS.md state the output rule:
every command but
serveandhelpprints exactly one JSON result. - The roadmap records v0.7.0 as shipped, with the commands and exit codes as built.
0.6.2 - 2026-10-20¶
Fixes from a live test run against overleaf.com. No tool was added or removed; the server still
registers 31 tools. Two result shapes change: the comment tools return their own thread shape,
without email addresses, and sync_directory's failed entries carry the failed step's error
details. Several failures that used to reach Overleaf, or came back as REMOTE_ERROR, are now
refused before anything is sent; Changed lists every contract change.
Changed¶
- Comment tools return their own thread shape, and never an email address.
list_comments,add_comment(itsthread), andreply_to_commentpassed Overleaf's thread objects through, so every message carried the author'suser { first_name, last_name, email }, and a resolved thread itsresolved_by_userwith an email. A thread is now{ id, status, messages, resolvedAt?, resolvedBy? }. Each message is{ id, author, content, timestamp }, whereauthoris{ id, displayName }, ornullwhen Overleaf names no user, andtimestampis an ISO string;resolvedByis{ id, displayName }. Overleaf's other thread and message fields are no longer returned. The three tools now declare anoutputSchemaand return the same object asstructuredContent. reply_to_commentreturns the created message. As its documentation said, the result is now{ threadId, message, trackChangesActive, writeMode, recoveredAfterTimeout? }instead of the whole thread. The new message is the one message that was not in the thread before the reply, from this account, with this content; when the read-back cannot single it out, the call fails withOUTCOME_UNKNOWNand is not resubmitted. A timed-out reply is likewise recovered only from a message that is new since the request, so an identical earlier reply is no longer taken as proof.list_commentsmatchesauthoragainst names and ids only. It keeps threads with a message whose author display name containsauthor, case-insensitive, or whose author id equals it. Email addresses are no longer matched.sync_directoryfailures carry their error details. Eachfailedentry gains an optionaldetails, the failed step's own error details:{ destinationPath, action, errorCode, message, details? }. A refused OT update reportsdetails.reason, an HTTP failure itsstatus, a write itsoutcomeorliveRevision, and a create that left its document behindcreated: true.create_filemarks an error raised after the document exists. Such an error keeps its code anddetails, addsdetails.created: true, and is neverretryable.- A lost or closed project socket is a retryable
REMOTE_ERROR. It wasOUTCOME_UNKNOWN.details.reasonisnot_connectedwhen nothing was sent, anddisconnectedwhen a read lost its reply or the socket closed during the project join.OUTCOME_UNKNOWNis kept for a write that was sent and may have applied. A write proved not applied after a lost socket isREMOTE_ERRORwithdetails.outcome: "not_applied"andretryable: false.add_commentandset_comment_statusfollow the same rule: an attachment or status change whose socket failed after it was sent, and that stays absent through the recovery window, isREMOTE_ERRORwithdetails.outcome: "not_applied",details.threadId, andretryable: false, whereset_comment_statusreportedTIMEOUT; one that actually timed out still isTIMEOUT. A change Overleaf accepted but whose requested state is never seen isOUTCOME_UNKNOWN, never not applied. - Characters outside the Basic Multilingual Plane are never sent to ShareJS documents. On a
ShareJS (legacy editor) document,
write_file, and with itcreate_file,write_section, andsync_directory, refuses text that adds such a character, an emoji for example, or an unpaired surrogate, adds another copy of one the document already holds, or changes their order. The error isINVALID_ARGUMENTwithdetails.line, the 1-based line of the first added one, and nothing is sent; Overleaf would have replaced each one with U+FFFD. An edit that spans such a character the document already holds is sent as several components that step around it, where it used to send the character again and Overleaf turned it into U+FFFD. History-OT documents are unaffected. update_project_settingsnames what it stored before a failure. Its errors keep their code andretryableand adddetails.applied, the input field names stored before the failure, anddetails.failed, the input field name whose request failed. ArootFilePathwithout a.tex,.ltx,.Rtex, or.Rnwextension isINVALID_ARGUMENTbefore any request.import_project_zipreads back the stored name, which needs theoverleaf-readeffect. Under anOVERLEAF_ALLOWED_EFFECTSwithoutoverleaf-read, the call is refused withPOLICY_DENIEDbefore anything is uploaded. When the archive was imported but the read-back fails, anAUTH_EXPIRED,POLICY_DENIED, orTIMEOUTfrom that read keeps its code anddetails; any other failure,NOT_FOUNDandRATE_LIMITEDincluded, which for this tool mean nothing was created, isREMOTE_ERROR. Every such error carries the new project's id indetails.projectId, says the project was imported, and is neverretryable, since importing again would create a second project.- Local file-system failures are typed by errno. In
upload_file,batch_upload, anddownload_file, a missing file or folder isNOT_FOUND(details.errno: "ENOENT"), and any other failure, such asEISDIRorEACCES, isINVALID_ARGUMENTwith the code indetails.errno. Both used to beREMOTE_ERROR. download_filechecks the local path before any request, and replaces a file atomically. A folder, or a symbolic link to one, atlocalPathisINVALID_ARGUMENTwhateveroverwriteis, a missing parent folder isNOT_FOUND, and a folder that cannot be written isINVALID_ARGUMENTwithdetails.errno, such asEACCES. Withoverwrite: truean existing file is replaced by writing a temporary file in the same folder and renaming it into place, asdownload_project_zipdoes, so a failed local write no longer leaves the old file truncated. The new file keeps the old one's permission bits, and a symbolic link to a file is kept while the file it leads to is replaced. The folder must now be writable even when the file exists: a writable file in a read-only folder was overwritten in place before and is now refused before anything is fetched.manage_entityname collisions areINVALID_ARGUMENTbefore any request. They wereREMOTE_ERROR. This coverscreate_folderon an existing path, with or without a trailing slash,renameto a name already in the folder, the entity's own included,moveinto a folder that already holds that name, the entity's current folder included, and moving a folder into itself or one of its subfolders. Names are compared exactly, as Overleaf compares them.- New
NOT_FOUNDrefusals.reply_to_commentwith athreadIdthat names no existing thread, andset_comment_statusfor a thread not anchored infilePath, fail withNOT_FOUNDanddetails.threadIdbefore anything is posted or changed.get_compile_logwithkind: "bibtex", anddownload_compile_outputofoutput.blgoroutput.bbl, areNOT_FOUNDon a build in which BibTeX did not run. These answers hold through abuildReftoo, and for a build with more than 100 outputs.compile_project'soutputFilesleaves outoutput.blgandoutput.bblon such a build, so the listing matches what the output tools serve; the shape ofoutputFilesis unchanged. monitor_project_historytrims a group that straddles the cursor. In an update group that starts beforesinceVersion,projectOperationslists only operations withatVersionat or aftersinceVersion. The group'sfromVersion,startedAt,paths, andlabelsstill describe the whole group.- The tool descriptions follow the new behaviour. Those of
clone_project,import_project_zip,update_project_settings,write_file,create_file,manage_entity,download_file,sync_directory,get_section_content,write_section,compile_project,get_compile_log,download_compile_output, the four comment tools, andmonitor_project_historyare updated, and the connect-time instructions (440 words) note that legacy documents refuse added emoji.
Fixed¶
- Project actions and
stop_compilereport success again. Overleaf now acknowledges rename, trash, restore, archive, unarchive, permanent deletion, and compile stop with a plain-textOK. The server refused that body as not JSON and returnedPROTOCOL_UNSUPPORTEDalthough Overleaf had applied the action. A bare status-text acknowledgement is now accepted wherever an empty body already was; any other body that is not JSON is still refused. - Tracked writes are accepted on ShareJS documents.
writeMode: "tracked"oncreate_file,write_file,write_section, andsync_directorysent the user ID as the track-changes id seed, which Overleaf refuses as longer than 18 characters, so every tracked write failed withREMOTE_ERROR. The server now sends an 18-character seed, as the web editor does; Overleaf still attributes the change to the signed-in user. compile_projectbuilds therootFilePathit is given. overleaf.com built the project's configured root document whateverrootFilePathnamed, while the result reported the requested path. The compile request now names the file to build.- A project socket Overleaf closed is replaced, not reused. After Overleaf closed a project
socket, as it does after refusing an OT update, or a protocol error closed it, the dead socket
stayed cached: every later document or comment call in the process failed with
OUTCOME_UNKNOWN, andget_project_treereturned a frozen tree. The next call now opens a fresh socket. A recovery waiting to drop that socket while another call still held it could wait indefinitely once the replacement connection failed to open, and a second one on the same project always did. Freeing a connection slot now wakes every waiting call, and each checks again whether it can proceed. - A Socket.IO event without arguments is accepted. Socket.IO 0.9 leaves out
argswhen Overleaf sends an event with none, as in areconnectGracefullyduring a drain. That frame was rejected asPROTOCOL_UNSUPPORTED, which closed the project socket and failed any call in flight on it. - A write cut off by a lost socket is classified, never resent. A write whose socket closed or
failed after the update was sent, or whose verification read then failed, was returned
unclassified. It is now observed like a timed-out write:
recoveredAfterTimeout: truewhen the intended text is live,REVISION_CONFLICTwithdetails.outcome: "unknown"for a third state, orREMOTE_ERRORwithdetails.outcome: "not_applied"(retryable: false) when the original revision stayed live through the recovery window.add_commentandset_comment_statusare now classified the same way. When the socket failed after the update was sent, or the verification read after an accepted update failed, they no longer return a retryableREMOTE_ERROR, which could lead to a duplicate thread, or, foradd_comment, delete the new thread at once. They observe the document instead:recoveredAfterTimeout: truewhen the comment or status is live,OUTCOME_UNKNOWNwithdetails.threadIdwhen it cannot be settled or Overleaf accepted the change but the requested state is never seen, andTIMEOUTorREMOTE_ERRORwithdetails.outcome: "not_applied"when an unaccepted change stayed absent.add_commentremoves its thread only in that last case. - A ShareJS line holding a real U+FFFD reads back exactly. Overleaf stores an emoji typed into
its legacy editor as U+FFFD, and such a line came back as latin1 mojibake.
write_filethen placed edits below that line at shifted offsets, corrupting the document, and a write that landed exactly was reported asREVISION_CONFLICT. A leading byte order mark is also kept. create_filesays when it left a document behind. Creating the document and writing its content are separate steps. When reading back or writing the content failed after the document was created, the error did not say that the document now existed, possibly empty. It now keeps its code and classification, addsdetails.created: true, and says to write the document withwrite_filerather than create it again. Nothing is deleted on your behalf.sync_directoryresumes after a create that left its document behind. A create that failed once its document existed, a refused tracked create for example, left aplanTokenthat did not account for that document, so the documented resume failed withREMOTE_DRIFT. The token now counts it while it is still empty or holds exactly the intended text, and the resumed sync writes it through a revision-checked write. A leftover someone edited in between still stops the resume withREMOTE_DRIFT. The failed entry's message told the agent to read the document withread_fileand write it withwrite_file, advice meant forcreate_file; following it moved the revision theplanTokenpins, so the resume failed withREMOTE_DRIFT. It now says not to create or write the document by hand, but to resume with the returnedplanToken, or to runplan_syncagain if none came back.update_project_settingsno longer half-applies a change silently. Overleaf applies a settings request field by field and stops at the first failure with a bare HTTP 500, so a call that failed partway reported only the 500 while some settings were stored, and the same process kept serving the old settings. Each setting is now sent in its own request, in the order Overleaf applies them (compiler, imageName, spellCheckLanguage, then the root document); a failure names the settings already stored, and no later setting is sent. The cached project snapshot is dropped on failure too, so a followingget_project_treeshows what Overleaf stored.update_project_settingsrefuses a root Overleaf cannot compile before any request. ArootFilePaththat does not end in.tex,.ltx,.Rtex, or.Rnw, in any case, such as a.bibdocument, got an opaque HTTP 500 from Overleaf. It is nowINVALID_ARGUMENT.import_project_zipreturns the name Overleaf stored. Overleaf names an imported project after the root document's\titlewhen there is one and adds a suffix such as(1)when the account already has a project with that name, so the returned name could differ from the stored one, andmanage_projectthen rejected it asconfirmName. The name is now read back after the import. If that read fails, the error carries the newprojectIdindetailsand is never retryable; see Changed for its code.compile_projectignores a BibTeX log left over from an earlier build. Overleaf's incremental build directory keeps an earlier build'soutput.blgandoutput.bbland lists them again for later builds in which BibTeX did not run. Their warnings, undefined citations, missing files, and errors were reported as this build's, and a stale BibTeX error could make a clean build of another root reportbuiltCleanly: false. Whenoutput.blgis listed,compile_projectnow reads the build'soutput.aux(one extra request, made only then) and keeps the BibTeX log only when the aux file holds a\bibdata, biblatex record, or\@inputline, or cannot be read in full. A\citationline alone does not count, since\citewithout\bibliographywrites one and BibTeX is then never run. The aux files an\@inputline names are not read, so a root that uses\includekeeps the log. On a build in which BibTeX did not run,outputFilesleaves outoutput.blgandoutput.bbl, andget_compile_logwithkind: "bibtex"anddownload_compile_outputof either file answerNOT_FOUND, in this process or throughbuildRef, also for a build with more than 100 outputs. A build that timed out or was terminated is not checked, since itsoutput.auxmay be half written, so itsbuildRefcan still reach a leftover.blg.- Section tools read
%as LaTeX does.get_sections,get_section_content, andwrite_sectiontreated%after a\\line break as escaped, so a heading commented out after\\%was parsed as a live section andwrite_sectioncut a body short at that line. Whether a%is escaped now depends on the whole run of backslashes before it. A%inside averbatim,verbatim*,lstlisting,minted, orcommentenvironment is literal text; one on the same line as the environment's\end{...}used to hide every later heading, so awrite_sectionon the section before it could delete the sections after it. Headings inside inline\verb,\verb*(with any delimiter), or\lstinline(with a delimiter or braces) are no longer parsed, and%inside them is text. In the same way, a heading name right after a\\line break, as intext\\section{X}, is plain text to LaTeX. It was parsed as a live heading, so the section before it ended between the two backslashes, and awrite_sectionon that section dropped the first backslash and turned the text into a real\sectionheading. - Section offsets stay correct after an emoji in a comment. A character outside the Basic
Multilingual Plane inside a comment or a verbatim-like environment shifted every later section by
one, so
write_sectionreplaced the wrong range. get_project_treereports each nested folder's own parent.parentFolderIdwas the project root for every folder; it is now the folder that holds it.- Local file errors no longer pass the operating system's text through.
upload_fileanddownload_filereturned local file-system failures asREMOTE_ERRORcarrying the operating system's message and the resolved path. The new messages carry neither; see Changed for the codes.batch_uploadgets the same codes throughupload_file. download_filechecks the local path before it fetches anything. An existing file withoutoverwrite: trueis refused with the sameINVALID_ARGUMENTas before, but no longer after a wasted download. A folder, or a symbolic link to one, atlocalPathused to suggestoverwrite: true, which then failed after the download. A missing or unwritable parent folder is likewise found before the fetch. The exclusive create still refuses a file that appears during the download.manage_entityrefuses a name collision before any request. Acreate_folder,rename, ormovethat would put two entities with the same name in one folder, and moving a folder into itself or one of its subfolders, failed at Overleaf asREMOTE_ERRORwith HTTP 400. Acreate_folderpath with a trailing slash is checked the same way.monitor_project_historyno longer repeats project operations an earlier poll reported. Overleaf can merge new changes into an update group between polls, so a group may start beforesinceVersion, and its earlier operations were reported again.list_commentsfilters by author name.authorcompared fields Overleaf does not send (user.name) and the author's email, so a display name never matched while an email substring did.reply_to_commentno longer posts a stray or duplicate reply. Overleaf creates any thread a message is posted to, so a mistypedthreadIdsilently started a new, unanchored thread that no tool can delete, and the call reported success. It also opened the project socket only after posting, to readtrackChangesActive, so a project join that failed then, for example while Overleaf was draining, returned a retryableREMOTE_ERRORfor a posted reply, and a retry posted it twice. That state is now read before the reply is posted.set_comment_statuschecks the thread is infilePath. It resolved or reopened the thread by id whatever documentfilePathnamed, and could report a thread anchored elsewhere, or nowhere, as verified. On a history-OT document, the new status is now verified from the document snapshot, also for a comment whose anchored text was deleted and for an open comment, whose snapshot entry leavesresolvedout. A change that applied is no longer reported asOUTCOME_UNKNOWN, or after a timeout as not applied.
Documentation¶
manage_entityresults includewriteMode, which is alwaysuntracked, since tree operations are never tracked changes.- The tool reference says that a section's body runs to the next heading at the same or a higher
level, nested subsections included, and that the last one runs to the end of the file,
\end{document}included; thatclone_projectcopies the root document and compiler but not the TeX Live image or spell-check language, which Overleaf resets to the account's defaults; thatupdate_project_settingsomitsspellCheckLanguagewhen spell checking is off; thatmanage_projectreads the current name from Overleaf and checksconfirmNamebefore any change is sent; and thatimport_project_zipusually has nodetails.overleafError, since overleaf.com answers with a translated sentence rather than a code. - The safety model's error table and the protocol notes describe the socket, ShareJS, and local file
codes above, and the roadmap's count of tools still without an
outputSchemadrops to 12.
0.6.1 - 2026-10-20¶
A refreshed README and package description, and a session deadline that no longer drifts. No tool was added, removed, or changed in schema or result shape; the server still registers 31 tools.
Changed¶
- The npm package and the documentation site describe the server by what it does. The note that it is an independent project, not affiliated with or endorsed by Overleaf, moves to one line at the end of the README, and the site footer keeps its note. The Terms-of-Service and account risk caution becomes a short note under Get started and on the site's home page.
- The npm download-count badge, an all-time total refreshed weekly, is labelled
installs. - Dependencies are refreshed within their declared ranges, which clears every
npm auditfinding; all were in development-only packages, and the published package had none.
Fixed¶
- The session deadline is dated from when Overleaf set the cookie. Overleaf sets its session
cookie with
Max-Age, which the cookie library counted from the cookie's latest use rather than from its arrival, sosessionExpiresAtinauth_statusandkeepalivemoved later with every request and could report a deadline after the real one. The server now fixes the deadline when the cookie arrives, and the jar file and both reports agree to the second.
Documentation¶
- The README has a navigation row, one badge style with CI status and the supported clients, and a dark-theme version of the hero image, which the site's home page also uses. The tool table, the configuration for other clients, and the comparison's notes are collapsible.
- Codex is listed among the supported clients, with its
codex mcp addcommand in the README and a Codex tab in the installation guide. The README notes that VS Code uses aserverskey.
0.6.0 - 2026-10-19¶
Compile and build ergonomics. compile_project now reads the build's logs and says plainly
whether the paper built cleanly, with errors and warnings by file and line, and two new tools read
a build's log and save its PDF or any other output without compiling again. The three safety
defaults 0.5.0 announced are enforced: a folder sync needs a plan, and an upload or batch upload
replaces nothing unless asked. The server registers 31 tools, two more than 0.5.x. Planned in
ROADMAP.md.
Added¶
get_compile_log(read-only): a bounded tail of a build's LaTeX log, or withkind: "bibtex"its.blglog, withformat: "errors-only"andtail(default 200 lines, at most 2,000). It reads at most 1 MB and returns{ buildId, file, log, truncated, errorLines }.download_compile_output(destructive, writes locally): savesoutput.pdf, or any output such asoutput.logoroutput.synctex.gz, to a local path in one call, returning{ localPath, file, sizeBytes, buildId, replaced }. An existing file is replaced only withoverwrite: true, atomically; a.pdfthat does not start with%PDF-is refused.compile_projectreturns asummary:{ status, builtCleanly, pdfProduced, logRead, errorCount, warningCount, errors, warnings, undefinedReferences, undefinedCitations, missingFiles, pageCount?, pdfSizeBytes? }.builtCleanlyis the field to check, since Overleaf reportssuccesswhenever a PDF came out, even after LaTeX errors. Errors and warnings are{ file?, line?, message }, the first 20 of each, messages cut to 240 characters and never the source excerpt TeX prints afterl.<n>. The log parser is this package's own, written for MIT and tested against fixture logs; it reads both TeX error forms, BibTeX, and Biber.buildRefoncompile_project's result, and on a timed-out or terminated build's error details: an opaque token naming the build toget_compile_loganddownload_compile_output, in this process or a later one. Without it, both use the latest build compiled in this process.stopOnFirstErroranddraftoncompile_project, passed to Overleaf's compile endpoint.compile_projectdeclares anoutputSchemaand returnsstructuredContent, as do both new tools.- Read-only MCP resources
overleaf://project/{projectId}/output/output.logandoverleaf://project/{projectId}/output/output.pdf, for the latest build in this process (a PDF of at most 16 MB). - Five error codes:
COMPILE_RATE_LIMITED(retryable, withretryAfterMswhen known),COMPILE_UNAVAILABLE(retryable),COMPILE_TIMEOUT,NO_BUILD, andBUILD_NOT_FOUND. batch_uploadonConflict: "fail", now the default; see Changed.details.missingon the refusals below, naming the parameter to pass.
Changed¶
- A build that ran is a result, not an error.
compile_projectwith Overleaf statusfailureorstopped-on-first-errorreturns the summary instead of throwingCOMPILE_FAILED. A compile with no build to report on fails with a code by status:too-recently-compiled,rate-limited,autocompile-backoff,compile-in-progress, and HTTP 429 areCOMPILE_RATE_LIMITED;clsi-maintenanceandunavailableareCOMPILE_UNAVAILABLE;timedoutisCOMPILE_TIMEOUT; the rest,validation-problemsincluded, stayCOMPILE_FAILED. - Compile error details are exactly
{ status, rootFilePath, buildId?, buildRef? }, plusretryAfterMsforCOMPILE_RATE_LIMITEDwhen known.details.result, deprecated in 0.5.0, is gone. - The compile response is validated where it arrives.
outputFilesentries are reduced to{ path, type, build? }, withouturl;statskeeps numbers only;timings,pdfDownloadDomain,validationProblems, and every other field are dropped. A response without astatus, or with malformedoutputFiles, isPROTOCOL_UNSUPPORTEDwith{ endpoint: "compile", expectedKeys, receivedKeys }. - A
TIMEOUTon the compile request is no longer retryable, because Overleaf may still be compiling. - The compile request adds
?file_line_errors=true, so TeX names the file of each error, andcompile_projectreadsoutput.logand any.blglog after the build, so it needs theoverleaf-readeffect as well ascompileunder an access policy. sync_directoryrequires aplanToken. Without one, and withoutunplanned: truefor an additive sync, it fails withCONFIRMATION_MISMATCHanddetails.missing: "planToken"before anything is read. A mirror sync always needs one.upload_filereplaces nothing unless asked. Onto a binary withoutoverwrite: trueorexpectedHashit isCONFIRMATION_MISMATCH(details.missing: "overwrite"); onto a text document withoutuncheckedDocumentReplace: trueit isINVALID_ARGUMENT(details.missing: "uncheckedDocumentReplace"), namingwrite_filewithlocalPath. Nothing is sent in either case.batch_uploadhas no default that replaces.onConflictdefaults to"fail": when any destination holds a document or binary file, the call fails withCONFIRMATION_MISMATCH(details.missing: "onConflict",count, and up to 25paths) before anything is uploaded. With"overwrite", a text document is replaced only withuncheckedDocumentReplace: true, and otherwise that file fails withINVALID_ARGUMENT. The result'sonConflictcan be"fail".- No result lists
deprecations: the field is removed from theupload_file,batch_upload, andsync_directoryoutput schemas, since every default it announced is now enforced. - The tool descriptions of
compile_project,upload_file,batch_upload, andsync_directory, and the connect-time instructions (417 words), describe the new behaviour.
Documentation¶
- The tool reference documents the summary, the status-to-code table, both new tools, and the
output resources, and drops the 0.5.x transition tables for the enforced defaults. The safety
model lists the new codes, the compile output guarantees, and what changed in 0.6.0. The private
API catalogue documents the output route,
file_line_errors,stopOnFirstError,draft, the statuses, and the build id and server id formats, and no longer says the response is passed through. The README and the site's home page list the new tools, and the comparison now marks reading the compile log and errors as supported.
0.5.1 - 2026-10-12¶
Listed in the official MCP Registry. No tool was added, removed, or changed in schema or result shape; the server still registers 29 tools.
Added¶
- An MCP Registry entry. The server is published to
registry.modelcontextprotocol.io as
io.github.mhmdaskari/overleaf-web-mcp, which the MCP clients and directories that read the registry use to find and install it.server.jsonin the repository root describes the npm package, itsserveargument, and the optional environment variables, andpackage.jsoncarries the matchingmcpNamethe registry checks against the published package. - The
Publish to npmworkflow lists each release in the registry once the package is on npm, signing in with GitHub OIDC, so no registry token is stored. A test keepsserver.json's name and versions aligned withpackage.json.
0.5.0 - 2026-10-10¶
Shared core and safety. Every operation is now defined once, in an operation registry the MCP
server is one adapter over, and the engine behind it is published without MCP as
overleaf-web-mcp/core. An optional access policy limits which projects, local folders, and
kinds of change the server may touch; ids are checked before they reach a request path; and error
details no longer carry text from Overleaf. Three safety defaults that depended on the caller
picking the safe option are announced here and enforced in 0.6.0: a folder sync without a plan,
an upload that replaces a file without saying so, and batch_upload's overwriting default. No
tool was added or removed; the server still registers 29 tools. Planned in
ROADMAP.md.
Added¶
overleaf-web-mcp/core, a subpath export that never loads the MCP SDK. It exportsOverleafRuntime,readConfig,createOverleafService,McpError(the same class the root exports),ERROR_CODES,SERVER_VERSION, and the contracts:OPERATIONS,OPERATION_NAMES,EFFECTS, and theOverleafService,OverleafServiceRuntime,OperationContext,OperationInput, andOperationOutputtypes.createOverleafService(runtime)returns one function per operation, keyed by tool name, that takes the tool's input and resolves with its result or rejects withMcpError. It follows the same 0.5.x defaults and deprecations as the MCP server; v0.7.0 documents its stable surface.- An access policy, configured by four environment variables, all unset by default. Every operation is checked against it before anything is sent, through the MCP server and the exported runtime alike:
OVERLEAF_ALLOWED_PROJECTS, the project ids any tool may touch.list_projectsandauth_statuslist and count only these, and a project created by this process is allowed for the rest of it.OVERLEAF_LOCAL_READ_ROOTSandOVERLEAF_LOCAL_WRITE_ROOTS, absolute folders separated by:(;on Windows) that local reads (write_fileandupload_filefrom disk,batch_upload,import_project_zip,plan_sync,sync_directory) and local writes (download_file,download_project_zip) must stay inside, judged byrealpath.OVERLEAF_ALLOWED_EFFECTS, which ofoverleaf-read,overleaf-write,overleaf-delete,project-lifecycle,compile,local-read,local-write, andunchecked-replacean operation may have. An operation checks every effect it will use before it starts, the reads a write makes afterwards included, so a refusal never lands after a change.
A relative or missing root, an unknown effect, or an unsafe project id stops the server at
startup with INVALID_ARGUMENT naming the variable.
- POLICY_DENIED, a new error code for a project (details.parameter) or effect
(details.effect) the policy does not allow. Nothing is sent.
- upload_file takes overwrite, expectedHash, and uncheckedDocumentReplace, checked
inside the upload's queue job after a fresh look at the tree, before anything is sent.
overwrite: false onto a document or binary file is CONFIRMATION_MISMATCH; an expectedHash
that does not match what is at the path is REMOTE_DRIFT. overwrite: true or a matching
expectedHash confirms replacing a binary, and uncheckedDocumentReplace: true replacing a text
document. expectedHash is a preflight, not a compare-and-swap: the upload route takes no
expected state.
- upload_file declares an outputSchema and returns structuredContent:
{ entityId?, entityType?, path, replaced, hash?, trackChangesActive, writeMode, deprecations? }.
- batch_upload takes uncheckedDocumentReplace, the same opt-in, per file.
- sync_directory takes unplanned: true runs an additive sync without a planToken on
purpose. With a planToken or in mirror mode it is INVALID_ARGUMENT before anything is read.
The result gains planned, whether a planToken checked the call.
- deprecations in the results of upload_file, batch_upload, and sync_directory:
[{ parameter, message, enforcedIn: "0.6.0" }] when a call relied on a default that 0.6.0
removes.
- Diagnostics on stderr. serve writes {"diagnostic":{"tool":…,"code":…}} to stderr when a
call fails (its error code) or relies on a deprecated default (DEPRECATED), and nothing else:
no message, path, or text from Overleaf. Library use: createMcpServer and serveOverStdio
take an optional third argument, and runStdioServer an option, onDiagnostic.
- Tests that guard the contract: tools/list against a committed snapshot, every operation's
annotations against its effects, every destructive operation taking a confirm value or an
expected state (stop_compile excepted), the policy through a real runtime with zero requests
on refusal, and a sentinel string fed through every upstream channel that no serialized error
may contain. CI imports both built entry points by package name.
Deprecated¶
Each of these still works in 0.5.x and lists a deprecations entry in its result. From 0.6.0 it
is refused with nothing sent.
sync_directorywithout aplanToken(parameter: "planToken"). From 0.6.0CONFIRMATION_MISMATCHwithdetails.missing: "planToken"; an additive sync may passunplanned: trueinstead.upload_filereplacing a binary file withoutoverwrite: trueorexpectedHash(parameter: "overwrite"). From 0.6.0 that call isCONFIRMATION_MISMATCH. A document's replacement is governed byuncheckedDocumentReplaceinstead; only an explicitoverwrite: falserefuses one.upload_filereplacing a text document withoutuncheckedDocumentReplace: true(parameter: "uncheckedDocumentReplace"). From 0.6.0INVALID_ARGUMENT, namingwrite_filewithlocalPath.batch_uploadreplacing a file withonConflictomitted (parameter: "onConflict"), or a text document withoutuncheckedDocumentReplace: true. From 0.6.0 no default replaces anything, and the document rule applies to each file.COMPILE_FAILED'sdetails.result, now reduced to{ status }. Removed in 0.6.0, when a failed build returns a parsed summary instead.
Changed¶
download_fileis annotated{ readOnlyHint: false, destructiveHint: true, idempotentHint: false }instead ofreadOnlyHint: true: it writes a local file and can replace one.upload_file'swriteModeistrackedwhen a text document replaced a text document while track changes is on for this account, because Overleaf then records the difference as tracked changes. It always readuntrackedbefore. Its description is rewritten for the new parameters.batch_upload'sonConflicthas no schema default, so an omitted value is told apart from an explicit"overwrite". An omitted value still overwrites and is reported asoverwritein the result;tools/listno longer shows"default": "overwrite".- Path-safe ids. A
projectId,sourceProjectId, orthreadIdholding/,\,.,?,#,%, or a control character isINVALID_ARGUMENTwithdetails.parameter, before any request. Every id in a request path is URI-encoded, and a created project's id that is not path-safe isPROTOCOL_UNSUPPORTED. - Requests stay on
OVERLEAF_BASE_URL's origin. A request that would leave it isINVALID_ARGUMENTbefore it is sent. A request that changes something no longer follows redirects, since fetch would carry the CSRF token to another origin: a redirect to/loginis stillAUTH_EXPIRED, and any other isREMOTE_ERRORwithdetails.status. - Four refusals apply with no policy variable set: a download onto the cookie jar, its lock
or temporary files, or the browser profile, and a local read of any of them, a folder sync of a
folder that holds them included, since an upload or a sync would put the session into a project
(
PATH_OUTSIDE_ROOT,details.kind: "session_files"); an.olignorethat links to a file outside its folder, whose patterns a plan would echo back (PATH_OUTSIDE_ROOT,details.kind: "outside_folder"); and the unsafe ids above. A local path is judged the way the file system resolves it, a symbolic link before the..that follows it, and a dangling link by where it leads. PATH_OUTSIDE_ROOTcarriesdetails.kind:outside_folder, now also on the existing refusal of a symbolic link out oflocalFolderPath,outside_read_roots,outside_write_roots, orsession_files.- A sync upload is checked against the plan. Just before each upload,
sync_directorychecks that a new path is still empty and a changed binary still has the hash the plan compared; otherwise that file fails withREMOTE_DRIFT, which withholds every delete. It used to replace whatever had appeared there. - Error details no longer carry text from Overleaf.
COMPILE_FAILEDdetails are{ status, rootFilePath, result: { status } }, with a status that is not a short identifier (^[a-z][a-z0-9-]{0,63}$) reported asunrecognized. They used to carry the whole compile response underdetails.result.- Socket rejections (
connectionRejected, stillAUTH_EXPIRED), failedjoinDoc,leaveDoc, andapplyOtUpdateacknowledgements,otUpdateError, and Socket.IO error packets no longer put the upstream payload in the message;details.reasonis an identifier for a message this release knows, orunrecognized.otUpdateError'sdetails.message, which could quote the rejected update, is gone. A raw socket error while joining a project isREMOTE_ERRORwith a fixed message. - An upload's or zip import's
errorreachesdetails.overleafErroronly as a short lowercase code. manage_entity'screate_folderresult hascreated: { _id, name }, not Overleaf's raw folder object.- A response that should be JSON and is not is
PROTOCOL_UNSUPPORTEDwith{ path, contentType }. It used to be aREMOTE_ERRORwhose message could quote the body. - The connect-time instructions are 392 words, down from 445, leaving headroom for 0.6.0 and
0.8.0. They now cover confirming replacements,
deprecations, andPOLICY_DENIEDandPATH_OUTSIDE_ROOT, and leave out what the tool descriptions already say. - The
sync_directoryandbatch_uploaddescriptions describe the transition. - Inside the package, tool definitions moved from
src/mcp/tools.tstosrc/contracts/, the argument shaping tosrc/service/, andOverleafToolRuntimebecameOverleafServiceRuntime.McpErrorCodeis derived fromERROR_CODES. The move itself lefttools/listunchanged.
Documentation¶
- The configuration guide has an access policy section, with the four variables, the effects, and
an example. The safety model adds "What changes in 0.6.0", "The access policy is not a
sandbox", the id, origin, and redirect rules, how upstream text is kept out of errors, and
POLICY_DENIEDand thePATH_OUTSIDE_ROOTkinds in its error table. - The tool reference documents the new parameters, a table of what an upload needs by what is at
the path in 0.5.x and from 0.6.0,
download_fileas destructive, anddeprecations. The README tool table gains a Local effect column, and its safety list mentions the policy. - The internals page describes the layers (contracts, service, domain engine) and shows
overleaf-web-mcp/corein use; the development guide covers the interface boundary and the snapshot and contract tests; the private API catalogue covers redirects, non-JSON bodies, and socket error reasons. AGENTS.mdrecords the one-minor rule for tightening a default, which parameters count as confirmation, the policy and boundary rules, and that stdout is reserved underserve.- The roadmap marks v0.5.0 shipped and records how its design settled.
0.4.1 - 2026-10-06¶
The v0.4.x point release. batch_upload sends a list of local files to the project paths given,
creating missing folders, in one call, and download_project_zip saves the whole project as one
zip archive, the backup step before a mirror sync. The server now runs on the v2 MCP SDK and also
serves clients on MCP 2026-07-28, and the documentation no longer overstates what a folder sync
without a planToken, a destructive tool, or an upload that replaces a file guarantees. The
server registers 29 tools. Planned in ROADMAP.md.
Added¶
batch_uploaduploads 1 to 500{ localPath, destinationPath }entries, wheredestinationPathis the full project path including the file name. Every entry is checked before anything is sent: an invalid or duplicate destination, one that is the parent folder of another, a missing local file, or a folder given as one fails the whole call with nothing changed. Missing folders are created once each, parents first; a folder that could not be created is not tried again, and the files under it fail with its error code. Files upload in the order given, one at a time through the project's queue.onConflictisoverwriteby default, replacing what is at the path asupload_filedoes, orskip, which leaves an existing document or file alone and checks again just before each upload. A destination that is a folder, or runs through a file, fails that one file. Failures are per file unlessstopOnError, and nothing is retried. The call also stops at the firstRATE_LIMITED, listing the rest inremainingand sending nothing more, since Overleaf allows about 500 uploads per project in 15 minutes and would refuse them too. Afterwards the tree is read back: an upload that is missing, or a binary whose hash differs, moves tofailedwithREMOTE_ERROR. A timed-out upload is classified from that read-back without being sent again: completed withrecoveredAfterTimeout: truewhen a binary with the local file's hash is at the path,TIMEOUTwhen the path is unchanged (it had not landed, though it could still land late), andOUTCOME_UNKNOWNotherwise, a document included. The result carriesstatus,onConflict,completed,skipped,failed,remaining, andverified. It is annotated destructive and sends progress notifications per file.download_project_zipsaves the whole project, sources and binaries, fromGET /Project/:id/download/ziptolocalPath, withoverwrite(defaultfalse) andtimeoutMs(default 5 minutes, at most 15, for the whole transfer). A missing parent folder isNOT_FOUND, a folder atlocalPathINVALID_ARGUMENT, and an existing file withoutoverwrite: trueCONFIRMATION_MISMATCH, each before any request. The archive is streamed to a temporary file in the same folder, created before the request, so a folder that cannot be written fails first withINVALID_ARGUMENTanddetails.errno; it is never held in memory. It must begin with a zip signature, elsePROTOCOL_UNSUPPORTED, and end with a zip end-of-central-directory record: Overleaf builds the archive while it sends it, so a transfer cut short still arrives with HTTP 200, and that, like a body that stops inside the signature, fails withREMOTE_ERROR, retryable. Either way nothing is written. A complete archive is then renamed into place, so a failed download never destroys an existing file; withoutoverwrite, a file that appeared in the meantime is not replaced. Overleaf allows about 10 downloads per project a minute and sends noRetry-After, soRATE_LIMITEDusually has noretryAfterMsand the description says to wait a minute. The route checks project access rather than the login, so an expired session arrives asPERMISSION_DENIED; the description says to checkauth_status. The end check cannot tell when Overleaf left out a file it failed to read, which it does without an error; the documentation says so. The result is{ projectId, localPath, bytes, replaced }. It changes nothing on Overleaf and is annotated destructive because it can replace a local file.outputSchemaandstructuredContenton both new tools.
Changed¶
- Built on the v2 MCP SDK. The server now depends on
@modelcontextprotocol/server2.3 in place of@modelcontextprotocol/sdk1.x, andserveanswers both protocol eras over stdio. Clients on the 2025-era protocol versions (2024-10-07 through 2025-11-25) connect withinitializeexactly as before; clients on MCP 2026-07-28 are served throughserver/discover, whose result carries the same usage instructions. The existing tools' names, input fields, annotations, and result shapes are unchanged. An install no longer pulls in the v1 SDK's HTTP server stack (Express, Hono, and their dependencies), andnpm audit --omit=devreports no advisories. - The
inputSchemaandoutputSchemaof each tool intools/listnow declare JSON Schema draft 2020-12, the default dialect since MCP 2025-11-25, instead of draft-07. The schemas themselves are unchanged. Tools no longer carryexecution: { taskSupport: "forbidden" }, which is the default when the field is absent. - Calling a tool name the server does not register now fails with JSON-RPC error
-32602instead of returning anisErrorresult. servenow exits when its client closes stdin, releasing the Overleaf session and sockets, instead of waiting for a signal. Tool calls still running at that moment are not answered, as the MCP stdio transport specifies, but get up to 1.5 seconds to finish against Overleaf before the sockets close, so a multi-step operation such ascreate_filewith content is not cut off between its steps.- Library use:
createMcpServer()returns theMcpServerclass from@modelcontextprotocol/server. Connecting it by hand withconnect()serves 2025-era clients only; the newserveOverStdio(runtime, transport?)serves both eras, asservedoes, and returns a connection withclose()andwhenIdle(timeoutMs). CONFIRMATION_MISMATCHalso coversdownload_project_zipcalled on an existing local file withoutoverwrite: true.download_filekeepsINVALID_ARGUMENTfor the same case.upload_file's description is corrected after a read of Overleaf's source. It no longer says a replacement keeps the entity ID: a replaced text document keeps it, and a replaced binary file may get a new one. It no longer says replacing a document is never tracked: Overleaf may record it as tracked changes when track changes is already on for this account. The result'swriteModestill readsuntrackedin that case; v0.5.0 resolves it. The tool's behaviour is unchanged.- The
INVALID_ARGUMENTmessage for Overleaf'sduplicate_file_nameupload rejection now says an entity the upload cannot replace, usually a folder, already has that name. It used to say a text document cannot replace a binary or the reverse, which Overleaf in fact allows.details.overleafErroris unchanged. - The connect-time instructions mention
batch_uploadfor a list of files, offerdownload_project_zipas a backup before a mirror sync, and no longer say an upload is never tracked, within the 450-word bound (445 words).
Documentation¶
- Corrections planned for v0.5.0, shipped early. The README, the documentation home page, and
the safety model now make the folder-sync guarantee conditional on a
planToken: without one,sync_directoryhas nothing to compare against. The README's "each one confirms by value" now names the destructive tools that do not:upload_file,batch_uploadwith its defaultonConflict,stop_compile, andsync_directoryin additive mode. The safety model says aplanTokenrecords whatplan_syncobserved rather than a person's approval, and that afailedentry in a per-item result leaves the earliercompletedentries applied. - The tool reference, safety model, usage guide, internals page, and private API catalogue cover the two new tools, and the README lists them. The usage guide adds the zip backup before a mirror sync.
- The tool reference, safety model, and private API catalogue no longer say an upload keeps a
binary's entity id or is never tracked, and no longer say uploading over the other kind of
entity fails. They state Overleaf's upload, folder-creation, and download rate limits, that an
expired session reaches
download_project_zipasPERMISSION_DENIED, and that Overleaf can leave a file it failed to read out of an otherwise complete archive. - The README and the documentation site show the package's all-time npm downloads. A weekly
Download countworkflow sums them from npm's downloads API, one year at a time so npm's 18-month limit cannot shorten the total, and publishes the badge data to thebadgesbranch, so the badge stays current on npmjs.com without a release andmaingets no weekly commits. - The roadmap gains an "Interfaces beyond MCP" section (one engine behind MCP, a command line,
and a TypeScript library, with HTTP, Git, WebMCP, and A2A as conditional triggers rather than
stages) and three new stages: v0.5.0 shared core and safety, v0.7.0 CLI, SDK, and Skills, and
v0.8.0 tracked-change review (accept and reject). Compile and build ergonomics moves from
v0.5.0 to v0.6.0 and multi-file documents from v0.6.0 to v0.9.0. v1.0.0 becomes "Hardening and
compatibility" (a
doctorcommand, backend capabilities, and an MCP protocol compatibility matrix), and Stage 0 checks the v2 SDK packages. - The roadmap marks v0.4.0 shipped and records how the point release's design settled: a
skippedlist and averifiedflag, timed-out uploads classified rather than resent,CONFIRMATION_MISMATCHfor an existing local file, a streamed download with an atomic replace and an end-record check, andtimeoutMs. It records what a read of Overleaf's source found (replaced binaries may get a new id, replacing a document can be tracked, whatduplicate_file_namemeans, and the rate limits), corrects its "What already works well" and Stage 0 notes to match, and adds a v0.5.0 task to resolveupload_file'swriteModewhen track changes is on. Its v0.5.0 documentation-corrections task is marked done.
0.4.0 - 2026-09-27¶
Bulk and sync operations. Bringing one folder up to date used to take a hand-rolled hash
comparison and a tool call per file: the session the roadmap was written from spent 24 calls on
it, 20 of them single deletes. plan_sync and sync_directory now do it in two, and
delete_entities removes a list of entities in one. The server registers 27 tools. Planned in
ROADMAP.md.
Added¶
plan_synccompares a local folder with the project, or with one project folder throughdestinationFolderPath, and changes nothing. Binary files compare by the git blob hash already in the tree; text documents are read and compared as LF-normalized text. It returnstoUpload(new or changed, withcomparedByandremoteType),identical(a count and the first 25 paths unlessverbose),remoteOnly(what mirror mode would delete, each folder collapsed to one entry with acontainscount),conflicts(a file where the other side has a folder, or non-UTF-8 text where the project has a document),ignored, and aplanToken.sync_directoryapplies a plan inadditiveormirrormode, which must always be given. With aplanTokenit first compares both sides with the plan again and fails withREMOTE_DRIFT, changing nothing, if either one moved, identical files included. Changed documents are replaced through revision-checkedwrite_fileedits, so an edit made during the sync fails that one file withREVISION_CONFLICT; binaries and new files are uploaded, and missing folders are created. WithwriteMode: "tracked", changed documents are written as tracked changes and new text files are created with tracked content, since an upload is never tracked. Uploads and writes run first and are confirmed in the tree; deletes run only in mirror mode, only withconfirmDeleteCountequal to the planned count, never after any upload or write failed, and each entity is re-checked just before it is deleted. Failures are per file and nothing is retried. The result carriesstatus,completed,failed,remaining,identicalCount, and aplanTokenthat resumes a partial run while still stopping for a change someone made in between.delete_entitiesdeletes a list of paths onceconfirmCountequals its length. Every path is resolved before any is deleted, so a missing one fails the call withNOT_FOUNDand changes nothing; a duplicate, or a path inside a listed folder, isINVALID_ARGUMENT.- Ignore rules for folder sync. Gitignore-style patterns: by default
.git/,.DS_Store, hidden files and folders,__MACOSX/, and LaTeX build output (*.aux,*.log,*.bbl,*.blg,*.out,*.toc,*.synctex.gz,*.fdb_latexmk,*.fls), then a.olignorefile in the folder, then theignoreparameter, so!patternre-includes. A path an ignore rule matches is protected on the project side too and is never compared or deleted. REMOTE_DRIFTfor a sync whose plan no longer matches the project or the local folder, withdetails.changedset toremote,local, orboth, andPATH_OUTSIDE_ROOTfor a symbolic link that leads out oflocalFolderPath.- Progress notifications. The three new tools send
notifications/progresswhile documents are read and files are applied, when the client supplies a progress token. outputSchemaandstructuredContenton the three new tools.- A gated live test (
RUN_OVERLEAF_LIVE_SYNC_TESTS=1) that mirrors a temporary folder into a throwaway project, checks that a second plan finds nothing to do, and trashes the project. - New runtime dependency:
ignore, for gitignore-compatible pattern matching.
Changed¶
CONFIRMATION_MISMATCHalso coversconfirmCountandconfirmDeleteCount, including a mirror sync called withoutconfirmDeleteCount.- The initialize instructions gain a paragraph on folder sync, and the rest is tightened so the whole stays under the 450-word bound the test enforces.
- Releases can be published from GitHub Actions. Running the
Publish to npmworkflow onmainwith a version checks it againstpackage.jsonand this changelog, runs the checks, publishes to npm with trusted publishing, and then creates thevX.Y.Ztag and the GitHub Release with the changelog section as its notes. Publishing a GitHub Release by hand works as before.
Documentation¶
- A "Folder sync and bulk delete" section in the tool reference, with the comparison rules, the ignore rules, and the order in which a sync applies changes.
- The safety model covers what a plan token guarantees and what it does not, and lists the two new error codes. The usage guide's manual hash comparison is replaced by the two-call workflow.
- The README lists the three tools, and its comparison table now marks folder comparison as supported, where it was binaries only.
- The tool reference's
auth_statusentry listssessionExpiresAt, added in 0.3.0 but missing from that page until now. AGENTS.mdrecords the sync invariants contributors must keep and the new confirm-by-value parameters.- The roadmap marks the first v0.4.0 release shipped and records how the design changed on the
way: a stateless plan token that covers both sides,
destinationFolderPath, aconflictslist, and noonConflictoption.batch_uploadanddownload_project_zipfollow in a point release.
0.3.2 - 2026-09-22¶
Documentation only. No tool was added, removed, or changed in schema or result shape; the server still registers 24 tools.
Documentation¶
- "How it compares" in the README: a capability table comparing this server with the three
most-starred Overleaf MCP servers and the two closest in design, each checked against its own
source code, with numbered notes for every partial entry. The related-projects table in the
internals page now lists
olcliand describesoverleaf-mcp-rtcorrectly. - An updated workflow illustration in the README and the package.
0.3.1 - 2026-09-22¶
Proxy support. On a network that allows outbound traffic only through an HTTP proxy, listing
projects could work while every project tool failed with ENOTFOUND, because the collaboration
WebSocket never used the proxy. Reported, diagnosed, and first fixed by
@Yusuf00Aras in
#6. No tool was added or removed, and no
schema or result shape changed; the server still registers 24 tools.
Fixed¶
- REST requests, the Socket.IO handshake, and the collaboration WebSocket all honour
HTTPS_PROXY,HTTP_PROXY, andNO_PROXY, and always take the same route. The server resolves one proxy forOVERLEAF_BASE_URLat startup and applies it to every connection. Previously REST requests used a proxy only on recent Node releases withNODE_USE_ENV_PROXY=1, and the WebSocket never did. The variable follows the base URL's scheme, lowercase names take precedence, a barehost:portmeans an HTTP proxy, andNO_PROXYmatches a host and its subdomains, optionally by port. This now works on Node 20, with noNODE_USE_ENV_PROXYneeded. - An unusable proxy value fails at startup with
INVALID_ARGUMENTnaming the variable, for example a SOCKS URL or one that does not parse. The message never includes the value, which can hold credentials, and proxy credentials are never printed.
Changed¶
- A proxy variable set in the server's environment now takes effect on every supported Node
version. If Overleaf is reachable directly while such a variable is set for other tools, list
its host in
NO_PROXY. - New runtime dependencies:
undicifor proxied REST requests andhttps-proxy-agentfor the proxied WebSocket.
Documentation¶
- "Behind a proxy" in the configuration guide, the proxy variables in its reference table, and a troubleshooting entry for networks that require a proxy.
0.3.0 - 2026-09-14¶
Session keepalive. Overleaf's web session lasts five days from its last use and is refreshed by
every request, so a saved session that went unused for five days made the server exit at startup
with AUTH_EXPIRED on stderr, which MCP clients surface only as "Connection closed". No tool was
added or removed; the server still registers 24 tools.
Added¶
overleaf-web-mcp keepalive, a CLI command that runs the server's startup bootstrap, merges the refreshed session cookie into the jar, printsrefreshed,baseUrl,sessionExpiresAt, anduserId, and exits. Against a dead session it exits with status 1 and theAUTH_EXPIREDerror on stderr, so a scheduler can alert on it. Daily scheduling withlaunchd,cron, and Task Scheduler is documented in the configuration guide.auth_statusreportssessionExpiresAt, the earliest deadline among the cookies sent to Overleaf, as ISO 8601. The field is absent when no cookie carries a deadline.auth_statusnow declares anoutputSchemaand returnsstructuredContent; its other fields are unchanged.- A table of all 24 tools in the README, grouped as in the tool reference, with a test that fails if a registered tool is missing from it.
Fixed¶
- The cookie jar now persists the session deadline. The Netscape serializer read
expires, which tough-cookie leaves unset for aMax-Agecookie, so the session cookie was written with expiry0and its five-day deadline was lost on every save. It now usesexpiryTime(), which accounts forMax-Age. Behaviour was otherwise unaffected, since a cookie without an expiry is still sent; what was missing was any way to persist or report the deadline. - Domain cookies are written with the include-subdomains flag set and a leading dot, derived
from tough-cookie's
hostOnlyrather than from a leading dot it had already stripped. The server read its own jar correctly either way; other Netscape readers,curlincluded, treated the session cookie as host-only and did not send it towww.overleaf.com. Jars written by earlier releases keep loading exactly as before.
Changed¶
- The initialize instructions mention
sessionExpiresAtand the keepalive command.
Documentation¶
- "Keeping the session alive" in the configuration guide, a troubleshooting entry for a client that reports only "Connection closed" at startup, and a note on the five-day limit in the README's sign-in step.
- The roadmap makes session keepalive its own shipped stage, moves bulk sync to v0.4.0 with
plan_sync,sync_directory, anddelete_entitiesfirst, and renumbers the later stages.
0.2.1 - 2026-09-10¶
Documentation only. No tool was added, removed, or changed in schema or result shape; the server still registers 24 tools.
Changed¶
- The example project names in the README, the documentation site, and the roadmap are now generic placeholders, consistent with the other examples around them. They previously named a real project.
0.2.0 - 2026-09-10¶
Project lifecycle. Until now every tool took an existing projectId, so an agent could not create,
rename, trash, or configure a project without a person doing it in the web UI. The server now
registers 24 tools. Planned in ROADMAP.md,
which this release also merges with a second draft into one document with per-stage tasks and
acceptance criteria.
Added¶
create_project,clone_project, andimport_project_zipcreate a project from a name, an existing project, or a local.ziparchive, and returnprojectId,name,url, and (forcreate_project)rootDocPath. A blank project still holds Overleaf's stubmain.tex; the descriptions say so and point atupdate_project_settings.manage_projectrenames, trashes, restores, archives, unarchives, or permanently deletes a project.trash,archive, anddeleterequireconfirmNameto equal the current project name exactly, anddeleteonly succeeds on a project that is already trashed, following Overleaf's own trash-first model.update_project_settingspersists the root document (rootFilePath, which must resolve to a text document),compiler, TeX LiveimageName, orspellCheckLanguagein the project, so the web editor's Recompile follows the change. It returns the settings as re-read from a fresh project join.list_projectsfilters:query(case-insensitive substring),includeArchived,includeTrashed(both defaultfalse),limit(default 50, at most 200), andsort(lastUpdated, newest first, orname).RATE_LIMITEDerror code for HTTP 429, retryable, withdetails.retryAfterMsparsed fromRetry-Afterwhen Overleaf sends it. Zip import and project creation are the routes Overleaf throttles first.CONFIRMATION_MISMATCHerror code for every confirm-by-value failure (confirmPath,confirmName). Nothing is changed when it is returned.outputSchemaandstructuredContenton the five new tools and onlist_projects. The JSON text block is still returned for clients that do not read structured results.get_project_treereportsspellCheckLanguagealongsidecompilerandimageName.docs/private-api.mdcatalogues every Overleaf route the server calls, the fields it sends and reads, and the error code each failure maps to.- A gated live test (
RUN_OVERLEAF_LIVE_LIFECYCLE_TESTS=1) that creates a disposable project, sets its root document, compiles it, and trashes it. It never deletes permanently. - Usage instructions in the MCP initialize response. The server now sets the MCP
instructionsfield, so clients that surface it (Claude Code among them) give the model the safety contract, read before write, revision handling,upload_filesemantics, confirmations, compile allowance, and what to do onAUTH_EXPIRED, without anyone pasting the README into a prompt. Exported asSERVER_INSTRUCTIONS; a test keeps it under 450 words. - Documentation site at https://mhmdaskari.github.io/overleaf-web-mcp/, built with MkDocs
Material from
docs/and deployed by GitHub Actions on every push tomain. It holds the full tool reference, safety model, configuration, internals, development guide, roadmap, and this changelog. AGENTS.mdfor coding agents contributing to the repository, with the rules that must keep holding, test expectations, and the release steps.CLAUDE.mdimports it for Claude Code.
Changed¶
list_projectsreturns an object instead of a bare array:{ projects, totalMatched, totalProjects }, where each project carriesid,name,accessLevel,lastUpdated,archived, andtrashed. Archived and trashed projects are hidden by default, and the default order is newest first rather than by name. The list now comes from the dashboard endpoint (POST /api/project) instead of the legacyGET /user/projects, and its shape is validated; an unexpected shape surfaces asPROTOCOL_UNSUPPORTED.auth_status.projectCountcounts every project the account can access, archived and trashed included, through the same endpoint.manage_entitywith a wrongconfirmPathnow fails withCONFIRMATION_MISMATCHinstead ofINVALID_ARGUMENT. The message is unchanged.- The initialize instructions gain a paragraph on project lifecycle and
confirmName; they remain under the 450-word bound the test enforces. - README rewritten for people. It now leads with what you can say to an assistant, a three-step install, what the server can do, and how it keeps a project safe, in plain language, and links to the site for everything else. The tool tables, the configuration table, the protocol notes, and the step-by-step workflows moved to the documentation site.
- The tool-count test now checks the README badge and the docs tool reference instead of two places in the README.
Documentation¶
- A "from nothing to a compiled PDF" walkthrough in the usage guide that needs no web-UI step.
- The README and site list the lifecycle tools, and the related-projects section states that web-session peers also offer tracked changes while Git-bridge servers need a paid plan and bypass tracked changes.
- The roadmap is one merged document with a Stage 0 verification checklist, conventions, tool signatures, tasks, acceptance criteria, an error taxonomy, and a competitive table.
0.1.3 - 2026-09-01¶
Documentation, metadata, and small additive fixes. No tools were added or removed; the server still registers 19 tools. Planned in ROADMAP.md.
Changed¶
get_project_treenow returns an object instead of a bare array. The entities are underentities, alongsiderootDocPath,compiler,imageName,trackChangesActive, and ahashNotedescribing the hash format. Callers that iterated the result directly must now iterateresult.entities. This is the only response-shape change in this release.compile_project.rootFilePathis now optional. Omitted, it compiles the root document configured in Overleaf itself, matching the web UI's Recompile button. A project with no configured root and norootFilePathreturnsINVALID_ARGUMENTinstead of failing to resolve a path. Its description no longer leaks the internalrootDoc_idparameter name.upload_fileis annotateddestructiveHint: true. It replaces an existing entity at the destination path in place, so the previousdestructiveHint: falsemisdescribed it.upload_filereturns a normalized result:entityId,entityType,path,replaced, and, for binary files,hash. Overleaf's raw response is no longer passed through under anuploadkey.compile_projectresults now includerootFilePath, the document actually compiled.download_fileno longer silently overwrites a local file. It fails withINVALID_ARGUMENTunless the newoverwriteparameter istrue, and returnslocalPathalongsidebytes.
Added¶
write_fileacceptslocalPathas an alternative tocontent, mutually exclusive with it. This keeps a whole-file replacement revision-checked and optionally tracked without sending the file through the MCP client's tool-argument budget. Non-UTF-8 content is rejected rather than written as replacement characters, and a leading byte order mark is stripped.upload_fileacceptsdestinationName, so a local file can be stored under a different name in the project.- Overleaf's upload rejections are translated into actionable errors. Overleaf reports
duplicate_file_name,invalid_filename,project_has_too_many_files, andfolder_not_foundas HTTP 422; these now surface asINVALID_ARGUMENTwith an explanation and the original code indetails.overleafError, instead of a bareREMOTE_ERROR. Only a short lowercase identifier is ever propagated, so no response content can leak through an error. - Continuous integration on pushes and pull requests running type-check, lint, tests, build, and the packed-file check. Previously these ran only when a release was published.
- ROADMAP.md describing the planned path from 0.1.3 to 1.0.0.
- This changelog.
Documentation¶
- The
hashfield is documented as a git blob hash,sha1("blob " + byteLength + "\0" + content), identical togit hash-object <file>. Plainsha1sumnever matches. The hash is present only on binaryfileentities; Overleaf stores no content hash fordocentities. upload_file's upsert semantics are documented, including that Overleaf decidesdocversusfileby extension and UTF-8 validity, that it is a valid way to replace.tex,.bib, and.bstdocuments from disk, and that replacing a document this way is a blind, untracked write.- A decision table for
write_fileversusupload_file, and the real document and update size limits, so callers no longer have to guess a size threshold. - A worked example of the hash-comparison workflow for uploading only changed binaries.
- A test asserts the README's tool count matches the registered tool list, so the badge cannot drift.
0.1.2 - 2026-07-20¶
- Project history monitoring through
monitor_project_history. - Tracked document writes through
writeModeonwrite_file,create_file, andwrite_section.
0.1.1 - 2026-07-16¶
- Documentation and packaging corrections.
0.1.0 - 2026-07-15¶
- First release: browser-assisted session capture, project and file management, revision-checked and section-level writing, compilation, and review comments.