Aldine / LaTeX MCP server

Connect Claude to a LaTeX project over MCP

Aldine is an open-source, self-hosted LaTeX editor with a built-in MCP server that Claude can use. Through it, Claude reads and edits the files in your project, typesets it, reads the errors back with file and line, shows the PDF in the chat, and commits every change to git for you to review.

We found no official Overleaf MCP server (checked 12 October 2026); community bridges and other options are listed below. This page explains how to connect Claude to Aldine, how Claude fixes compile errors, what the tools do, 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 page. Checked on 12 October 2026, updated 31 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:

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.

Let Claude fix your compile errors

  1. Put the paper in Aldine. Create a project, or download an Overleaf project as a ZIP and drop it on the Aldine home screen.
  2. Connect Claude. In claude.ai or Claude Desktop, add a custom connector with your instance's connector URL, https://<host>/mcp. In Claude Code, install the Aldine plugin (/plugin marketplace add trahloff/Aldine, then /plugin install aldine@aldine) or run claude mcp add --transport http aldine https://<host>/mcp. Setup in detail.
  3. Ask for it. For example: "Typeset my paper and fix the errors."
  4. Claude typesets and reads the log. The compile tool runs latexmk and returns the errors first, each with file, line, message and the source line, and names a missing package as a hint.
  5. Claude fixes the first error. It reads the lines around it and replaces the exact text that fails. The edit is a git commit authored "Claude".
  6. Claude typesets again and shows the PDF once it builds. The plugin's latex-fix-build skill stops after three attempts and reports what is left, and it reports a package missing from the compiler instead of editing it out.

You review the result in the editor: "Claude edited N files" opens the diff, and "Revert these changes" undoes it in one new commit.

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)

Community projects bridge Claude to Overleaf. Each describes itself on its own page as follows; none claims an affiliation with Overleaf:

We have not tested any of them, 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.

Other LaTeX editors have their own. letX, a hosted collaborative LaTeX editor, runs a hosted MCP server at https://api.letx.app/mcp that creates projects, writes files and compiles them to PDF. (letX: MCP server, as of October 2026) We have not tested it either.

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

Or install the Aldine plugin for Claude Code. It configures the same connector from ALDINE_URL and adds three skills: latex-fix-build (typeset, read the error, edit, typeset again, at most three attempts), latex-draft-section and latex-bibliography.

In your shell, before you start Claude Code:

export ALDINE_URL=https://<host>    # no trailing slash

Then, inside Claude Code:

/plugin marketplace add trahloff/Aldine
/plugin install aldine@aldine

With auth off, also export ALDINE_TOKEN set to the instance's ALDINE_MCP_TOKEN. With auth on, leave it unset and connect through /mcp.

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

ToolWhat it doesRead-only
pingConfirms the connector is reachable and who the token belongs to.yes
list_projectsProjects the credential can reach, with branches, root file and engine.yes
project_structureFile tree of a branch.yes
read_fileA text file as the editor shows it now, windowable by line.yes
edit_fileReplaces exact quoted text; merges with live typing as a CRDT edit.no
write_fileCreates or replaces a whole file.no
batch_writeA multi-file change as one named commit; all-or-nothing.no
compileTypesets with latexmk and returns errors and warnings with file and line, the page count and a signed PDF link.no
get_pdf_urlA fresh signed link to the last typeset PDF without recompiling.yes
commitCommits any agent work still waiting on the branch as one named commit.no
references_addResolves a DOI, arXiv or OpenAlex id to BibTeX and appends it to the project's .bib.no
list_citationsCitation keys in the project's .bib files, with title, author, year.yes
list_labels\label targets across the project's .tex files.yes
wordcountWords in the root file and the files it includes.yes
create_projectA new project, blank or from a template.no
trash_projectMoves 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 URLhttps://demo.aldine.dev/mcp
HeaderX-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

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

Try the live demo View source on GitHub

No account, no install. The demo is a shared sandbox and resets every night.

Common questions

Is there an MCP server for Overleaf or another LaTeX editor that Claude can use?

Yes. Aldine, an open-source self-hosted LaTeX editor, has an MCP server built in: Claude reads and edits the files in a project, typesets it, reads the errors back with file and line, shows the PDF and commits each change to git. We found no official Overleaf MCP server (checked 12 October 2026); community projects reach Overleaf through its git integration or its web interface, and letX runs a hosted MCP server for its own editor. See Overleaf MCP servers and other options.

Which LaTeX editors let an AI assistant like Claude edit and compile my paper?

Aldine does, through its built-in MCP server: add your instance as a connector in claude.ai, Claude Desktop or Claude Code, and Claude edits the live document, typesets with latexmk and shows the PDF. As of October 2026, letX offers a hosted MCP server that writes files and compiles them, and community MCP servers for Overleaf edit through Overleaf's git integration or its web interface, some with a compile step. We have not tested those; the list above links each one's own page.

How can I connect Claude to my LaTeX project so it can fix compile errors?

Put the project in Aldine and add the instance's connector URL (https://<host>/mcp) to Claude: as a custom connector in claude.ai or Claude Desktop, or with the Aldine plugin or claude mcp add in Claude Code. Then ask Claude to typeset the paper and fix the errors: it compiles, reads the first error with its file and line, edits the failing text and typesets again, and each fix is a git commit you can review or revert. The steps are above.

Can I try it without installing anything?

Yes. On the public demo, use the connector URL https://demo.aldine.dev/mcp with the header X-Aldine-Token: aldine-demo. It is a shared sandbox that is wiped nightly, so put nothing private there.

Does it work with an Aldine on localhost or a private network?

With Claude Code, yes: it runs on your machine and reaches http://localhost:8080/mcp over plain HTTP. claude.ai, Claude Desktop and Cowork connect from Anthropic's cloud, so they need the instance on a public HTTPS address.