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.
- 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)
- Python 3.10 or higher
- A LaTeX compiler (MiKTeX, TeX Live, etc.)
- Pandoc (for HTML conversion)
- Claude Desktop app or other MCP-compatible client
brew install --cask basictexor for a full installation:
brew install --cask mactex-no-guiDownload and install MiKTeX from miktex.org
sudo apt-get install texlive-latex-base texlive-latex-extrabrew install pandocDownload and install from pandoc.org/installing.html
sudo apt-get install pandocpip install overleaf-mcpgit 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 .We provide a convenient script to activate the environment and set up the PATH:
source ./activate_env.shoverleaf-mcp runFollow the instructions in Claude Desktop to connect to a local MCP server.
- Download your Overleaf project as a ZIP file
- Use Claude to help edit the LaTeX files
- Package the edited project for upload back to Overleaf
To see the LaTeX template manager and converter in action:
./run_latex_demo.shcreate_document: Create a new LaTeX documentcompile_document: Compile the current documentfix_errors: Identify and fix compilation errors
create_equation: Create a LaTeX equationcreate_table: Generate a LaTeX tablecreate_figure: Insert a figure with captioncreate_section: Add a new document section
download_from_overleaf: Instructions for downloading from Overleafprepare_for_upload: Package a project for Overleaf upload
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/MIT License