Overleaf MCP

v1.0.0Cloud Servicesstable

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.

ai-toolschatgptclaudelatexmcp
Share:
132
Stars
0
Downloads
0
Weekly
0/5

What is Overleaf MCP?

Overleaf MCP 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

Edit LaTeX documents in Overleaf through AI assistance.
Synchronize document changes with Git repositories automatically.
mjyoo2

Maintainer

LicenseMIT
Languagejavascript
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx overleafmcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Overleaf MCP

OverleafMCP is a Model Context Protocol server that bridges AI assistants and Overleaf's collaborative LaTeX editor through Overleaf's Git integration. It lets AI clients read project files, parse LaTeX document structure into sections, and push section-level or full-file edits back to Overleaf via Git commits — all without leaving your AI chat interface. Writers, academics, and researchers who maintain LaTeX papers on Overleaf can use it to have AI assistants draft sections, rewrite content, or restructure documents directly in their Overleaf projects.

Prerequisites

  • An Overleaf account with Git integration enabled (requires Overleaf Premium or institutional access)
  • An Overleaf Git token — generate from Account Settings → Git Integration in Overleaf
  • Your Overleaf project ID — visible in 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
1

Get your Overleaf Git token and project ID

In Overleaf, go to Account Settings → Git Integration and generate a Git token. Then open your project and copy the project ID from the URL bar (the alphanumeric string after /project/).

2

Add the OverleafMCP server to your MCP client config

Add the @mjyoo2/overleaf-mcp package to your MCP client configuration using npx. Set OVERLEAF_PROJECT_ID and OVERLEAF_GIT_TOKEN as 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"
      }
    }
  }
}
3

Configure multiple projects (optional)

To work with multiple Overleaf projects, create a projects.json config file and point to it with OVERLEAF_PROJECTS_CONFIG. The file should list each project with its ID, token, and display name.

{
  "mcpServers": {
    "overleaf": {
      "command": "npx",
      "args": ["-y", "@mjyoo2/overleaf-mcp"],
      "env": {
        "OVERLEAF_PROJECTS_CONFIG": "/absolute/path/to/projects.json"
      }
    }
  }
}
4

Restart your MCP client

Restart Claude Desktop (or your MCP client) to load the new server configuration.

5

Test the connection by listing your project files

Ask your AI assistant to list the files in your Overleaf project to confirm the server is connected and authenticated correctly.

Overleaf MCP Examples

Client configuration

Claude Desktop configuration for OverleafMCP with a single Overleaf project using an inline Git token.

{
  "mcpServers": {
    "overleaf": {
      "command": "npx",
      "args": ["-y", "@mjyoo2/overleaf-mcp"],
      "env": {
        "OVERLEAF_PROJECT_ID": "64a1b2c3d4e5f6a7b8c9d0e1",
        "OVERLEAF_GIT_TOKEN": "your_overleaf_git_token",
        "OVERLEAF_PROJECT_NAME": "My Research Paper"
      }
    }
  }
}

Prompts to try

Example prompts for reading and editing LaTeX documents in Overleaf through the MCP server.

- "List all files in my Overleaf project"
- "Read the contents of main.tex"
- "Show me the section structure of main.tex"
- "Get the content of the Introduction section from main.tex"
- "Rewrite the Abstract section to be more concise and add a sentence about our methodology"
- "Update the Conclusion section with the following text: [your text here] and commit with message 'Update conclusion'"

Troubleshooting Overleaf MCP

Authentication fails — Git push to Overleaf is rejected

Regenerate your Git token from Overleaf Account Settings → Git Integration. Ensure the OVERLEAF_GIT_TOKEN value in your config exactly matches the token shown (no extra spaces). Some accounts require enabling Git integration in Overleaf settings first.

Project ID not recognized — 'repository not found' error

Copy the project ID directly from the Overleaf project URL (the string after /project/). Ensure it is the project ID and not the project name. The ID is typically a 24-character hexadecimal string.

Windows users: npx command fails or path errors

On Windows, change the command to 'cmd' and use args: ["/c", "npx", "-y", "@mjyoo2/overleaf-mcp"] in your MCP config. This properly invokes npx through the Windows command processor.

Frequently Asked Questions about Overleaf MCP

What is Overleaf MCP?

Overleaf MCP 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 MCP?

Follow the installation instructions on the Overleaf MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Overleaf MCP?

Overleaf MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Overleaf MCP free to use?

Yes, Overleaf MCP is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

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.

Quick Config Preview

{ "mcpServers": { "overleafmcp": { "command": "npx", "args": ["-y", "overleafmcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Overleaf MCP?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides