Skip to main content

overleaf-connect

An MCP server to have agents use Overleaf for free.

Once it's connected, an agent can:

  • create or duplicate projects
  • list, read, write, and edit .tex files
  • compile a project and pull the PDF back locally

Installation

If you dont have uv installed, install it.

It needs your Overleaf session cookie to do anything, so grab that first:

  1. Sign in at overleaf.com.
  2. Open DevTools -> Network, reload the project list, click any overleaf.com request, and copy the full Cookie request header.

Copy over this for the OVERLEAF_SESSION environment variable in the MCP server.

Claude Code

claude mcp add overleaf -e OVERLEAF_SESSION="overleaf_session2=s%3A...; GCLB=..." -- uvx overleaf-connect

Claude Desktop

Open Settings -> Developer -> Edit Config and add an overleaf entry under mcpServers (keep any servers you already have):

{
  "mcpServers": {
    "overleaf": {
      "command": "uvx",
      "args": ["overleaf-connect"],
      "env": {
        "OVERLEAF_SESSION": "overleaf_session2=s%3A...; GCLB=..."
      }
    }
  }
}

Afterwards, restart Claude Desktop to reload the MCP servers and get Overleaf connected.

Authentication

Overleaf issues a fresh cookie on every request. After the first success the server saves the rotating value to:

  • Windows: %LOCALAPPDATA%\overleaf-connect\session.json
  • macOS / Linux: ~/.overleaf-connect/session.json

The OVERLEAF_SESSION environment variable is treated as a seed - the server will automatically refresh the session whenever requests are done to Overleaf, and store it. You only need to change it in the future if the cookie has expired from not using it.

Optional environment variables

OVERLEAF_HOME_DIR=...      # directory that holds session.json
OVERLEAF_SESSION_FILE=...  # exact session.json path
OVERLEAF_CACHE_DIR=...     # compiled-PDF cache
OVERLEAF_OUTPUT_DIR=...    # allowed download_pdf destination root
                          # (default: ~/Downloads/overleaf-connect, or
                          #  ~/Documents/overleaf-connect, else ~/overleaf-connect)

Tools

Tool What it does
status check if session cookie works
list_projects id, name, last updated
create_project blank project
duplicate_project clone an existing project
list_files paths in a project
read_file text contents of a file (full=true for files over 100k chars)
write_file whole-file create/replace
edit_file exact old/new string replace in a file
compile_project Overleaf compile -> cached output.pdf + parsed errors
download_pdf compile and copy the PDF under OVERLEAF_OUTPUT_DIR
trash_project move a project to Overleaf trash

Writes replace the whole file, so write_file refuses to write back a file that was only read in part - read it again with full=true, or use edit_file. Don't edit a file while someone is typing in it in the browser.

Metadata

Release files for overleaf-connect 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for overleaf-connect 0.1.1
File Size Uploaded Provenance Actions
overleaf_connect-0.1.1.tar.gz 23.2 kB With provenance Details for overleaf_connect-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for overleaf-connect 0.1.1
File Interpreter ABI Platform Actions
overleaf_connect-0.1.1-py3-none-any.whl Python 3 none any Details for overleaf_connect-0.1.1-py3-none-any.whl

Total release size: 43.2 kB

Release files / overleaf_connect-0.1.1.tar.gz

Download URL overleaf_connect-0.1.1.tar.gz
Size 23.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bc80798b077ee1509402e3d8f8649c5f6a70ab25a95c95d971ee641aabfd3d1a
BLAKE2b-256 checksum
How to use checksums
fbe3675ce8a670672d04369f3489b95200917898116ff137b2660581b9ee54a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release files / overleaf_connect-0.1.1-py3-none-any.whl

Download URL overleaf_connect-0.1.1-py3-none-any.whl
Size 20.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f25fdc979ec47394f981e2338c17c0e64fa492ae5ef1e188dbd2b0716607706
BLAKE2b-256 checksum
How to use checksums
95a98a89641c77dfb541a211600c6e0d382a5995d87a29165cbf5bfb13d9d22f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Security for overleaf-connect 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for overleaf_connect-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page