overleaf-mcp-plus

v0.3.2
overleaf-mcp-plus Checked 19 hours ago Published 17 days ago

The 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.

ParameterTypeDescription
content *stringFile content
file_path *stringPath for the new file (e.g. 'chapters/intro.tex')
project_id *stringOverleaf 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_messagestringGit commit message

create_project Create Project

Create a new blank Overleaf project via the web API. Requires OVERLEAF_SESSION env var (session cookie).

ParameterTypeDescription
name *stringProject 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.

ParameterTypeDescription
project_id *stringOverleaf 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…
extensionstringFilter by extension (e.g. '.tex', '.bib'). Empty = all.

read_file Read File

Read the contents of a file from an Overleaf project.

ParameterTypeDescription
file_path *stringPath to the file
project_id *stringOverleaf 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.

ParameterTypeDescription
project_id *stringOverleaf 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_pathstringOptional 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.

ParameterTypeDescription
file_path *stringPath to the LaTeX file
project_id *stringOverleaf 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.

ParameterTypeDescription
file_path *string
project_id *stringOverleaf 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 *stringSection title to retrieve

list_history List Git History

Show git commit history for the project.

ParameterTypeDescription
project_id *stringOverleaf 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_pathstringFilter to a specific file
limitintegerMax commits (default 20, max 200)
sincestringGit --since filter (e.g. '2.weeks', '2025-01-01')
untilstringGit --until filter

get_diff Get Git Diff

Get a git diff between refs or the working tree. Useful for reviewing recent changes.

ParameterTypeDescription
project_id *stringOverleaf 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_linesintegerDiff context lines (0-10, default 3)
file_pathstringFilter to a specific file
from_refstringStart ref (e.g. 'HEAD~3', commit hash). Default: HEAD
max_charsintegerTruncate diff to N chars (default 120000)
to_refstringEnd ref. Omit for working tree.

status_summary Project Status Summary

Get a quick overview: file count, structure of main .tex file, project status.

ParameterTypeDescription
project_id *stringOverleaf 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.

ParameterTypeDescription
file_path *string
new_string *stringReplacement text
old_string *stringExact text to find
project_id *stringOverleaf 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_messagestring

rewrite_file Rewrite File

Replace entire file contents. Commits and pushes immediately.

ParameterTypeDescription
content *stringNew full file content
file_path *string
project_id *stringOverleaf 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_messagestring

update_section Update LaTeX Section

Update a specific LaTeX section by title, preserving the header. Commits and pushes immediately.

ParameterTypeDescription
file_path *string
new_content *stringNew section body (excluding \section{} header)
project_id *stringOverleaf 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_messagestring

sync_project Sync Project

Pull the latest changes from Overleaf (git pull).

ParameterTypeDescription
project_id *stringOverleaf 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.

ParameterTypeDescription
file_path *stringDestination path inside the project (e.g. 'figures/cat.png').
project_id *stringOverleaf 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 *stringLocal filesystem path of the file to upload.
commit_messagestringGit commit message
overwriteboolean | stringIf 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.

ParameterTypeDescription
file_path *string
project_id *stringOverleaf 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_messagestring

compile_project Compile Project

Trigger PDF compilation on Overleaf. Returns compilation status and output file list. Requires OVERLEAF_SESSION env var.

ParameterTypeDescription
project_id *stringOverleaf 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.

ParameterTypeDescription
output_path *stringLocal file path to save the PDF
project_id *stringOverleaf 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.

ParameterTypeDescription
project_id *stringOverleaf 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.

ParameterTypeDescription
project_id *stringOverleaf 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.

ParameterTypeDescription
line *integer1-based source line number to locate.
project_id *stringOverleaf 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…
columninteger1-based column (default 0). Usually leave unset.
filestringProject-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.

ParameterTypeDescription
project_id *stringOverleaf 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…
filestringProject-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.

ParameterTypeDescription
output_path *stringLocal file path to save the .zip (e.g. '/tmp/project.zip').
project_id *stringOverleaf 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.

ParameterTypeDescription
output_dir *stringLocal directory to extract the project source into.
project_id *stringOverleaf 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…
overwriteboolean | stringIf true, extract even if output_dir is non-empty. Default false. Accepts boolean or case-insensitive string ('true'/'false'/'1'/'0'/'yes'/'no').