Logo vun Overleaf MCP server

Overleaf MCP server

Communautéit
tamirSida

allow Tools like copilot, claude desktop, claude code etc. perform CRUD operations on overleaf projects via git int

EditeurtamirSida
Repositoryoverleaf_MCP
SproochPython
Forks
7
Stären
17
Disponibel Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    Overleaf MCP server stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    17 Stären an 7 Forks aus dem verlinkte Repository.

Overleaf MCP Server

A Model Context Protocol (MCP) server that provides full CRUD operations for Overleaf LaTeX projects. Enables AI assistants to read, edit, create, and delete files in your Overleaf projects.

Features

14 Tools for Complete Project Management

CategoryToolDescription
Createcreate_projectCreate new Overleaf projects from LaTeX content or ZIP files
create_fileAdd new files to existing projects
Readlist_projectsView all configured projects
list_filesList files with optional extension filter
read_fileRead file contents
get_sectionsParse LaTeX structure (chapters, sections, subsections)
get_section_contentGet full content of a specific section
list_historyView git commit history
get_diffCompare changes between versions
Updateedit_fileSurgical edit - replace specific text (old_string → new_string)
rewrite_fileReplace entire file contents
update_sectionUpdate a specific LaTeX section by title
sync_projectPull latest changes from Overleaf
Deletedelete_fileRemove files from projects

Key Capabilities

  • Git Integration: Uses Overleaf's Git integration for reliable sync
  • Multi-Project Support: Configure and switch between multiple projects
  • LaTeX-Aware: Understands document structure for section-based operations
  • Auto-Push: All write operations commit and push to Overleaf immediately
  • Local Caching: Fast access with local repository cache

Installation

Prerequisites

  • Python 3.10+
  • Git
  • Overleaf account with Git integration (requires paid plan)

Install with pip

bash
# Clone the repository
git clone https://github.com/YOUR_USERNAME/overleaf-mcp.git
cd overleaf-mcp

# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install
pip install -e .

Install with uv (faster)

bash
git clone https://github.com/YOUR_USERNAME/overleaf-mcp.git
cd overleaf-mcp

uv venv
source .venv/bin/activate
uv pip install -e .

Configuration

Step 1: Get Your Overleaf Credentials

  1. Open your Overleaf project in the browser

  2. Get Project ID from the URL:

    https://www.overleaf.com/project/YOUR_PROJECT_ID
                                     ^^^^^^^^^^^^^^^^
  3. Get Git Token:

    • Click Menu (top-left)
    • Click Git under "Sync"
    • Click Generate token (if not already generated)
    • Copy the URL: https://git:YOUR_TOKEN@git.overleaf.com/...
    • Extract the token (the part between git: and @)

Step 2: Create Configuration File

Create overleaf_config.json in the project directory:

json
{
  "projects": {
    "my-thesis": {
      "name": "My PhD Thesis",
      "projectId": "abc123def456",
      "gitToken": "olp_xxxxxxxxxxxxxxxxxxxx"
    },
    "paper": {
      "name": "Research Paper",
      "projectId": "xyz789ghi012",
      "gitToken": "olp_yyyyyyyyyyyyyyyyyyyy"
    }
  },
  "defaultProject": "my-thesis"
}

Alternative: Environment Variables

For single-project setups:

bash
export OVERLEAF_PROJECT_ID="your_project_id"
export OVERLEAF_GIT_TOKEN="your_git_token"

Client Configuration

Claude Desktop

Config file location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Configuration:

json
{
  "mcpServers": {
    "overleaf": {
      "command": "/path/to/overleaf-mcp/.venv/bin/python",
      "args": ["-m", "overleaf_mcp.server"],
      "cwd": "/path/to/overleaf-mcp",
      "env": {
        "OVERLEAF_CONFIG_FILE": "/path/to/overleaf-mcp/overleaf_config.json",
        "OVERLEAF_TEMP_DIR": "/path/to/overleaf-mcp/overleaf_cache"
      }
    }
  }
}

Example (macOS):

json
{
  "mcpServers": {
    "overleaf": {
      "command": "/Users/username/dev/overleaf-mcp/.venv/bin/python",
      "args": ["-m", "overleaf_mcp.server"],
      "cwd": "/Users/username/dev/overleaf-mcp",
      "env": {
        "OVERLEAF_CONFIG_FILE": "/Users/username/dev/overleaf-mcp/overleaf_config.json",
        "OVERLEAF_TEMP_DIR": "/Users/username/dev/overleaf-mcp/overleaf_cache"
      }
    }
  }
}

After saving, restart Claude Desktop (Cmd+Q / Ctrl+Q, then reopen).


Claude Code (CLI)

Add to your Claude Code MCP settings (~/.claude/settings.json):

json
{
  "mcpServers": {
    "overleaf": {
      "command": "/path/to/overleaf-mcp/.venv/bin/python",
      "args": ["-m", "overleaf_mcp.server"],
      "cwd": "/path/to/overleaf-mcp",
      "env": {
        "OVERLEAF_CONFIG_FILE": "/path/to/overleaf-mcp/overleaf_config.json",
        "OVERLEAF_TEMP_DIR": "/path/to/overleaf-mcp/overleaf_cache"
      }
    }
  }
}

