Skip to main content

tex-mcp-web

tests license release python

Your coding agent already did the research. Let it write, review and fix the paper in the same session.

tex-mcp-web is an MCP server that adds a review page for LaTeX papers to Claude Code and Codex. You comment on the compiled PDF from a desktop, tablet or phone, and the agent edits the LaTeX source. It runs on Windows, macOS and Linux.

A coding agent analyzes logs, writes up the findings as a LaTeX paper, and during do tex init turns on the page token because the machine is a shared server. On the review page, three sentences in the PDF each get a comment, one press of Call agent sends them all, and once the agent's new wording is applied and compiled, the PDF shows the three sentences with their numbers.

The agent session that produced your results already has the context needed to write about them. Ask the agent to write the paper in a folder you choose, then say do tex init. The agent proposes settings for the review page, including the port and whether the page should open only from a private link, and sets the page up for that folder once you agree. Because the paper is written in the same session as the research, nothing has to be copied into another tool. Comment on as many places as you like, then press Call agent once. The agent handles all the comments in one turn and answers each one from the work it has already done.

Review from the PDF

A sentence selected in the PDF gets a comment asking for a number, and the agent proposes new wording as a −/+ pair while the source editor marks the words it would replace. Applying the proposal with aa clears the to do list, and after compiling, the PDF shows the new sentence.

Select words in the PDF, or draw a box over part of a figure, and write what should change. When your comments are ready, press Call agent, the bell icon above the comment list. The agent edits the source, compiles the paper and replies in each thread. Where the wording is yours to decide, it proposes a change instead, which you can apply or reject. In the recordings on this page, the keys being pressed appear in the bottom right corner.

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

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 checks your machine, tells you what it will do, and installs once you agree. This works the same way on Windows, macOS and Linux.

  2. In the session where you are working, say do tex init. The paper can be in any folder, either one you already have or one you ask the agent to create. The agent finds the main .tex file and a free port, shows you the settings it proposes, and writes .tex-mcp-web.yaml once you agree.

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

In later sessions, Claude Code started in the same folder listens for Call agent on its own. In Codex, say do tex listen after the agent starts.

Comment on figures and tables

On the second page of the PDF, a box drawn over a table without horizontal lines gets a comment asking for them. The agent adds booktabs rules, lists the lines it changed and compiles, and the PDF shows the updated table.

A figure, a table or a page's layout often has no text you can select. For these, pick the box tool next to the pan and pointer tools in the PDF toolbar, draw a box over the area and describe the problem. The agent treats a box like any other comment.

Fit the page limit

The Problems tab lists the build's errors and warnings, and below them shows where the body of the paper ends, just before the bibliography: the page, the column, and how many more lines fit in that column. It also lists each paragraph, list item or caption whose last line is shorter than a quarter of the column. Clicking an entry marks that line in the PDF. The agent's compile() tool reports the same list, so the agent can carry out a request like we are four lines over, pull up the short lines and check the result itself.

Answer your co-authors' Overleaf comments with the agent

Press Connect Overleaf in the top bar. Settings opens and asks for the project's link and, the first time, your Overleaf session cookie. The project's comment threads then appear in a tab of their own, Comments with a leaf icon, next to the tab for the comments you write on the page. Within a thread you talk with the agent, which drafts the public reply in the box below the thread, and you send that reply once you are happy with it.

Each tab opens on its open view. A comment is marked unanswered when its last message is not yours: the agent's reply in the Comments tab, or a co-author's message in the Overleaf tab. The unanswered view lists just those. The number on each tab counts them, along with the suggested edits waiting in the Overleaf tab, and when it disappears, nothing is waiting for your reply.

In a co-author's thread from Overleaf, the agent has misread the request and drafted a gushing reply. After a private reply corrects it, the agent fixes the sentence, the PDF shows the change, and the draft for Overleaf shrinks to one short line, which is sent with ss.

Every entry in a thread is either private or public. A private entry stays on the page, between you and the agent. A public entry is on Overleaf, where everyone in the project can read it. Your conversation with the agent is private and appears in the thread between your co-authors' public messages, so the whole exchange reads in order. Only the replies you send reach Overleaf.

