overleaf-mcp-plus
v0.3.2The most comprehensive MCP server for Overleaf — full CRUD, compile, PDF download, git history, diff, and more.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
create_file Create File
Create a new file in an Overleaf project. Auto-creates parent folders. Commits and pushes immediately.
| Parameter | Type | Description |
|---|---|---|
content * | string | File content |
file_path * | string | Path for the new file (e.g. 'chapters/intro.tex') |
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
commit_message | string | Git commit message |
create_project Create Project
Create a new blank Overleaf project via the web API. Requires OVERLEAF_SESSION env var (session cookie).
| Parameter | Type | Description |
|---|---|---|
name * | string | Project name |
list_projects List Projects
List all Overleaf projects in your account. Requires OVERLEAF_SESSION env var. Returns project names and IDs — use any ID with other tools.
list_files List Files
List files in an Overleaf project, optionally filtered by extension.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
extension | string | Filter by extension (e.g. '.tex', '.bib'). Empty = all. |
read_file Read File
Read the contents of a file from an Overleaf project.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the file |
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
verify_citations Verify Citations
Detect likely-hallucinated references in the project's bibliography. Reads the project's .bib file(s), then verifies each entry's DOI / arXiv id against free authoritative catalogues (CrossRef, arXiv) with ZERO LLM calls. Returns three buckets: verified (catalogue match), suspicious (a concrete identifier that definitively does NOT resolve — high-confidence), and unverifiable (no identifier / coverage gap / book / rate-limit — reported separately and NEVER as fabrication). Use to sanity-check an AI-assisted draft's citations before submission.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
bib_path | string | Optional explicit path to a .bib file. Omit to auto-discover every .bib in the project. |
get_sections Get LaTeX Sections
Parse a LaTeX file and extract its section/subsection structure. Returns types, titles, hierarchy levels, and content previews.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the LaTeX file |
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
get_section_content Get Section Content
Get the full content of a specific LaTeX section by its title.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
section_title * | string | Section title to retrieve |
list_history List Git History
Show git commit history for the project.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
file_path | string | Filter to a specific file |
limit | integer | Max commits (default 20, max 200) |
since | string | Git --since filter (e.g. '2.weeks', '2025-01-01') |
until | string | Git --until filter |
get_diff Get Git Diff
Get a git diff between refs or the working tree. Useful for reviewing recent changes.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
context_lines | integer | Diff context lines (0-10, default 3) |
file_path | string | Filter to a specific file |
from_ref | string | Start ref (e.g. 'HEAD~3', commit hash). Default: HEAD |
max_chars | integer | Truncate diff to N chars (default 120000) |
to_ref | string | End ref. Omit for working tree. |
status_summary Project Status Summary
Get a quick overview: file count, structure of main .tex file, project status.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
edit_file Edit File
Surgical search-and-replace edit in a file. old_string must match exactly once. Commits and pushes immediately.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
new_string * | string | Replacement text |
old_string * | string | Exact text to find |
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
commit_message | string |
rewrite_file Rewrite File
Replace entire file contents. Commits and pushes immediately.
| Parameter | Type | Description |
|---|---|---|
content * | string | New full file content |
file_path * | string | |
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
commit_message | string |
update_section Update LaTeX Section
Update a specific LaTeX section by title, preserving the header. Commits and pushes immediately.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
new_content * | string | New section body (excluding \section{} header) |
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
section_title * | string | |
commit_message | string |
sync_project Sync Project
Pull the latest changes from Overleaf (git pull).
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
upload_file Upload File
Upload a local (possibly BINARY) file into an Overleaf project. Use this for images (PNG/JPG), PDFs, and other non-text assets that must not be UTF-8 decoded. Commits and pushes immediately.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Destination path inside the project (e.g. 'figures/cat.png'). |
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
source_path * | string | Local filesystem path of the file to upload. |
commit_message | string | Git commit message |
overwrite | boolean | string | If true, replace an existing file at file_path. Default false. Accepts boolean or case-insensitive string ('true'/'false'/'1'/'0'/'yes'/'no'). |
delete_file Delete File
Delete a file from the project. Commits and pushes immediately.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
commit_message | string |
compile_project Compile Project
Trigger PDF compilation on Overleaf. Returns compilation status and output file list. Requires OVERLEAF_SESSION env var.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
download_pdf Compile and Download PDF
Download the compiled PDF to a local path. Compiles the project first, so no separate compile_project call is needed. Requires OVERLEAF_SESSION env var.
| Parameter | Type | Description |
|---|---|---|
output_path * | string | Local file path to save the PDF |
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
download_log Get Compilation Log
Download the LaTeX compilation log (.log file) from Overleaf. Useful for debugging compilation errors. Requires OVERLEAF_SESSION env var.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
get_page_count Get PDF Page Count
Compile the project and report the TOTAL number of pages in the PDF (parsed from the LaTeX log, with a PDF-parse fallback). Use this to answer 'how many pages is it?' or to drive a fill-exactly-N-pages editing loop. Requires OVERLEAF_SESSION.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
locate_in_pdf Locate Source in PDF
Find WHERE a given source line lands in the compiled PDF, using SyncTeX. Returns the page number and bounding rectangle(s) {page,h,v,width,height} in PostScript points (v measured from the page top). Omit `file` to use the compile root. This is the element→page-position capability the source parser cannot provide. Requires OVERLEAF_SESSION.
| Parameter | Type | Description |
|---|---|---|
line * | integer | 1-based source line number to locate. |
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
column | integer | 1-based column (default 0). Usually leave unset. |
file | string | Project-relative path of the source file (e.g. 'main.tex' or 'latex/paper.tex'). Omit to use the compile root (auto-detected from SyncTeX). |
section_page_map Map Sections to PDF Pages
Compile once, then map EVERY section/subsection heading (and \end{document}) to the PDF page it starts on, plus the total page count. This is the 'perceive the position of each element on the page' overview — ideal for judging how content is distributed across pages and for a fill-exactly-N-pages workflow. Omit `file` to use the compile root. Requires OVERLEAF_SESSION.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
file | string | Project-relative path of the root .tex file. Omit to auto-detect the compile root from SyncTeX. |
download_source_zip Download Source ZIP
Download the full project source as a ZIP file to a local path. Requires OVERLEAF_SESSION env var.
| Parameter | Type | Description |
|---|---|---|
output_path * | string | Local file path to save the .zip (e.g. '/tmp/project.zip'). |
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
download_source Download and Extract Source
Download the project source and extract it into a local directory. Creates the directory if missing. Fails if the directory is not empty unless overwrite=true. Requires OVERLEAF_SESSION env var.
| Parameter | Type | Description |
|---|---|---|
output_dir * | string | Local directory to extract the project source into. |
project_id * | string | Overleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the Overleaf project URL. NOT a local filesystem path, NOT '.', NOT a proj… |
overwrite | boolean | string | If true, extract even if output_dir is non-empty. Default false. Accepts boolean or case-insensitive string ('true'/'false'/'1'/'0'/'yes'/'no'). |