Or add per-project in .claude/settings.json in your project directory.


VS Code (with Claude Extension)

Add to your VS Code settings (settings.json):

json
{
  "claude.mcpServers": {
    "overleaf": {
      "command": "/path/to/overleaf-mcp/.venv/bin/python",
      "args": ["-m", "overleaf_mcp.server"],
      "cwd": "/path/to/overleaf-mcp",
      "env": {
        "OVERLEAF_CONFIG_FILE": "/path/to/overleaf-mcp/overleaf_config.json",
        "OVERLEAF_TEMP_DIR": "/path/to/overleaf-mcp/overleaf_cache"
      }
    }
  }
}

Or add to workspace settings (.vscode/settings.json) for project-specific config.


Usage Examples

Once configured, you can ask the AI assistant:

Reading Files

"List all .tex files in my thesis"
"Read the content of main.tex"
"What sections are in chapter1.tex?"

Editing Content

"Edit main.tex and replace 'teh' with 'the'"
"Rewrite the abstract.tex file with this new content: ..."
"Update the 'Introduction' section with this new content: ..."

Creating Files

"Create a new file called appendix.tex with a section for supplementary materials"
"Add a new bibliography file references.bib"

Project Management

"Show me the last 10 commits"
"What changed since yesterday?"
"Sync the project to get latest changes"

Section-Based Operations

"Get the content of the 'Methods' section"
"Update the 'Results' section with these findings: ..."
"What subsections are in chapter 2?"

Environment Variables

VariableDefaultDescription
OVERLEAF_CONFIG_FILEoverleaf_config.jsonPath to configuration file
OVERLEAF_TEMP_DIR./overleaf_cacheLocal cache directory for git repos
OVERLEAF_PROJECT_ID-Default project ID (single-project mode)
OVERLEAF_GIT_TOKEN-Default git token (single-project mode)
OVERLEAF_GIT_AUTHOR_NAMEOverleaf MCPGit commit author name
OVERLEAF_GIT_AUTHOR_EMAILmcp@overleaf.localGit commit author email

How It Works

┌─────────────────┐     MCP Protocol     ┌─────────────────┐
│  AI Assistant   │◄───────────────────►│  Overleaf MCP   │
│ (Claude, etc.)  │                      │     Server      │
└─────────────────┘                      └────────┬────────┘
                                                  │
                                                  │ Git (HTTPS)
                                                  ▼
                                         ┌─────────────────┐
                                         │    Overleaf     │
                                         │   Git Server    │
                                         └─────────────────┘
  1. Clone/Pull: Server clones or pulls the latest from Overleaf's Git endpoint
  2. Local Operations: Read/write operations happen on local cache
  3. Commit/Push: Changes are committed and pushed back to Overleaf
  4. Real-time Sync: Overleaf reflects changes immediately in the web editor

Security Notes

  • Tokens are sensitive: Git tokens provide full read/write access
  • Never commit secrets: overleaf_config.json is gitignored by default
  • Use environment variables: For CI/CD or shared environments
  • Token rotation: Regenerate tokens periodically in Overleaf settings

Troubleshooting

"No projects configured"

  • Ensure overleaf_config.json exists and has valid JSON
  • Check OVERLEAF_CONFIG_FILE points to the correct path

"Permission denied" or "Read-only filesystem"

  • Set OVERLEAF_TEMP_DIR to an absolute writable path
  • Ensure the cache directory exists and is writable

"Authentication failed"

  • Verify your git token is correct
  • Check if the token has expired (regenerate in Overleaf)
  • Ensure you have Git integration enabled (requires paid Overleaf plan)

"Server not appearing in Claude"

  • Restart Claude Desktop completely (Cmd+Q / Ctrl+Q)
  • Check the config JSON is valid (no trailing commas)
  • Verify Python path is correct (use absolute path to venv)

Contributing

Contributions are welcome! Please open an issue or submit a pull request.


License

MIT License - see LICENSE for details.


Acknowledgments

Overleaf MCP server MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal Overleaf MCP server verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

Overleaf MCP server als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu Overleaf MCP server an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "tamirsida-overleaf-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu Overleaf MCP server. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu Overleaf MCP server.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat Overleaf MCP server?
Overleaf MCP server
Jo. Ech hunn et gelies.
Dat hunn ech mat Overleaf MCP server fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server Overleaf MCP server benotzt?

Overleaf MCP server ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech Overleaf MCP server MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir Overleaf MCP server mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat Overleaf MCP server MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann Overleaf MCP server verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech Overleaf MCP server MCP mat TypingMind?

Overleaf MCP server leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt Overleaf MCP server MCP an TypingMind zur Verfügung?

Overleaf MCP server stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir Overleaf MCP server MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann Overleaf MCP server eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