The same thread on the review page and on Overleaf. The review page shows the co-author's comment, the conversation with the agent marked private and the sent reply marked public, while Overleaf shows only the comment and the sent reply.

While a page is open, your co-authors on Overleaf appear in the top bar and their cursors show in the editor. Your cursor in the page's editor also appears on Overleaf, unless you choose Hidden under Your cursor on Overleaf in Settings. Working with Overleaf covers this and the ways to keep the paper's files in sync with Overleaf: through git, by hand or live.

Raise a point with your co-authors on Overleaf

With the leaf button pressed, the words room temperature are selected in the source with v and gc, and a rough private note tells the agent what to ask the co-author. The agent drafts a polite question, which is sent with ss, so only the question appears on Overleaf while the note stays on the page, marked private.

To start a thread, turn on the leaf button next to the comment button (the speech bubble) in the editor toolbar, select words in the source, and press the comment button. Threads start from the source because Overleaf attaches each thread to source text. The dialog that opens has two boxes. In the lower one, a private note to the agent, describe what you want to raise, as roughly as you like. The agent drafts the thread's first message in wording suited to your co-authors, and you send it. The thread then appears on Overleaf, attached to those words, and your note stays private. If you write the first message yourself in the upper box, it is posted to Overleaf right away. You can also ask the agent, in any thread, to start a new thread, and it drafts that one the same way.

Accept or reject your co-authors' suggested edits

A co-author's tracked changes from Overleaf appear in the leaf tab's to do list: a replaced word, an insertion and a deletion, each shown in the source when opened with Space. Two are accepted with aa and one is rejected with dd, Get brings the rejection into the file, and the to do list is empty.

Edits your co-authors make on Overleaf with track changes on arrive as suggested edits. Each one appears as a card showing the removed and inserted text, and the editor marks it in the source. Accept and Reject, or aa and dd, act on Overleaf for everyone in the project.

Work through comments from the keyboard

Everything done without the mouse: gd opens the introduction's file, v and gc comment on a sentence, Ctrl+Alt+Enter calls the agent, K jumps to its comment, Space and aa apply its proposal, K returns to the text, :make compiles, gss finds the sentence in the PDF, Ctrl+O goes back to main.tex, and R resolves the comment.

You can move through the comment list with the keyboard, much as you move through the cells of a notebook. The editor also has Vim keys, which you turn on in the ⋯ menu of the editor toolbar. A ring marks the comment the keys act on, and the list scrolls beneath it so your eyes can stay in one place. K jumps between a comment and its words in the source, in either direction.

Key Action
j k Next and previous comment
Space Open the comment and show where it is in the PDF or the source
K Jump to the comment's words in the source; press it there to come back
r Reply privately to the agent
R Resolve, or reopen a comment that is not open
u Undo the last resolve, reopen or archive
aa Apply the suggestion, or accept a suggested edit
ss Send the reply to Overleaf
/ Search the comments
? Show every key

nn rejects a suggestion and dd deletes; like aa and ss, they are pressed twice. Once you start moving with the keys, the buttons on the marked comment show their key letters. The search box understands from:, file:, after: and before:, quoted phrases, - to exclude a word, and OR. Reviewing in detail lists every key, including the editor's Vim keys.

Review on a tablet or phone

The review page at tablet width and at phone width, both on the same comment: the PDF on top, zoomed to the commented sentence, and below it the thread with the agent's proposal.

The page is served from the machine where the agent runs. If that is your own computer, open http://localhost:8765, or the port do tex init chose, and skip the rest of this section. If the agent runs on a server you reach over SSH, forward the page's port to your computer. On Windows, macOS and Linux alike, add the server once to ~/.ssh/config (on Windows, C:\Users\<you>\.ssh\config), using the port that do tex init wrote to .tex-mcp-web.yaml:

Host paper-server
    HostName server.example.org
    User you
    LocalForward 8765 127.0.0.1:8765

