Unofficial Overleaf MCP Server
Enables 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.
README
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.
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 build
Usage
npm start
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.