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

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/mjyoo2/OverleafMCP  
**GitHub Stars:** 326  
**Views:** 0  
**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 projects.
- **list_files** — List files in a project (default: .tex files).
- **read_file** — Read a specific file from the 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 the full content of a file to the project.
- **write_section** — Write the content of a specific section to the project.

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

The @mjyoo2/overleaf-mcp MCP server gives an MCP client access to Overleaf project files through Git. It is designed for LaTeX-oriented workflows where an assistant needs to inspect source, understand document organization, or apply edits without manually copying files between systems.

Supported operations include listing configured projects, listing files, reading a file, retrieving a LaTeX file's sections, and extracting the content of a named section. A status summary provides an overview of a project's status and structure. Write operations can replace an entire file or update a specific section, and both require a commit message.

## How it works

The server runs as a stdio MCP process. It uses an Overleaf project ID and Git token to access the project through Overleaf's Git integration. MCP clients send tool calls over the process connection, while the server performs the corresponding project read or write operation.

A single-project setup uses environment variables. For multiple projects, a projects.json file maps identifiers such as `default`, `thesis`, or `paper2` to display names, project IDs, and Git tokens. Tool calls can include `projectName` to select a configured project; when that argument is omitted, the `default` project is used.

The available tools are:

- `list_projects` to show configured projects.
- `list_files` to list files, with an optional extension filter.
- `read_file` to retrieve a file.
- `get_sections` to parse sections from a LaTeX file.
- `get_section_content` to extract a section by title.
- `status_summary` to inspect project status and structure.
- `write_file` to replace a file's full contents.
- `write_section` to replace a named section, including its heading.

## Setup and configuration

The recommended package-based setup runs the server with `npx -y @mjyoo2/overleaf-mcp`. Claude Desktop configuration uses the `mcpServers` object and passes credentials in its `env` block. On Windows, the documented command wraps `npx` with `cmd /c`; macOS and Linux invoke `npx` directly.

For one project, set `OVERLEAF_PROJECT_ID` and `OVERLEAF_GIT_TOKEN`. `OVERLEAF_PROJECT_NAME` can provide a display name. Instead of placing the Git token directly in the client configuration, set `OVERLEAF_GIT_TOKEN_FILE` to a token file; the token is read once at startup and trailing whitespace is removed.

For several projects, create `projects.json` in the documented user configuration directory, or set `OVERLEAF_PROJECTS_CONFIG` to an absolute path. Each entry contains `name`, `projectId`, and `gitToken`. Configuration sources are checked in priority order, with environment variables taking precedence over files.

Overleaf's project ID comes from the project URL. A Git token is created under Overleaf Account Settings, in Git Integration. The repository also documents running a cloned script directly, testing a packed npm artifact, and smoke-testing the stdio protocol from a shell.

## Limitations and notes

The @mjyoo2/overleaf-mcp MCP server operates on project files through Git, so valid Overleaf Git credentials are required. The environment-variable quick start handles one project; multi-project use requires the projects.json format. `list_files` defaults to `.tex` files unless an extension filter is supplied.

`write_file` replaces the full file, while `write_section` replaces the selected section and expects replacement content that includes the section heading. Both write tools require an explicit commit message. The provided setup instructions describe Claude Desktop configuration and do not specify behavior for other MCP clients.

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

