Command Palette

Search for a command to run...

UnylyUnyly
Browse all

Overleaf Server

FreeNot checked

Enables MCP clients to manage Overleaf projects via Git sync, including listing, reading, writing, and syncing files.

GitHubEmbed

About

Enables MCP clients to manage Overleaf projects via Git sync, including listing, reading, writing, and syncing files.

README

An MCP server focused only on Overleaf projects (via Overleaf Git sync).

What This Server Does

  • Connects MCP-compatible clients to your Overleaf project through Git sync.
  • Exposes file-level tools to list, read, write, and sync project content.
  • Keeps workflow simple: pull latest files, edit, then push back to Overleaf.

Architecture

flowchart LR
  C[MCP Client\nClaude Desktop / other MCP host] -->|Tool Call| S[Overleaf MCP Server]
  S -->|Git Sync| O[Overleaf Git Remote]
  S -->|Read / Write| L[Local Repo Mirror]
  L -->|Commit + Push| O
  O -->|Pull / Fetch| L
  S -->|Tool Result| C

Tool Workflow

sequenceDiagram
  participant Client as MCP Client
  participant Server as Overleaf MCP Server
  participant Local as Local Mirror
  participant Overleaf as Overleaf Git

  Client->>Server: list_files / read_file
  Server->>Local: Ensure local clone
  Server->>Overleaf: git pull
  Overleaf-->>Server: latest content
  Server-->>Client: file list / file content

  Client->>Server: write_file(path, content)
  Server->>Local: update file
  Server->>Local: git commit
  Server->>Overleaf: git push
  Server-->>Client: success + metadata

Requirements

  • Python 3.13+
  • uv package manager
  • An Overleaf plan with Git integration (individual, group, or institution license). Check if your institution provides free access at Overleaf for Institutions - use your institutional email. If your institution is not listed, upgrade your plan.

Git Setup

  1. Enable Git - open your project on Overleaf → Menu → enable Git under Integrations.
  2. Copy project ID - from the browser URL (e.g. https://www.overleaf.com/project/69a4f7cc4eaf13bd56de5b0469a4f7cc4eaf13bd56de5b04).
  3. Generate a Git token - Account SettingsGit integration authentication tokensGenerate new token.
  4. Configure .env - copy .env.example to .env and fill in:
OVERLEAF_TOKEN=your_git_token
PROJECT_ID=your_project_id

project_id can also be passed per tool call if you leave PROJECT_ID unset.

Quick Start

git clone https://github.com/younesbensafia/overleaf-mcp-server.git
cd overleaf-mcp-server
uv sync
cp .env.example .env   # then edit with your token/project id
uv run python -m src.main

The server listens on stdio - connect your MCP client (Claude Desktop, etc.) to it.

Available Tools

Tool Description
list_files Pull and list files from Overleaf project
read_file Read file content
write_file Update file, commit, and push to Overleaf
sync_project Force a pull/sync from Overleaf

Claude Desktop Setup

Add to ~/.config/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "overleaf": {
      "command": "uv",
      "args": ["--directory", "/path/to/overleaf-mcp-server", "run", "python", "-m", "src.main"],
      "env": {
        "OVERLEAF_TOKEN": "your_git_token",
        "PROJECT_ID": "your_project_id"
      }
    }
  }
}

Troubleshooting

  • 403 Forbidden on git operations:
    • Your plan doesn't include Git integration - follow the Git Setup section.
    • Or the Git token is wrong - regenerate it at Account SettingsGit integration authentication tokens.
  • Wrong project content:
    • Set the correct PROJECT_ID in .env.
    • Or pass project_id explicitly in tool calls.
  • Sync conflicts:
    • Run sync_project before write_file if the remote changed.
  • Server not starting:
    • Ensure dependencies are installed with uv sync.
    • Verify Python 3.13+ is available.

License

MIT - See LICENSE

from github.com/YounesBensafia/overleaf-mcp-server

Install Overleaf Server in Claude Desktop, Claude Code & Cursor

Recommended · one command, every IDE
unyly install overleaf-mcp-server

Installs into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.

First time? Get the CLI: curl -fsSL https://unyly.org/install | sh

Or configure manually

Run in your terminal:

claude mcp add overleaf-mcp-server -- uvx overleaf-mcp-server

FAQ

Is Overleaf Server MCP free?

Yes, Overleaf Server MCP is free — one-click install via Unyly at no cost.

Does Overleaf Server need an API key?

No, Overleaf Server runs without API keys or environment variables.

Is Overleaf Server hosted or self-hosted?

Self-hosted: the server runs locally on your machine via the install command above.

How do I install Overleaf Server in Claude Desktop, Claude Code or Cursor?

Open Overleaf Server on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.

Related MCPs

Compare Overleaf Server with

Not sure what to pick?

Find your stack in 60 seconds

Author?

Embed badge for your README

Browse similar

All development MCPs