Unofficial Overleaf MCP Server
Provides tools for managing Overleaf projects, including creating projects, listing and manipulating files, real-time document editing via Operational Transformation, and triggering LaTeX compilation for PDF download.
Click on "Install 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., "@Unofficial Overleaf MCP ServerCreate a new Overleaf project named 'test'."
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.
Unofficial Overleaf MCP Server
An unofficial Model Context Protocol (MCP) server that provides AI agents with the ability to interact with Overleaf projects directly. This server allows agents to create projects, list files, read contents, manage files, and securely edit documents in real-time using Overleaf's native Operational Transformation (ShareJS) WebSocket protocol.
Features
Project Management: Create new Overleaf projects natively.
File System (CRUD): List, upload, create, move, and delete files or folders within an Overleaf project.
Real-Time Document Editing: Edits files natively without full ZIP downloads. Utilizes a reverse-engineered Socket.IO 0.9 shim and the
diff-match-patchlibrary to translate semantic edits into precise ShareJStext0Operational Transformation (OT) updates.Compilation: Trigger server-side LaTeX compilation and download the resulting PDF.
Related MCP server: overleaf-mcp
Prerequisites
Node.js (v18+)
An active Overleaf account.
Configuration
This MCP Server authenticates to Overleaf using a session cookie. You must provide the OVERLEAF_COOKIE environment variable to run the server.
Log into your Overleaf account in your browser.
Open the Developer Tools (F12) -> Application / Storage -> Cookies.
Find the
overleaf_session2cookie.Set the value as an environment variable (or include it in your MCP configuration).
Adding to Antigravity IDE / Gemini
To use this server directly inside the Antigravity IDE or Gemini agents, add the following configuration to ~/.gemini/config/mcp_config.json:
{
"mcpServers": {
"overleaf": {
"command": "node",
"args": [
"/absolute/path/to/unofficial-overleaf-mcp-server/build/index.js"
],
"env": {
"OVERLEAF_COOKIE": "overleaf_session2=s%3A..."
}
}
}
}Available MCP Tools
overleaf_create_project(projectName)overleaf_list_files(projectId)overleaf_read_file(projectId, filePath)overleaf_edit_file(projectId, filePath, targetContent, replacementContent)overleaf_create_doc(projectId, name, parentFolderPath)overleaf_create_folder(projectId, name, parentFolderPath)overleaf_upload_file(projectId, filePath, folderId)overleaf_move_entity(projectId, path, newParentFolderPath)overleaf_delete_entity(projectId, path)overleaf_compile_and_download(projectId, rootDocId, outputPath)
Security Note
This server requires your Overleaf session cookie to operate. Do not commit your session cookie or any specific project IDs into version control.
Build
npm install
npm run buildUsage
npm startMaintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/n-qber/unofficial-overleaf-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server