# @mjyoo2/overleaf-mcp [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/mjyoo2/OverleafMCP  
**GitHub Stars:** 379  
**npm Downloads (last month):** 761  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mjyoo2-overleaf-mcp

## Description
MCP server that lets AI assistants read Overleaf projects, parse LaTeX document structure, and push section-level edits back via Git.

## Tools
Capabilities this server exposes over MCP:

- **list_projects** — List all configured Overleaf projects
- **list_files** — List files in an Overleaf project
- **read_file** — Read a file from an Overleaf project
- **get_sections** — Get all sections from a LaTeX file
- **get_section_content** — Get content of a specific section
- **status_summary** — Get a comprehensive project status summary
- **write_file** — Write content to a file in an Overleaf project and push to Overleaf
- **write_section** — Replace a single section in a LaTeX file and push to Overleaf. Safer than write_file for targeted edits — only the named section is replaced, leaving the rest of the file untouched.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "overleaf-mcp": {
    "command": "npx",
    "args": ["-y","@mjyoo2/overleaf-mcp"],
    "env": {
      "OVERLEAF_PROJECT_ID": "",
      "OVERLEAF_GIT_TOKEN": "",
      "OVERLEAF_GIT_TOKEN_FILE": "",
      "OVERLEAF_PROJECT_NAME": "",
      "OVERLEAF_PROJECTS_CONFIG": ""
    }
  }
}
```

**Requires environment variables:** `OVERLEAF_PROJECT_ID`, `OVERLEAF_GIT_TOKEN`, `OVERLEAF_GIT_TOKEN_FILE`, `OVERLEAF_PROJECT_NAME`, `OVERLEAF_PROJECTS_CONFIG` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## 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.

_Full upstream README: https://allmcps.com/mcp/mjyoo2-overleaf-mcp/readme_