Then, each time you work:

  1. Run ssh paper-server in a terminal. The port stays forwarded as long as that connection is open.
  2. Open http://localhost:8765 in your computer's browser.

If you review papers on other ports, add a LocalForward line for each.

If the server is on a network you cannot reach from outside, such as at home or in an office, Tailscale is an easy way in. Install it on the server and on your computer, and the server gets a name you can reach from anywhere. Put that name in HostName, and the steps above stay the same.

A phone works the same way. Termux on Android reads the same ~/.ssh/config, and in Termius on iOS you add the forward as a Local rule on the Port Forwarding screen. If the page token is on, open the link that tex-mcp-web link prints on the server instead, once in each browser; after that, the plain address works.

Teach the agent your writing rules and terms

Rules you give an agent in conversation do not last. After its context has been compacted a few times, it writes as if it had never heard them, and what Claude Code remembers for one paper's folder does not carry over to the next paper in the same field. Rules and terminology kept in files apply to every paper whose configuration points to them. In Claude Code, the agent cannot use tex-mcp's tools until it has read these files, and it has to read them again after every compaction. Codex does not enforce this yet.

Put your writing rules in a GUIDELINE.md file, in a folder of its own under ~/.config/tex-mcp-web/guidelines/, and set guideline to that folder's name. One guideline can extend another, which keeps the rules for every paper separate from those for a single field:

~/.config/tex-mcp-web/guidelines/
├── plain-writing/GUIDELINE.md    rules for every paper
└── my-field/GUIDELINE.md         rules for one field, starting with the lines below
---
extends: plain-writing
---

With guideline: my-field, the agent reads plain-writing first and then my-field.

Left to itself, an agent also tends to describe a concept in its own words where the papers in your field use an established term. Convert the papers your work builds on to Markdown with marker, keep them in one folder, and set references to that folder. The agent then reads the terms those papers use before it edits.

Configuration

do tex init writes .tex-mcp-web.yaml in the folder where the agent was started. A typical file looks like this:

main: main.tex
watch:
- '*.tex'
- '*.bib'
ignore:
- '*_backup.tex'
compiler: auto
port: 8765
guideline: my-field
translation:
  language: Korean
  instructions: Keep technical terms in English.
overleaf: https://www.overleaf.com/project/0123456789abcdef01234567

With translation set, Translation: Korean in the ⋯ menu at the top of the page shows each paragraph of the source in that language. The translation runs through a command line you choose, set as translation.command here or, for every paper, in ~/.config/tex-mcp-web/config.yaml. If you ask your agent to set up translation, it proposes a command and tests it. Configuration describes every field.

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.

Metadata

Release files for tex-mcp-web 0.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tex-mcp-web 0.11.0
File Size Uploaded Provenance Actions
tex_mcp_web-0.11.0.tar.gz 3.2 MB With provenance Details for tex_mcp_web-0.11.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tex-mcp-web 0.11.0
File Interpreter ABI Platform Actions
tex_mcp_web-0.11.0-py3-none-any.whl Python 3 none any Details for tex_mcp_web-0.11.0-py3-none-any.whl

Total release size: 6.3 MB

Release files / tex_mcp_web-0.11.0.tar.gz

Download URL tex_mcp_web-0.11.0.tar.gz
Size 3.2 MB
Tags Source
SHA-256 checksum
How to use checksums
cc7eb9d1f42f2e3767deaf75ee8ffac373ba7b7a6f796af59ee361a13feff8db
BLAKE2b-256 checksum
How to use checksums
f075a7640f6c7022695393189587eb8f6d4dce532dc1031d5f8e6b20e2c85444
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / tex_mcp_web-0.11.0-py3-none-any.whl

Download URL tex_mcp_web-0.11.0-py3-none-any.whl
Size 3.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
92744152904dab0bb177967b9840042d375d497bc1b8e7cc7ccd95be4c5f563a
BLAKE2b-256 checksum
How to use checksums
a675d5ec7ad2c17c94a85d93acd553956d3426ed18e67cd91666e956fc522186
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for tex-mcp-web 0.11.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tex_mcp_web-0.11.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page