# LeafMCP MCP server

> Allows AI assistants to read, edit, and compile Overleaf projects directly through an MCP server.

- Repository: https://github.com/CherryLemon/leafmcp
- Page: https://hostedmcp.org/servers/cherrylemon/leafmcp
- Transport: —
- Stars: 0
- License: MIT

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `CF_TUNNEL_TOKEN` | no | no |  |
| `MCP_DOMAIN` | no | no |  |
| `OLMCP_DATA_DIR` | no | no |  |
| `OVERLEAF_SESSION` | no | no |  |
| `PUBLIC_URL` | no | no |  |

## Tools (26)

- `list_projects`
- `use_project`
- `project_overview`
- `list_files`
- `read_file`
- `read_files`
- `search_project`
- `file_outline`
- `edit_file`
- `write_file`
- `delete_file`
- `rename_file`
- `pending_changes`
- `compile`
- `publish_changes`
- `pull_project`
- `edit_history`
- `undo_operation`
- `undo_last_edit`
- `begin_change_set`
- `commit_change_set`
- `abandon_change_set`
- `list_comments`
- `add_comment`
- `reply_to_comment`
- `resolve_comment`

## FAQ

### How do I connect LeafMCP to my Overleaf account?

You need to obtain your Overleaf session cookie (overleaf_session2) and provide it to the server configuration.

### Does the server support undoing edits?

Yes, the server includes an undo tool that uses git reverts to reverse recent changes.

### Is it possible to run this locally without a public URL?

Yes, local clients like Cursor or Claude Desktop can connect using the stdio transport without needing a public address.
