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
.texfiles - 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:
- Sign in at overleaf.com.
- Open DevTools -> Network, reload the project list, click any
overleaf.comrequest, and copy the fullCookierequest 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 ./output)
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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file overleaf_connect-0.1.0.tar.gz.
File metadata
- Download URL: overleaf_connect-0.1.0.tar.gz
- Upload date:
- Size: 22.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
549b6c25fa5b94602c87e47cce4018d3e0b5e13d9e55605e63a3d5ac1a6081e7
|
|
| MD5 |
439478ed08bdd0a572fdca15f07e5bd9
|
|
| BLAKE2b-256 |
bf24c6bb7f9c697f9489bab77baa53ee03125765c2161844c1cc1200e0b5d6d5
|
Provenance
The following attestation bundles were made for overleaf_connect-0.1.0.tar.gz:
Publisher:
release.yml on flafkus/overleaf-connect
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
overleaf_connect-0.1.0.tar.gz -
Subject digest:
549b6c25fa5b94602c87e47cce4018d3e0b5e13d9e55605e63a3d5ac1a6081e7 - Sigstore transparency entry: 2733101237
- Sigstore integration time:
-
Permalink:
flafkus/overleaf-connect@832af667f6a5c4662bddd400f901ebd55c76c1b6 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/flafkus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@832af667f6a5c4662bddd400f901ebd55c76c1b6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file overleaf_connect-0.1.0-py3-none-any.whl.
File metadata
- Download URL: overleaf_connect-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a766c8f50f4f268e6358ffbac969210f557bf2ec835d153bd9adbe12aaefd9a
|
|
| MD5 |
d5808d860bf02ac10032cb9ad33c277b
|
|
| BLAKE2b-256 |
ea4da2bc9e68d89d010b07a0bcdc695d476c8e5e4e2441565f35f7cc693f4b2c
|
Provenance
The following attestation bundles were made for overleaf_connect-0.1.0-py3-none-any.whl:
Publisher:
release.yml on flafkus/overleaf-connect
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
overleaf_connect-0.1.0-py3-none-any.whl -
Subject digest:
0a766c8f50f4f268e6358ffbac969210f557bf2ec835d153bd9adbe12aaefd9a - Sigstore transparency entry: 2733101328
- Sigstore integration time:
-
Permalink:
flafkus/overleaf-connect@832af667f6a5c4662bddd400f901ebd55c76c1b6 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/flafkus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@832af667f6a5c4662bddd400f901ebd55c76c1b6 -
Trigger Event:
release
-
Statement type: