MCP ExplorerExplorer

Overleaf Mcp

@unnipvon 21 days ago
1 MIT
FreeCommunity
AI Systems
Overleaf MCP Server enables AI-assisted LaTeX editing and Overleaf integration.

Overview

What is Overleaf Mcp

Overleaf MCP is a Model Context Protocol server designed for LaTeX editing with AI assistance and integration with Overleaf. It allows users to create and edit LaTeX documents with the help of AI assistants like Claude.

Use cases

Use cases include writing research papers, creating technical reports, formatting academic articles, and generating presentations, all with the assistance of AI for improved efficiency and accuracy.

How to use

To use Overleaf MCP, first install a LaTeX compiler and Pandoc. Then, install the Overleaf MCP package via pip or from source. Start the server using the command ‘overleaf-mcp run’ and connect to the Claude Desktop app.

Key features

Key features include LaTeX document editing and creation, mathematical equation formatting, table and figure generation, document compilation, and Overleaf project integration. All features are available on the free tier without paid API dependencies.

Where to use

Overleaf MCP can be used in academic settings, research institutions, and any field that requires document preparation and typesetting, particularly those that utilize LaTeX for technical and scientific documentation.

Content

Overleaf MCP Server

An MCP (Model Context Protocol) server that enables LaTeX editing with AI assistance and Overleaf integration. This server allows AI assistants like Claude to help with creating and editing LaTeX documents.

Features

  • LaTeX document editing and creation
  • Mathematical equation formatting
  • Table and figure generation
  • Document compilation
  • Overleaf project integration (download/upload)
  • All features available on free tier (no paid API dependencies)

Requirements

  • Python 3.10 or higher
  • A LaTeX compiler (MiKTeX, TeX Live, etc.)
  • Pandoc (for HTML conversion)
  • Claude Desktop app or other MCP-compatible client

Installation

1. Install a LaTeX compiler (if not already installed)

macOS:

brew install --cask basictex

or for a full installation:

brew install --cask mactex-no-gui

Windows:

Download and install MiKTeX from miktex.org

Linux (Ubuntu/Debian):

sudo apt-get install texlive-latex-base texlive-latex-extra

2. Install Pandoc (for HTML conversion)

macOS:

brew install pandoc

Windows:

Download and install from pandoc.org/installing.html

Linux (Ubuntu/Debian):

sudo apt-get install pandoc

3. Install Overleaf MCP

Using pip:

pip install overleaf-mcp

Or install from source with a virtual environment:

git clone https://github.com/username/overleaf-mcp.git
cd overleaf-mcp
python -m venv overleaf-mcp-env
source overleaf-mcp-env/bin/activate  # On Windows: .\overleaf-mcp-env\Scripts\activate
pip install -r requirements.txt
pip install -e .

Activate the environment with all dependencies (on macOS/Linux):

We provide a convenient script to activate the environment and set up the PATH:

source ./activate_env.sh

Usage

1. Start the MCP server

overleaf-mcp run

2. Connect to Claude Desktop

Follow the instructions in Claude Desktop to connect to a local MCP server.

3. Overleaf Workflow

  1. Download your Overleaf project as a ZIP file
  2. Use Claude to help edit the LaTeX files
  3. Package the edited project for upload back to Overleaf

4. Try the demo

To see the LaTeX template manager and converter in action:

./run_latex_demo.sh

Available Tools

Document Operations

  • create_document: Create a new LaTeX document
  • compile_document: Compile the current document
  • fix_errors: Identify and fix compilation errors

Element Creation

  • create_equation: Create a LaTeX equation
  • create_table: Generate a LaTeX table
  • create_figure: Insert a figure with caption
  • create_section: Add a new document section

Overleaf Integration

  • download_from_overleaf: Instructions for downloading from Overleaf
  • prepare_for_upload: Package a project for Overleaf upload

Development

To set up for development:

git clone https://github.com/username/overleaf-mcp.git
cd overleaf-mcp
python -m venv overleaf-mcp-env
source overleaf-mcp-env/bin/activate  # On Windows: .\overleaf-mcp-env\Scripts\activate
pip install -r requirements.txt
pip install -e ".[dev]"

Run tests:

pytest tests/

License

MIT License

Tools

No tools

Comments