Logotipo de Overleaf MCP server

Overleaf MCP server

Comunidad
tamirSida

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

EditortamirSida
Repositoriooverleaf_MCP
IdiomaPython
Forks
7
Estrellas
17
Herramientas disponibles
0
Tipo de transportestdio
Categorías
LicenciaMIT
Enlaces
  • Conecta herramientas a flujos de trabajo con IA

    Overleaf MCP server ofrece funciones MCP que pueden usar los clientes y agentes de IA compatibles.

  • 0 herramientas disponibles

    Explora a continuación las acciones que se pueden invocar, con sus nombres y descripciones cuando el servidor los proporcione.

  • Configuración lista para copiar

    Usa los ejemplos de instalación para configurar este servidor en tu cliente MCP preferido.

  • Indicadores de interés en el código abierto

    17 estrellas y 7 forks en el repositorio enlazado.

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

Usa el MCP de Overleaf MCP server con varios modelos de IA

TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que, una vez conectado Overleaf MCP server, puedes usarlo con distintos modelos de IA en TypingMind sin tener que configurarlo por separado para cada modelo. Esta integración MCP se ejecuta localmente en tu dispositivo a través del conector MCP de TypingMind.

Guía de configuración para usar el conector local

Usa esta opción si el servidor MCP necesita acceder a archivos locales, aplicaciones o recursos privados de tu ordenador.

1

Abre los ajustes de MCP

En TypingMind, ve a Ajustes, luego a Ajustes avanzados y a Model Context Protocol, y elige Configurar conector.

  1. Abre TypingMind en tu navegador.
  2. Haz clic en el icono de Ajustes.
  3. Ve a Ajustes avanzados.
  4. Abre la sección Model Context Protocol.
  5. Haz clic en Configurar conector y elige Este dispositivo.
Pantalla de configuración del conector MCP de TypingMind con «Este dispositivo» seleccionado
2

Ejecuta el comando del conector

Elige Este dispositivo, copia el comando de TypingMind y ejecútalo en Terminal. Mantén el proceso en ejecución mientras uses MCP.

  1. Copia el comando de configuración que muestra TypingMind.
  2. Abre Terminal en macOS o Windows Terminal en Windows.
  3. Pega y ejecuta el comando.
  4. Acepta la instalación del paquete si Terminal te pide confirmación para continuar.
  5. Mantén el proceso en ejecución en la ventana de Terminal mientras uses las herramientas MCP.
3

Añade Overleaf MCP server como servidor

Cuando el estado del conector sea «Listo», haz clic en «Edita servidores» y pega la configuración del servidor MCP.

  1. Espera hasta que el estado del conector indique «Listo».
  2. Haz clic en Edita servidores.
  3. Pega la configuración del servidor MCP de Overleaf MCP server.
  4. Guarda la lista de servidores.
  5. Actualiza para comprobar que el conector sigue listo.
Ajustes de MCP de TypingMind con un servidor activo y el botón «Edita servidores»
{
  "mcpServers": {
    "tamirsida-overleaf-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Úsala con distintos modelos

Guarda la lista de servidores, abre Plugins, activa las herramientas MCP de Overleaf MCP server y selecciona cualquier modelo de IA compatible en TypingMind para usar las herramientas en el chat o asignárselas a un agente de IA.

  1. Abre la página Plugins en TypingMind.
  2. Activa las herramientas MCP de Overleaf MCP server.
  3. Inicia un chat y elige el modelo de IA que quieras usar.
  4. Usa las herramientas MCP en el chat o asígnalas a un agente de IA.
  5. Cambia a otro modelo de IA cuando lo necesites sin volver a conectar MCP.
Chat de TypingMind que usa herramientas MCP activadas con un modelo de IA seleccionado
¿Puedes usar Overleaf MCP server para ayudarme con esta tarea?
Overleaf MCP server
Claro. Lo he leído.
Esto he encontrado usando Overleaf MCP server.

Preguntas frecuentes

¿Para qué sirve el servidor MCP Overleaf MCP server?

Overleaf MCP server es un servidor MCP que permite a los clientes de IA compatibles conectarse a herramientas y contexto externos. En TypingMind, basta con añadir este servidor MCP una vez para que sus herramientas estén disponibles en tu espacio de trabajo de IA.

¿Puedo usar el servidor MCP Overleaf MCP server con varios modelos de IA en TypingMind?

Sí. TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que puedes usar Overleaf MCP server con distintos modelos de IA, como Claude, ChatGPT, Gemini u otros que hayas configurado en TypingMind, sin configurar el servidor MCP por separado para cada modelo.

¿Por qué usar el conector MCP de Overleaf MCP server con TypingMind?

TypingMind es una de las mejores interfaces de chat con LLM porque reúne varios modelos de IA, prompts, plugins, agentes de IA, claves de API y herramientas MCP en un solo espacio de trabajo. Con Overleaf MCP server conectado, puedes usar sus herramientas MCP con tus modelos preferidos y mantener organizado tu flujo de trabajo de chat en TypingMind.

¿Cómo conecto el servidor MCP Overleaf MCP server a TypingMind?

Overleaf MCP server funciona a través del conector MCP local de TypingMind. Es la mejor opción cuando el servidor MCP necesita acceder a archivos locales, aplicaciones de escritorio, herramientas de línea de comandos o recursos privados de tu ordenador.

¿Qué herramientas ofrece el servidor MCP Overleaf MCP server en TypingMind?

Overleaf MCP server ofrece funciones MCP que puedes activar desde la página Plugins de TypingMind y usar en el chat o asignar a agentes de IA.

¿Tengo que compartir mis claves de API con TypingMind para usar el servidor MCP Overleaf MCP server?

No. TypingMind prioriza el funcionamiento local y te permite mantener el control de tus proveedores de modelos, claves de API, prompts y configuración MCP. Si Overleaf MCP server requiere autenticación, añade las cabeceras, los ajustes de OAuth o la configuración local necesarios para ese servidor MCP al crear la conexión.

Servidores MCP relacionados

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