Skip to main content
Glama

tex-mcp-web

tests license release python glama

Comment on your paper's PDF, and the coding agent that did the research fixes the LaTeX.

It makes giving feedback easier, without limiting what the agent can do.

tex-mcp-web adds a review page for LaTeX papers to Claude Code and Codex. You open the page in a browser and comment on the PDF, and the agent edits the source. It runs on Windows, macOS and Linux.

Select words in the PDF, or draw a box over a figure or a table, and write what should change.

Call agent, the bell button above the comment list, sends all your comments at once. The agent edits the source, builds the PDF again and answers each comment. For a change of wording it shows the old and the new text, and you apply or reject it.

The agent is the session you already work in. It wrote the code and ran the experiments, so it answers from that work, and nothing is copied into another tool.

Quick start

  1. Paste this into Claude Code or Codex, and restart the agent when it is done:

    Install tex-mcp-web by following https://raw.githubusercontent.com/MiiKiyoshi/tex-mcp-web/main/INSTALL.md

    The agent says what it will install and installs once you agree.

  2. Say do tex init in the session where you work. The agent finds the paper in the folder and saves the settings once you agree. If the paper is on Overleaf, give the agent the project's link, and the page brings the files in.

  3. Open the address the agent gives, comment on the PDF, and press Call agent.

You need Python 3.10 or newer and a LaTeX installation with latexmk. The agent checks both and asks before it installs anything.

The page is served from your own machine and answers only to it. Your comments are kept in the paper's folder. The page contacts three places: Overleaf when you connect it, the translation program when you set one, and the package index once a day for a newer release.

Related MCP server: Overleaf MCP

Work with co-authors on Overleaf

do tex init asks for the project's link, and Connect Overleaf, the leaf button in the page's top bar, takes the same link. The page asks once for your Overleaf sign-in cookie.

Your co-authors' comments then appear on the page. Under each comment you talk with the agent in private, and the agent drafts the reply. Only the reply you send appears on Overleaf.

The agent also turns a rough note into a new comment for your co-authors. Edits they suggest on Overleaf are accepted or rejected here. A search finds one comment by its writer, its file and its date. Working with Overleaf shows each of these, and how the files stay in sync with Overleaf.

Read the paper in your language

The page shows each paragraph in your language under the PDF. A click on a translated paragraph opens its lines in the source, and the paragraph you edit stays highlighted. You choose the program that translates, so you choose the model and the cost. Translation describes the setup.

More

  • Page limit. The agent sees where the text ends and how many lines are left, so it can shorten the paper to fit and check the result. The Problems tab beside the comments shows you the same, and Problems describes it.

  • Writing rules. The agent reads your rules from a file before it edits, in every paper whose settings name the file. Configuration describes the two settings, guideline and references.

  • Keyboard. Every step works without the mouse, and the page's source editor has Vim keys. Comment keys lists them.

  • Files. The folder button at the left of the top bar lists the paper's sources and figures. You upload, rename and delete them there, and a deleted file stays in a trash for seven days. Files describes it.

  • Tablet and phone. The page works by touch. Opening the page from another device also covers an agent that runs on a server.

  • Settings. do tex init saves them in .tex-mcp-web.yaml. Configuration describes every field.

⭐ If this helps your writing, please give it a star. It helps others find the project.

See also

html-mcp-web reviews an AI agent's HTML slides or reports the same way, and exports finished slides as an editable PowerPoint deck.

Acknowledgements

tex-mcp-web is a hard fork of queelius/scholia at commit e6c7454 (version 0.6.1) and has been developed independently since then under the MIT license; see LICENSE. The PDF viewer is EmbedPDF with its PDFium WebAssembly engine, whose notices are in tex_mcp_web/static/embedpdf/LICENSE and tex_mcp_web/static/embedpdf/LICENSE.pdfium. The bundled viewer differs from the release only in its zoom gesture, which is described in Reviewing in detail. Syntax highlighting and completion in the source editor use Ace Editor builds 1.44.0 under the BSD-3-Clause license, and its notice is in tex_mcp_web/static/ace/LICENSE.

The server reads the compiled PDF with PyMuPDF, which is installed as a separate package and is licensed under the GNU AGPL 3.0 or a commercial license from Artifex.

Available Tools

8 tools
compileA

