Overleaf MCP logo

Overleaf MCP

by @mjyoo2

Read, inspect, and edit Overleaf LaTeX projects through MCP using Git-backed file and section tools.

Install Overleaf MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "mjyoo2-overleaf-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@mjyoo2/overleaf-mcp"
      ],
      "env": {
        "OVERLEAF_PROJECT_ID": "YOUR_VALUE_HERE",
        "OVERLEAF_GIT_TOKEN": "YOUR_VALUE_HERE",
        "OVERLEAF_GIT_TOKEN_FILE": "YOUR_VALUE_HERE",
        "OVERLEAF_PROJECT_NAME": "YOUR_VALUE_HERE",
        "OVERLEAF_PROJECTS_CONFIG": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Claude Code command
claude mcp add --env OVERLEAF_PROJECT_ID=YOUR_VALUE_HERE --env OVERLEAF_GIT_TOKEN=YOUR_VALUE_HERE --env OVERLEAF_GIT_TOKEN_FILE=YOUR_VALUE_HERE --env OVERLEAF_PROJECT_NAME=YOUR_VALUE_HERE --env OVERLEAF_PROJECTS_CONFIG=YOUR_VALUE_HERE --transport stdio mjyoo2-overleaf-mcp -- npx -y @mjyoo2/overleaf-mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

Install not yet sandbox-tested— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.

Overview

@mjyoo2/overleaf-mcp connects MCP clients to Overleaf projects through Overleaf's Git integration. It can browse project files, read LaTeX content, parse sections and subsections, and produce project status summaries. Write operations either replace an entire file or target one named section before pushing changes with a commit message. Reach for it when an AI assistant needs to inspect or make controlled edits to one or more Overleaf projects.

Use cases

  • Browse files across configured Overleaf projects
  • Inspect the section structure of a LaTeX document
  • Extract a named section for review or analysis
  • Replace one LaTeX section and push a focused commit
  • Summarize the structure and status of an Overleaf project

Key features

  • Overleaf Git integration
  • Multi-project configuration
  • LaTeX section and subsection parsing
  • Project file listing and reading
  • Whole-file and section-level writes
  • Project status summaries

Tools8

What Overleaf MCP lets your agent do. Expand a tool for its parameters.

Verified live~630 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

19/19 checks healthy over the last 45d

What it can do

From the 8 tools this server returned when we ran it.

Writes files · 2Read-only tools · 6
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceNot published
Package age173 days
Maintainers1

Observed 2026-10-24 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 12d ago via OSV.dev · @mjyoo2/overleaf-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars379Stargazers on the source repository.
npm downloads761Package downloads in the last 30 days.
Last commit5d agoMost recent push to the default branch.
Tools exposed8Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Overleaf MCP works

What @mjyoo2/overleaf-mcp MCP server does

@mjyoo2/overleaf-mcp exposes Overleaf project access through the Model Context Protocol. It uses Overleaf Git credentials to retrieve project files and send changes back to Overleaf. The server supports both general file operations and LaTeX-aware navigation, making it suitable for papers, theses, and other projects organized as LaTeX documents.

Projects can be configured individually or grouped in a shared configuration file. With more than one project configured, tool calls can select a project by its configured name; calls without a project name use the default entry.

How it works

The server runs as a standard stdio MCP process. The recommended launch method uses npx -y @mjyoo2/overleaf-mcp; Claude Desktop configuration examples are supplied for macOS, Linux, and Windows. Windows launches npx through cmd /c, while macOS and Linux invoke it directly.

At startup, the server selects the first available configuration source in this order: environment variables, an environment-specified token file, an explicitly configured multi-project file, the user configuration directory, the working directory, and finally a legacy package-directory file. Environment variables take precedence when multiple sources exist.

Overleaf project IDs come from project URLs, and Git tokens are created from Overleaf account settings under Git Integration. A token can be supplied directly or loaded once from a file, with trailing whitespace removed. For local development, the repository can also be cloned and run with Node.js after installing its dependencies.

Setup and configuration

A single project needs OVERLEAF_PROJECT_ID and either OVERLEAF_GIT_TOKEN or OVERLEAF_GIT_TOKEN_FILE. OVERLEAF_PROJECT_NAME can provide a display name. The simplest Claude Desktop setup places these values in the MCP server's env object and starts the package with npx.

For multiple projects, create projects.json with a projects object. Each entry can contain a display name, projectId, and gitToken. The usual locations are %APPDATA%\\overleaf-mcp\\projects.json on Windows and $XDG_CONFIG_HOME/overleaf-mcp/projects.json on macOS or Linux, falling back to ~/.config/overleaf-mcp/projects.json. OVERLEAF_PROJECTS_CONFIG can point to a different absolute path.

The optional mainFile property identifies the entry point used by status_summary. Without it, the summary chooses the first filename containing main.tex. If that file is absent, the summary falls back to its default selection and reports a warning.

Tools and capabilities

  • list_projects returns the configured project entries.
  • list_files lists project files, filtering to .tex files by default. An extension filter and project name can be supplied.
  • read_file retrieves a file by its path.
  • get_sections parses a LaTeX file and returns its sections and subsections.
  • get_section_content retrieves content associated with a specified section title.
  • status_summary reports project status and structure, including the selected main file.
  • write_file replaces a file's full contents and pushes the change with a required commit message.
  • write_section replaces one named section, including its heading, and pushes the result. This is the narrower option for edits that should leave the rest of the file unchanged.

Most tools accept an optional projectName; file and LaTeX tools require the relevant file path, while section tools also require a section title. Write operations require replacement content and a commit message.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Overleaf MCP

@mjyoo2/overleaf-mcp is an MCP server that connects AI assistants to Overleaf projects through Git integration. Its main tools list and read project files, parse LaTeX sections, summarize project status, and write either complete files or individual sections back to Overleaf with commits.

Run it through `npx -y @mjyoo2/overleaf-mcp` in an MCP client configuration. Claude Desktop users can add the package as a server, provide the Overleaf project ID and Git token in `env`, then restart Claude Desktop.

Create a `projects.json` file containing named project entries with `name`, `projectId`, and `gitToken` values. Place it in the supported user configuration directory or set `OVERLEAF_PROJECTS_CONFIG`, then pass the entry name as `projectName` in tool calls.

Use `write_section` with the file path, section title, replacement content including the section heading, and a commit message. It replaces the named section instead of writing the entire file.

Set `OVERLEAF_PROJECT_ID` together with `OVERLEAF_GIT_TOKEN_FILE` and point the latter to a token file. The server reads the file once at startup and trims trailing whitespace or a final newline.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewOverleaf MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mjyoo2-overleaf-mcp?style=directory)](https://allmcps.com/mcp/mjyoo2-overleaf-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/mjyoo2-overleaf-mcp"><img src="https://allmcps.com/api/badge/mjyoo2-overleaf-mcp?style=directory" alt="Overleaf MCP on AllMCPs" /></a>