overleaf-paper-mcp
Manages academic LaTeX projects in Overleaf, including creating projects, transferring files, compiling documents, inspecting compiler output, and downloading PDFs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@overleaf-paper-mcp compile the paper and download the PDF"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
overleaf-paper-mcp
MCP server for managing academic LaTeX projects in Overleaf: create projects, transfer files, compile documents, inspect compiler output, and download PDFs.
Install
Requirements: Node.js 20+ and Playwright Chromium.
npm install
npx playwright install chromium
npm run buildRun the published package with:
OVERLEAF_EMAIL="your@email.com" \
OVERLEAF_PASSWORD="yourpassword" \
npx -y @youzhijc/overleaf-paper-mcpRelated MCP server: Overleaf MCP Server
Configuration
Provide credentials as runtime environment variables; do not commit a .env
file.
Variable | Purpose |
| Overleaf login email. |
| Overleaf login password. |
| Recommended absolute root for all MCP-managed local resources. Downloads are kept in |
| Legacy alternative for the workspace only. Use |
Use absolute paths for local_path and zip_path when possible. Relative paths
are accepted only inside OVERLEAF_DATA_DIR/workspace (or the legacy
OVERLEAF_WORKSPACE_DIR). With OVERLEAF_DATA_DIR, all local state is kept
below one directory:
OVERLEAF_DATA_DIR/
├── workspace/ # downloaded project files and PDFs
└── browser-data/ # Overleaf login session and browser cacheDo not upload or share browser-data/: it can contain your Overleaf login
session. Delete workspace/ to clear downloads, browser-data/ to sign out,
or the full data directory to reset the MCP.
Workflow
overleaf_list_files (optional)
→ overleaf_download_file
→ edit the local file
→ overleaf_upload_file (overwrite: true when replacing a file)
→ overleaf_compile
→ overleaf_download_pdfoverleaf_compile always inspects output.log: a rendered PDF does not prove
that LaTeX completed without errors. If the log contains an error, it clears
cached files and retries once; persistent errors return parsed diagnostics plus
the compiler log. Successful results may still contain warnings.
overleaf_upload_file currently writes to the project root. To import a full
project archive, use overleaf_create_project_from_zip.
Tools
Tool | Purpose |
| Check server availability. |
| Start or close the browser session. |
| Find or open a project. |
| Create an empty project. |
| Create a project from a local ZIP archive. |
| List project files and paths. |
| Transfer one project file. |
| Create empty root-level items. |
| Rename or delete a file. |
| Compile and, after a failed retry, return LaTeX diagnostics and output.log. |
| Download the compiled PDF. |
Codex configuration
[mcp_servers.overleaf-paper-mcp]
command = "npx"
args = ["-y", "@youzhijc/overleaf-paper-mcp"]
env = {
OVERLEAF_EMAIL = "your@email.com",
OVERLEAF_PASSWORD = "yourpassword",
OVERLEAF_DATA_DIR = "/absolute/path/to/your/overleaf-paper-mcp-data"
}
startup_timeout_sec = 120
tool_timeout_sec = 120License
MIT
Available Tools
16 toolsoverleaf_compileA
Compile an Overleaf project after uploading source or resource changes. This tool always inspects output.log because a PDF can render despite LaTeX errors. If any error is found, it clears cached files and retries once; a persistent error returns parsed diagnostics and output.log. Successful results can include warnings. This is the only compilation-diagnostics tool.
Inputs: project_id (required).
overleaf_create_fileA
Create one empty root-level file. Usually unnecessary because overleaf_upload_file creates a new root-level file when no same-named file exists; use only when an empty file is specifically needed.
Inputs: file_name (required), project_id (required).
overleaf_create_folderA
Create one folder in the project root. Use only for an empty folder; nested paths are not supported yet and uploads currently target the project root.
Inputs: project_id (required), folder_name (required).
overleaf_create_projectA
Create a new empty Overleaf project. Use when starting a paper from scratch; then upload locally prepared source files with overleaf_upload_file.
Inputs: project_name (required).
overleaf_create_project_from_zipA
Create a new Overleaf project from a local ZIP archive. Use for importing a complete existing paper; this creates a separate project and never overwrites one.
Inputs: zip_path (required), project_name.
overleaf_delete_fileA
Delete exactly one project file. First call with confirm omitted/false to inspect it; call again with confirm: true only after the user explicitly approves that exact path.
Inputs: file_path (required), project_id (required), confirm.
overleaf_download_fileA
Primary file-reading tool: download exactly one Overleaf file under OVERLEAF_DATA_DIR/workspace/files/<project_id>/ and return its path. To modify a paper, download it, edit the returned local file, then call overleaf_upload_file with overwrite: true.
Inputs: file_path (required), project_id (required).
overleaf_download_pdfA
Download the latest compiled PDF. Call overleaf_compile first and download only after a successful compilation; saves under OVERLEAF_DATA_DIR/workspace/pdfs/<project_id>/.
Inputs: project_id (required), filename.
overleaf_list_filesA
List every project file, including nested files and sizes, by downloading and inspecting the project ZIP. Use when a complete, path-accurate inventory is needed; it is slower than single-file download.
Inputs: project_id (required).
overleaf_list_projectsA
List the logged-in user's Overleaf projects and their IDs. Use this first when the project ID is unknown.
Inputs: no named parameters.
overleaf_loginA
Open Overleaf and establish a reusable authenticated browser session using runtime environment variables. Call this before other Overleaf actions if no session exists.
Inputs: no named parameters.
overleaf_logoutA
Close the reusable Overleaf browser session and release its browser resources. Call once at the end of a bounded Overleaf task only when the user has indicated that no further Overleaf work is needed; do not close it between ordinary tool calls.
Inputs: no named parameters.
overleaf_open_projectA
Open a project in the browser by its project ID. File tools open projects automatically, so use this mainly to inspect or recover the visible Overleaf UI.
Inputs: project_id (required).
overleaf_rename_fileA
Rename an existing project file without changing folders. List files first to obtain the exact old_path; this cannot move a file between folders.
Inputs: new_name (required), old_path (required), project_id (required).
overleaf_upload_fileA
Primary file-writing tool: upload one local file to the project root. Use after editing a file obtained with overleaf_download_file, or to add images, .bib, .cls, and .tex files. A same-named file is preserved unless overwrite: true is intentionally supplied; ZIP import uses overleaf_create_project_from_zip instead.
Inputs: local_path (required), project_id (required), overwrite.
pingA
Check that the MCP server is alive and reachable
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Most tools are clearly distinct by action and resource (auth, project, file, compile/PDF), and descriptions explicitly disambiguate edge cases such as create_project vs create_project_from_zip. There is slight overlap between create_file and upload_file for creating new files, and open_project serves a niche 'inspect UI' purpose, but both are hedged clearly enough to avoid significant misselection.
The dominant pattern overleaf_verb_noun is used consistently across all file and project operations. The exceptions are ping (missing the overleaf_ prefix) and login/logout/compile (verb-only), which are minor and conventional deviations.
With 16 tools, the set sits just above the ideal 3-15 range. Ping, open_project, and create_file add marginal value and make it feel slightly heavy, though no tool is truly out of place in the Overleaf workflow.
The tool surface covers the core lifecycle well: auth, project creation (empty/zip), project listing, file CRUD (download/upload/rename/delete), compilation, and PDF download. Gaps include project deletion, folder deletion/rename/move, and nested-folder or nested upload support, but these are workable limitations rather than blocking dead ends.
Maintenance
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
Hosted MCP server: convert PDFs to clean, LLM-ready Markdown with tables, formulas and OCR.
Design, publish and render PDF templates with Typst. Full template lifecycle over MCP.
Academic research MCP server for paper search, citation checks, graphs, and deep research.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA real-time MCP server that enables AI coding agents to read, write, and compile LaTeX projects in self-hosted Overleaf instances via native OT protocol.97 npm13AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceMCP server for interacting with Overleaf projects, enabling project listing, file reads, LaTeX section discovery, and revision-guarded writes through natural language.AGPL 3.0
- AlicenseAqualityCmaintenanceEnables AI agents to read, write, compile, and manage Overleaf projects through MCP, including file operations, project administration, and LaTeX compilation diagnostics.169 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to read, edit, upload, compile, and manage projects in a self-hosted Overleaf Community Edition via MCP, while also providing a git remote for cloning and pushing changes.1MIT