Compile the paper. Returns whether it succeeded, which pages changed, where the log is, and, when it failed, where each error is. Call once after a batch of source edits. pages_changed compares extracted PDF text and excludes visual-only changes. Read the log yourself for warnings and for the context around an error. A successful build also reports how the paper fits a page limit, as the page's Problems tab does. body_end is the last line before the bibliography, with its page, its column and the number of columns, the space below it to the end of the text block in points and in lines (once the paper has full columns to measure by), and its source. short_lines lists the paragraphs whose last line is narrower than a quarter of its column, including those in a list item or in centered text such as a table's caption, each with its page, column, words, width and source; shortening such a paragraph removes that line. A source is the line that contains a paragraph's last words.

Inputs: no named parameters.

guideB

Paths of the files to read in full before editing the paper: the paper's guideline and the guidelines it extends, base first, when guideline is set, and the terms its reference papers use, when references is set.

Inputs: no named parameters.

imageA

Render one PDF target as PNG. Choose exactly one of page (with optional bbox), source="file.tex:lstart-lend", or comment. Margin expands an exact bbox only while rendering. A multi-page source range renders the page with the most SyncTeX matches.

Inputs: dpi, bbox, page, margin, +3 more.

listenA

Return a command and client-specific instructions for listening for Call agent presses. Run the returned command as its how field describes; how is written for the connected client. Stop it when the review is finished or the user asks.

Inputs: no named parameters.

overleafA

