Overleaf MCP Server

Overleaf MCP Server

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

Category
Visit Server

README

Overleaf MCP Server

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

Quick Start

git clone https://github.com/younesbensafia/overleaf-mcp-server.git
cd overleaf-mcp-server

uv sync

# Configure environment
cp .env.example .env
# then edit .env with your token/project id

PYTHONPATH=. uv run src/main.py

If you are running from an activated virtual environment, you can also use:

PYTHONPATH=. python src/main.py

Environment

.env example:

OVERLEAF_TOKEN=your_git_token
PROJECT_ID=your_project_id

Notes:

  • OVERLEAF_TOKEN is required.
  • project_id can be passed per tool call, or use default PROJECT_ID.
  • Overleaf Git access requires a plan that supports Git integration.

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", "src/main.py"],
      "env": {
        "PYTHONPATH": ".",
        "OVERLEAF_TOKEN": "your_git_token",
        "PROJECT_ID": "your_project_id"
      }
    }
  }
}

Troubleshooting

  • Authentication fails:
    • Confirm OVERLEAF_TOKEN is valid and has Git access.
    • Re-check your Overleaf subscription supports Git integration.
  • 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.

Requirements

  • Python 3.13+
  • uv package manager

License

MIT - See LICENSE

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured