Aldine / LaTeX MCP server
Connect Claude to a LaTeX project over MCP
We found no official Overleaf MCP server (checked 12 October 2026; details below), so this page shows what a LaTeX MCP server does and how to connect Claude to one. An MCP server for LaTeX gives an assistant such as Claude a set of tools on your project: read the files, edit them, typeset, read the errors back and show the PDF. Aldine, an open-source self-hosted LaTeX editor, has one built in. This page explains what it does, how to connect it, and how you review what Claude changed.
Written by the Aldine project, so read it with that in mind. Every statement about another product links to that product's own documentation. Checked on 12 October 2026.
Claude, connected over MCP, tightens the abstract, adds a section, typesets, and shows the PDF. Every edit lands as a commit you can review or revert.
What a LaTeX MCP server does
The Model Context Protocol (MCP) is a standard way for an AI application to call tools on another system. For a LaTeX project the useful tools are few:
- Read the file tree and the source as the editor shows it now.
- Edit by replacing exact quoted text, or write whole files.
- Compile with latexmk and get errors back with file and line.
- Show the PDF in the chat.
- Handle citations: resolve a DOI or arXiv id to BibTeX, list the citation keys and labels that exist.
In Aldine the server is the editor's own backend, so Claude works on the same documents your co-authors have open. Its edits arrive in the live document as those of an attributed collaborator, and your cursor stays where it was.
Is there an Overleaf MCP server?
Not an official one that we could find. On 12 October 2026, a search of Overleaf's GitHub organization for "mcp" returned no repositories, and the index of Overleaf's documentation lists AI features (an AI assistant, Error Assist, an AI table generator) but no MCP page. (Overleaf on GitHub, search for mcp, as of October 2026) (Overleaf documentation index, as of October 2026)
Third-party projects exist. One example is a community Overleaf MCP server by M-H-Amini, listed on mcp.so, whose README asks for a project id and an Overleaf token. (mcp.so listing, repository, as of October 2026) It does not claim an affiliation with Overleaf. We have not tested it or any other, so check who maintains a server and how it reaches your projects before you give it credentials.
Aldine takes the other route: the MCP server is part of the editor you host, so there is no separate bridge to trust.
If your papers live on Overleaf and you want its built-in AI features, that is the simpler path. The rest of this page is about Aldine.
Connect in three steps
This is the short version of the full setup guide on GitHub. You need a running Aldine instance: see self-hosting Aldine with Docker Compose.
1. Turn the endpoint on
The MCP endpoint is off by default. Set ALDINE_MCP=1 and ALDINE_PUBLIC_URL, and choose how Claude authenticates. With multi-user mode (AUTH_ENABLED=1) Claude connects with a Connect button and each user picks the projects it may touch. With auth off, set a static token. The shortest local setup is a .env file next to the compose files:
ALDINE_MCP=1
ALDINE_MCP_TOKEN=<openssl rand -hex 32>
# the origin you will type into the connector; the PDF links are absolute against it
ALDINE_PUBLIC_URL=http://localhost:8080
The minimal docker-compose.yml has no environment: block, so there are two ways to pass these variables. To keep the prebuilt release images, add an environment: block with the three variables to the app service of the minimal file. Or, from a clone of the repository, use docker-compose.full.yml, which passes them through and builds from source:
docker compose -f docker-compose.full.yml up -d --build
The first build installs TeX Live into the compiler image and takes 20 to 60 minutes; later starts take seconds. ALDINE_MCP=1 with neither AUTH_ENABLED nor ALDINE_MCP_TOKEN answers 401 to everything: there is no mode without a credential.
2. Find the connector URL
The connector URL is <ALDINE_PUBLIC_URL>/mcp, for example https://aldine.example.com/mcp. The boot log prints it as "MCP connector at …", and with auth on the Agent access card in your account settings shows and copies it. To check that it is reachable:
curl -si -X POST https://<host>/mcp -H 'content-type: application/json' -d '{}'
This should answer HTTP/1.1 401 with the body {"error":"A valid access token is required"}.
3. Add it to Claude
claude.ai, Claude Desktop and Cowork: open Customize, Connectors, Add, then "Add custom connector", and paste the connector URL. On Team and Enterprise plans an owner adds the connector under Organization settings first. (Anthropic: custom connectors using remote MCP, as of October 2026) Then click Connect: Aldine shows a consent page where you choose "All projects, now and later" or "Only these projects". With a static token, add X-Aldine-Token: <ALDINE_MCP_TOKEN> under Request headers, which Anthropic documents for fixed credentials that Claude sends on every request, and save without clicking Connect (as tested in October 2026).
Claude Code:
claude mcp add --transport http aldine https://<host>/mcp
claude mcp login aldine # or type /mcp in a session and pick Aldine
Anthropic states that with a custom connector "Claude connects to your remote MCP server from Anthropic's cloud infrastructure, rather than from your local device", in every client including claude.ai, Claude Desktop and Cowork, so the server "must be reachable over the public internet". (Anthropic: custom connectors using remote MCP, as of October 2026) For Aldine that means HTTPS on a public address. Claude Code runs on your machine and, as tested in October 2026, reaches an instance on localhost or your LAN over plain HTTP.
What the tools do
| Tool | What it does | Read-only |
|---|---|---|
ping | Confirms the connector is reachable and who the token belongs to. | yes |
list_projects | Projects the credential can reach, with branches, root file and engine. | yes |
project_structure | File tree of a branch. | yes |
read_file | A text file as the editor shows it now, windowable by line. | yes |
edit_file | Replaces exact quoted text; merges with live typing as a CRDT edit. | no |
write_file | Creates or replaces a whole file. | no |
batch_write | A multi-file change as one named commit; all-or-nothing. | no |
compile | Typesets with latexmk and returns errors and warnings with file and line, the page count and a signed PDF link. | no |
get_pdf_url | A fresh signed link to the last typeset PDF without recompiling. | yes |
commit | Commits any agent work still waiting on the branch as one named commit. | no |
references_add | Resolves a DOI, arXiv or OpenAlex id to BibTeX and appends it to the project's .bib. | no |
list_citations | Citation keys in the project's .bib files, with title, author, year. | yes |
list_labels | \label targets across the project's .tex files. | yes |
wordcount | Words in the root file and the files it includes. | yes |
create_project | A new project, blank or from a template. | no |
trash_project | Moves a project that the agent created to the workspace trash. It never purges. | no |
No tool purges a project, changes sharing, pushes to a git remote or manages tokens. The full descriptions, including how conflicting writes are refused, are in the tool reference.
Try it on the demo
The public demo at demo.aldine.dev runs the MCP server with a token that is public on purpose, so you can try the loop before you install anything.
| Connector URL | https://demo.aldine.dev/mcp |
|---|---|
| Header | X-Aldine-Token: aldine-demo |
In claude.ai, Claude Desktop or Cowork, add a custom connector with that URL, put the header under Request headers, and save without clicking Connect. In Claude Code:
claude mcp add --transport http aldine-demo https://demo.aldine.dev/mcp \
--header "X-Aldine-Token: aldine-demo"
Then ask Claude to list the projects, create one and typeset it. The demo is a shared sandbox: every project is writable by anyone, it is wiped nightly at 04:00 UTC, and typesets are capped at 6 per minute per address. Put nothing there that you would mind losing or having read.
How you review what Claude did
- Every edit is a git commit. Each write tool commits as author "Claude" before it answers. A Claude commit's diff is exactly Claude's change: what a person typed in the meantime reaches history separately.
- Review and revert. When a session goes quiet, the editor shows "Claude edited N files" with a Review action that opens the diff and a "Revert these changes" button. Revert creates one new commit; history is never rewritten.
- Visible while it happens. Claude appears in the presence strip while it edits a document someone has open, and the History panel marks its commits.
- Sandboxed compiles. Typesets run in the same compiler container as yours: no network egress, dropped capabilities, restricted shell-escape.
- Scoped credentials. A token or connection can be limited to chosen projects and revoked from the Agent access card.
Because projects are git repositories, the same history is what you push to GitHub or GitLab: see git with Overleaf and a git-native alternative.
Limits
- The MCP server is optional and off by default.
- It needs your own Aldine instance, or the public demo for a trial. There is no hosted service today.
- claude.ai, Claude Desktop and Cowork cannot reach an instance behind a VPN or on a private network (Anthropic: custom connectors using remote MCP, as of October 2026). Claude Code can.
- As tested in October 2026, the PDF renders inside the chat on claude.ai, Claude Desktop and Cowork; other clients get a signed link that is valid for 15 minutes.
- Aldine itself is young (v0.x) and has no keystroke-level track changes; review is by comments with suggested edits and by git diffs.
No account, no install. The demo is a shared sandbox and resets every night.