Compare this folder with its Overleaf project. state reads Overleaf again and reports only what differs: get (Overleaf's edits not here), send (edits here not on Overleaf), choose (files waiting for the reviewer to choose), and, in a git clone, the commits behind and ahead. suggested lists the edits made on Overleaf with track changes on, which wait for the reviewer to accept or reject them on the page; Overleaf's text contains the words of a suggested insertion but not those of a suggested deletion. get brings Overleaf's edits into this folder (git pull in a git clone, Get otherwise); it changes only files here, and a conflict changes nothing. push sends a git clone's commits (git push). Without git, only the reviewer sends edits, from the page.

Inputs: action.

read_commentsA

Read review threads: what is new, selected threads in full, or a listing. new answers a Call agent press in one call. For each open thread it returns what the reviewer has written that no earlier call with new returned and no answer has covered yet, with the thread's rev, which a write passes back. A thread's last answer covers everything before it; an answer is your reply, your Overleaf draft, or a public reply the reviewer sent to Overleaf. A suggestion the reviewer applied is returned once, as an entry marked applied with the lines it changed. Your wording is then in the file, and the entry needs no reply, except on a thread from Overleaf with no draft, where the change calls for a reply. A suggestion or an Overleaf draft the reviewer rejected is also returned once, as an entry marked rejected with the rejected text, and it stays in the thread for a later read by id. It needs no reply. Do not propose the same thing again unless the reviewer asks; if they give a reason, it is in one of their replies. The answer gives the moment the read started from (from) and the one it moved to (cursor), so a turn that went wrong can be repeated with since=; to see again what was already answered, read the thread by id. A thread from Overleaf is marked on_overleaf, and one the reviewer started for Overleaf but has not sent there yet is marked new_thread; a thread with a draft for Overleaf comes with that draft. An entry is public, on Overleaf for everyone in the project, when it has name (written there) or overleaf (sent there from the page), and so is comment, the first message, of a thread marked on_overleaf. Every other entry is private, for the reviewer and you, and so is everything in a thread that is not on Overleaf. ids returns those threads in full, for when you no longer remember a conversation; with since it returns only the entries after that time. With neither, it returns a listing: the newest limit threads, each request shortened to its beginning and the rest counted in older, narrowed by status, unanswered or since. With find or until it is a search instead, entry by entry: a thread is listed when something said in it between since and until contains find's words, whether the reviewer's, yours, a public reply sent to Overleaf (marked overleaf) or its draft for Overleaf, and it comes with those entries and its location. A long entry is shortened to the words around the match and marked cut, and only a thread's newest few matches are shown, with the rest counted in more_matches; read the thread by id to see it in full. The bounds and the words are each optional, and status="all" also searches closed threads. A thread from Overleaf the reviewer hid on the page has status "hidden": it is set aside, as an archived thread is, so new and the open listing leave it out. on_overleaf limits a listing or a search to Overleaf's threads or to the page's own, which are entirely private, and file limits either to the threads on one source file, each with its lines in source. Times are shown and passed back as MM-DD HH:MM on this server's clock. save requires ids; edit only the Reply and Edit blocks of the saved draft.

Inputs: ids, new, file, find, +7 more.

setup_infoA

Report setup paths, the existing binding with the paper's folder it serves, the guidelines to choose from, the path of the tex-mcp-web command, whether translation is set up and with which models, and whether the reviewer's Overleaf cookie is saved, without connecting or changing files.

Inputs: no named parameters.

write_commentsA

Write to a comment thread. What you write is private, on the review page for the reviewer and you. overleaf drafts what becomes public, on Overleaf for everyone in the project, once the reviewer sends it. add: text and anchor, plus changes, quoted as for suggest, when the reviewer has asked for proposals left as comments; the new thread then carries that proposal. reply: id and text, or a saved draft on its own. suggest: id, text, changes, rev. Each change's old is quoted from the file the comment is on and must occur there exactly once, as an editing tool expects; never give a line or a column. It replaces the thread's single current proposal and adds text as a reply, so the conversation stays complete. It is refused on a thread the reviewer has not written in: propose on their thread instead of opening your own beside it. withdraw: id, text, rev. overleaf: id, text, rev, and edits naming the source ranges the reply describes, by their current lines; later edits move these ranges as they move a comment, so the draft does not need rewriting when lines shift. On a thread that came from Overleaf (on_overleaf), it drafts the public reply that the reviewer may send there. A thread has one draft, which this replaces, and only the reviewer sends it. A first message the reviewer wrote themselves (overleaf_draft_by: reviewer) is not replaced: your text is added to the thread as your private reply suggesting the wording. The reviewer is asked first when a file that contains those ranges differs between here and Overleaf. Since the draft is public once sent, word it for the people on Overleaf, and answer what the reviewer asks you in the thread with reply, which is private. With anchor (a source_range) instead of id and rev, overleaf drafts a new public thread for Overleaf on those lines, with text as its first message. The result is a thread that has the draft and is not on Overleaf. Call overleaf with its id and rev to redraft it. Only the reviewer sends it, and only once the current text of those ranges is on Overleaf. The reviewer may discuss the draft with you in the thread before sending it, and those entries are private. A thread the reviewer started for Overleaf (new_thread) is waiting for its first message there. What they wrote in it is private and meant for you, and overleaf with id and rev drafts the message they asked for, keeping the meaning of their words and using the register they asked for. edit: id, entry, text, rev; rewrites an entry you wrote. delete: id; refused once the reviewer has written in the thread. rev is the thread's token from read_comments; if the thread has changed since, the write is refused. edits names the source ranges a reply changed. A field the action does not take is refused. The reviewer resolves threads, not you. Returns id, status and rev.

Inputs: action (required), id, rev, text, +5 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 8 tools

    Disambiguation4/5

    Most tools have clearly distinct roles: compile, image, listen, overleaf, read_comments and write_comments target different actions, and the read/write comment pair is a standard, unambiguous split. The only mild overlap is setup_info versus guide, since both surface paths and configuration (setup_info even mentions 'guidelines to choose from' while guide returns guideline paths), which could briefly confuse an agent about where to look first.

    Naming Consistency3/5

    Names are all snake_case and readable, but conventions are mixed: bare verbs (compile, listen), bare nouns (guide, image, overleaf), a noun phrase (setup_info) and verb_noun pairs (read_comments, write_comments). The pattern is inferable from descriptions but there is no predictable scheme an agent can rely on.

    Tool Count5/5

    Eight tools is well within the sweet spot and each one earns its place: setup, compilation, guidelines, rendering, event listening, Overleaf sync, and the comment read/write pair. Nothing feels padded or thin for a LaTeX review workflow.

    Completeness4/5

    The surface covers the core lifecycle: discover setup, read guidelines, compile and inspect errors, render pages, sync with Overleaf, and read/write review threads including proposals and drafts. Minor gaps exist, such as no exposed translation operation despite setup_info reporting translation models, and no dedicated search over the compiled PDF beyond rendering an image, but agents can work around both.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      An MCP server for Overleaf that allows Claude or other agents to navigate projects, read and edit .tex files, compile, and interact with review-panel comments via Overleaf's real-time Socket.IO API, with seamless support for tracked changes as pending suggestions.
      33
      118 npm
      10
      AGPL 3.0
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server that exposes LaTeX compilation, log parsing, dependency inspection, and citation checking as tools for AI agents, using latexmk under the hood.
      11
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that enables LLMs to compile LaTeX documents and inspect the resulting PDF, supporting an autonomous write-compile-check-revise loop via a self-hosted Overleaf CLSI instance.
      1
      MIT