Overleaf MCP Helper
Provides tools to read, edit, create, delete, rename/move, search, and list files in Overleaf LaTeX projects through a VSCode bridge, plus parse LaTeX compile logs for errors, warnings, and bad boxes.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
π Overleaf MCP Helper
Let AI assistants read, edit, and manage your Overleaf LaTeX projects β safely.
Overleaf MCP Helper is a Model Context Protocol (MCP) server paired with a VSCode extension that bridges AI assistants (Claude, ChatGPT, Copilot, etc.) to your Overleaf projects. Write, refactor, and manage LaTeX papers with AI β without ever leaving Overleaf.
β¨ Features
π Read any file in your Overleaf project
βοΈ Edit files with safe, exact-match substring replacement (no full-file overwrites!)
π Create new files (with overwrite protection)
ποΈ Delete files (directory deletion blocked for safety)
π Rename / Move files within the project
π Search across all project files with regex
π Parse LaTeX logs β extract errors, warnings, and bad boxes from compile output
π³ Tree view of the project structure
π Auto-retry with connection recovery on network failures
Related MCP server: overleaf-mcp
ποΈ Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AI Assistant β
β (Claude / ChatGPT / Copilot) β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β MCP (stdio)
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MCP Server (Node.js) β
β β
β Tools: edit_file Β· create_file Β· delete_file β
β rename_file Β· read_file Β· search_in_project β
β get_compile_log Β· tree Β· list_files β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β HTTP (localhost:23119)
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β VSCode Extension (HTTP Bridge) β
β β
β Exposes vscode.workspace.fs via REST API β
β Endpoints: /ws/read Β· /ws/write Β· /ws/delete β
β /ws/rename Β· /ws/ls Β· /ws/stat Β· /ws/tree β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β VSCode VFS API
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Overleaf β
β (overleaf-workshop:// protocol) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββπ¦ Installation
Prerequisites
Overleaf Workshop extension (to open Overleaf projects in VSCode)
Node.js β₯ 18
Step 1: Install the VSCode Extension
Option A: Use the pre-built .vsix (recommended)
A pre-built extension is available in the dist/ directory:
Download
dist/overleaf-mcp-helper-extension-1.0.0.vsixIn VSCode: Extensions β Β·Β·Β· β Install from VSIX... β select the downloaded file
Option B: Build from source
cd extension
npm install
npm run compile
npm run packageThis will generate a .vsix file in the extension/ directory (e.g. extension/overleaf-mcp-helper-extension-1.0.0.vsix).
Install it in VSCode: Extensions β Β·Β·Β· β Install from VSIX... β select the generated .vsix file.
Step 2: Configure the MCP Server
First, install MCP server dependencies:
cd mcp-server
npm installThen add to your MCP configuration file (e.g. Claude Desktop claude_desktop_config.json):
{
"mcpServers": {
"overleaf": {
"command": "node",
"args": ["/path/to/overleaf-mcp-helper/mcp-server/index.mjs"]
}
}
}Step 3: Open an Overleaf Project
Open an Overleaf project in VSCode via the Overleaf Workshop extension
The bridge extension auto-starts an HTTP server on
localhost:23119The MCP server auto-discovers the bridge and connects
That's it! Your AI assistant can now interact with your Overleaf project. π
π οΈ Available Tools
File Operations
Tool | Description | Safety |
| Read a single file by path | β Read-only |
| Read multiple files at once | β Read-only |
| Replace an exact substring (must match uniquely) | β Safe β rejects ambiguous matches |
| Create a new file (rejects if exists) | β Safe β no overwrite |
| Delete a file (rejects directories) | β οΈ Destructive β files only |
| Rename or move a file (rejects if dest exists) | β οΈ Destructive β no overwrite |
Search & Navigation
Tool | Description |
| List all open workspaces/projects |
| Recursively list all files |
| Visual directory tree (configurable depth) |
| Regex search across text files |
LaTeX-Specific
Tool | Description |
| Parse |
βοΈ Configuration
Environment Variables (MCP Server)
Variable | Default | Description |
|
| Base port for bridge discovery |
|
| HTTP request timeout (ms) |
|
| Write request timeout (ms) |
|
| Max retries on connection failure |
Extension Settings (VSCode)
Setting | Default | Description |
|
| HTTP server port |
|
| Auto-start when VFS workspace detected |
π Safety Design
This project prioritizes safety to protect your precious LaTeX manuscripts:
No full-file overwrite β We deliberately removed the
write_filetool. All edits go throughedit_filewhich requires an exact, unique match.Overwrite protection β
create_filerejects if the file exists.rename_filerejects if the destination exists.Directory protection β
delete_fileonly works on files, not directories.Automatic retry β Network failures trigger port re-discovery and retry, not data corruption.
Overleaf version history β Even if something goes wrong, Overleaf keeps full version history for recovery.
π License
MIT β use it however you like.
Made with β€οΈ for the academic community.
If this tool helps you write papers faster, consider giving it a β!
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Edit your Overleaf LaTeX projects from Claude and ChatGPT; every change is a real Git commit.
Persistent AI LaTeX workspace: edit and compile multi-file projects, export publication-ready PDFs.
Overleaf alternative online LaTeX editor. AI agents edit, comment, and chat. Keep or revert edits.
A hosted LaTeX editor your assistant can actually use. Search 1,019 free templates, create and edit projects, and compile them to PDF on a real TeX Live farm, getting back the PDF or the compile log when a build fails. Thirteen tools behind OAuth 2.1, with nothing to install and nothing to run locally.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables AI agents to interact with Overleaf projects directly, including creating projects, managing files, and editing documents in real-time using Overleaf's native Operational Transformation protocol.101-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to read, edit, and compile LaTeX documents in Overleaf projects with tracked changes via the Model Context Protocol.6MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants such as Gemini, Claude, and ChatGPT to read, search, edit, compile, and review LaTeX files in your actual Overleaf projects, with versioned and atomic multi-file changes. Edits are published straight to Overleaf, so changes appear in the browser within seconds.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants and agents to explore, read, live-edit, patch, create, and delete files across projects on a self-hosted Overleaf Community Edition deployment, with OT-safe edits that sync instantly to open browser tabs. It also triggers server-side LaTeX compilations, returns parsed errors and warnings from the log for auto-debugging, and delivers authenticated PDF download links.MIT