Overleaf
Model Context Protocol (MCP) server that lets AI assistants read Overleaf projects, parse LaTeX document structure, and push section-level edits back via Git. Compatible with Claude Desktop, Cursor, Windsurf, and any MCP client.
What is Overleaf?
Overleaf is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol (mcp) server that lets ai assistants read overleaf projects, parse latex document structure, and push section-level edits back via git. compatible with claude desktop, cursor, w...
Model Context Protocol (MCP) server that lets AI assistants read Overleaf projects, parse LaTeX document structure, and push section-level edits back via Git. Compatible with Claude Desktop, Cursor, Windsurf, and any MCP client.
This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Model Context Protocol (MCP) server that lets AI assistants
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx overleaf-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Overleaf
Overleaf MCP Server is a Model Context Protocol server that connects AI assistants to Overleaf's LaTeX collaborative editing platform via Git integration. It exposes tools to list projects, browse files, read LaTeX content, parse document section structures, and write or update sections back to Overleaf through Git commits — making it compatible with Claude Desktop, Cursor, Windsurf, and any MCP-enabled client. Researchers, academics, and technical writers can leverage it to have AI assistants edit their LaTeX papers, generate new sections, or restructure documents directly within their Overleaf workspace.
Prerequisites
- An Overleaf account with Git integration enabled (requires Overleaf Premium or institutional subscription)
- An Overleaf Git token — generate from Account Settings → Git Integration
- Your Overleaf project ID from the project URL (e.g., overleaf.com/project/<PROJECT_ID>)
- Node.js 18+ installed
- An MCP-compatible client such as Claude Desktop, Cursor, or Windsurf
Enable Git integration in Overleaf
Log into your Overleaf account, navigate to Account Settings → Git Integration, and generate a new Git token. Save this token securely as it will not be shown again.
Locate your Overleaf project ID
Open your Overleaf project in the browser. The project ID is the alphanumeric string in the URL after /project/ — for example, in 'overleaf.com/project/64a1b2c3d4e5f6a7b8c9d0e1', the ID is '64a1b2c3d4e5f6a7b8c9d0e1'.
Add the server to your MCP client config
Add @mjyoo2/overleaf-mcp to your Claude Desktop or other MCP client config file. Use the OVERLEAF_PROJECT_ID and OVERLEAF_GIT_TOKEN environment variables.
{
"mcpServers": {
"overleaf": {
"command": "npx",
"args": ["-y", "@mjyoo2/overleaf-mcp"],
"env": {
"OVERLEAF_PROJECT_ID": "your_project_id_here",
"OVERLEAF_GIT_TOKEN": "your_git_token_here"
}
}
}
}Set up multi-project support (optional)
For multiple projects, set OVERLEAF_PROJECTS_CONFIG to the path of a JSON file listing each project's ID, token, and name. The config file is auto-discovered at ~/.config/overleaf-mcp/projects.json on macOS/Linux.
Restart your MCP client and verify
Restart Claude Desktop or your MCP client so the Overleaf server is loaded. Ask the AI to list your project files as a quick connectivity test.
Overleaf Examples
Client configuration
Claude Desktop configuration for Overleaf MCP server with a single project and secure token configuration.
{
"mcpServers": {
"overleaf": {
"command": "npx",
"args": ["-y", "@mjyoo2/overleaf-mcp"],
"env": {
"OVERLEAF_PROJECT_ID": "64a1b2c3d4e5f6a7b8c9d0e1",
"OVERLEAF_GIT_TOKEN": "your_overleaf_git_token",
"OVERLEAF_PROJECT_NAME": "PhD Thesis"
}
}
}
}Prompts to try
Example prompts for AI-assisted LaTeX editing through the Overleaf MCP server.
- "List all files in my Overleaf project"
- "Read the file main.tex and show me its structure"
- "What sections are in chapter2.tex?"
- "Get the content of the Related Work section from main.tex"
- "Expand the Methodology section with two new paragraphs explaining our data collection process"
- "Write a new Limitations section to main.tex with commit message 'Add limitations section'"Troubleshooting Overleaf
Git push fails with 'invalid credentials' or 403 error
Your Overleaf Git token may have expired or been revoked. Go to Overleaf Account Settings → Git Integration, revoke the old token, generate a new one, and update OVERLEAF_GIT_TOKEN in your MCP config.
write_file or write_section fails with no error — changes don't appear in Overleaf
Check that the commit was actually pushed by asking 'list_files' after a write. If the Git push succeeds locally but Overleaf doesn't show changes, try refreshing the Overleaf project page and pulling the latest version in the History panel.
On Windows, the server doesn't start when using npx directly
Use the Windows-compatible command format in your config: set 'command' to 'cmd' and 'args' to ["/c", "npx", "-y", "@mjyoo2/overleaf-mcp"]. This routes npx through the Windows Command Processor correctly.
Frequently Asked Questions about Overleaf
What is Overleaf?
Overleaf is a Model Context Protocol (MCP) server that model context protocol (mcp) server that lets ai assistants read overleaf projects, parse latex document structure, and push section-level edits back via git. compatible with claude desktop, cursor, windsurf, and any mcp client. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Overleaf?
Follow the installation instructions on the Overleaf GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Overleaf?
Overleaf works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Overleaf free to use?
Yes, Overleaf is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
Overleaf Alternatives — Similar Cloud Services Servers
Looking for alternatives to Overleaf? Here are other popular cloud services servers you can use with Claude, Cursor, and VS Code.
Open WebUI
★ 138.2kUser-friendly AI Interface (Supports Ollama, OpenAI API, ...)
Anything LLM
★ 60.4kThe all-in-one AI productivity accelerator. On device and privacy first with no annoying setup or configuration.
LocalAI
★ 46.4kLocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video - on any hardware. No GPU required.
Nacos
★ 33.0kan easy-to-use dynamic service discovery, configuration and service management platform for building AI cloud native applications.
Xiaozhi ESP32
★ 26.7k本项目为xiaozhi-esp32提供后端服务,帮助您快速搭建ESP32设备控制服务器。Backend service for xiaozhi-esp32, helps you quickly build an ESP32 device control server.
Gateway
★ 11.8kA blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.
Browse More Cloud Services MCP Servers
Explore all cloud services servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Overleaf in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Overleaf?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.