ARYAN PANDIT

Software Developer

Read Resume

OverLeaf MCP

PythonFastMCPGitLaTeXRegexMCP

An MCP-based Overleaf assistant that lets AI models read, summarize, and update specific LaTeX sections directly through chat.

OverLeaf MCP is an Overleaf assistant built as a Model Context Protocol server. It connects an AI assistant to an Overleaf project through Git, lets the assistant inspect LaTeX files, and applies focused section-level edits directly inside the document workflow instead of forcing the user to copy LaTeX back and forth between Overleaf and chat.

The product narrows the editing surface to the exact part of the document that matters. It can read files, list project contents, summarize a section, and replace only the body of a named LaTeX section while keeping the surrounding template intact.

Inspiration Behind It

The project came from a practical bottleneck in resume and report editing. Revisions required repeatedly pasting LaTeX into ChatGPT, asking for fixes, moving the result back into Overleaf, and then checking whether the template still held together.

OverLeaf MCP was built to remove that loop. By letting the assistant work directly against the Overleaf project with a constrained write path, the workflow becomes faster, less token-heavy, and less likely to break formatting.

System Architecture

Architecture Diagram

OverLeaf MCP

10 nodes

ASSISTANT SURFACEWORKSPACE SYNCSECTION EDITINGclonesyncscanload texcontexttarget sectionreplace bodywrite filestagepushAssistant TriggerTool call in chatFastMCP ServerTool routerGit Auth and CloneOverleaf credentialsLocal TempWorkspaceCloned projectFile IndexerProject contentsSection ParserLocates named blocksPlaintext SummaryToolReads current sectionSection BodyEditorScoped replacementCommit and PushTraceable update pathUpdated OverleafProjectRemote source of truth

About The Flow / Architecture

The system is intentionally simple: FastMCP exposes the tool interface, a Git integration layer authenticates against Overleaf and clones the project into a temporary workspace, and LaTeX helper utilities handle previewing, section extraction, plain-text stripping, and content normalization.

The most important design choice is the section-only write path. Instead of overwriting a full file, the server finds a named LaTeX section, replaces only its body, writes the file locally, then commits and pushes through Git so the edit remains controlled and reversible.

OverLeaf MCP turns Overleaf editing into a direct chat workflow. An MCP-compatible assistant can inspect LaTeX files, summarize sections, and update only the relevant section body instead of forcing the user to copy full document context in and out of chat.

The repository uses Python, FastMCP, Git-backed Overleaf access, and section-aware replacement helpers to keep edits focused and reversible. It stands out because it solves a real document workflow bottleneck rather than acting as a generic LaTeX utility.

View Project