zoe@dev:~$PID 1337
zoe@dev:~$ cat ~/tools/magictex/README.md

MagicTeX

You mark up the PDF. It edits the source.

// A LaTeX editor built for AI agents — an Overleaf-like workspace for Claude Code, with no local TeX install and no Overleaf account.

view on github ↗npm ↗mcp registry ↗
## the_problem

Every round of edits costs a round trip.

download .zip from Overleaf
hand it to the agent
agent edits blind — it never sees the page
re-upload, recompile, squint, repeat
+ comment on the page. it edits the line.

// the agent's problem was never writing LaTeX. it was knowing where.

## the_loop

A comment becomes a located instruction.

127.0.0.1:—/app● watching
main.tex
41  \section{Results}
42  We report a large speedup on the
43  benchmark.
preview.pdf — p.4
4 Results
We report a large speedup on the benchmark. The effect holds across every configuration we tried, and the gap widens as the input grows.
comments
No comments yet.
Select a passage in the PDF →
// You read the rendered PDF, not the source.

// a replay, not a live demo — the real engine is a ~480MB download and the agent half costs inference. every line above is copied from real output.

## how_it_compiles

There is no TeX distribution to install.

A WASM TeX Live 2026 engine runs inside a headless browser the server drives. One asset download, once — then it compiles locally and offline. A two-page paper with math and a bibliography comes back in about two and a half seconds.

0
TeX installs
~2.5s
warm compile
7
MCP tools
8
doc languages

// measured on a two-page xelatex paper with an equation and a bib. not a benchmark suite.

## the_receipts

Letting an agent edit your paper should be reversible.

Every successful compile is snapshotted to a hidden git ref. Not a branch, not a commit on yours — refs/latex-preview/checkpoints, which your git log, index and working tree never see. Browse checkpoints with per-file diffs; restore one file or all of them.

// this is what makes the autonomous mode defensible: /ultra-agents runs review → auto-accept → fix without asking between rounds, and every round is still an ordinary, revertible checkpoint.

## install

Two lines, or one file.

$ cat Claude Code plugin
/plugin marketplace add ZoeLinUTS/MagicTeX-mcp
/plugin install magictex
$ cat .mcp.json
{
  "mcpServers": {
    "magictex": { "command": "npx", "args": ["-y", "magictex-mcp"] }
  }
}

// then ask Claude to render a preview. first run fetches the engine assets.

## any_mcp_client

The server is protocol-standard. The shortcuts aren't.

MagicTeX is two separable halves. The MCP server is seven tools over stdio — nothing about it is Claude-specific, and every test in this project drives it with a plain MCP SDK client rather than Claude Code. The slash commands are Claude Code plugin files; those are the part another host would need re-authored in its own format.

+ 7 MCP tools — any client that speaks MCP
~ /magic-latex · /ai-review · /ultra-agents — Claude Code only

// untested against other hosts, so no compatibility badge here — but porting means rewriting a few prompt files, not the product.

## commands

Drive it from chat.

/magic-latexcompile and open the workspace
/ai-review [skill]review the paper, post comments for you to accept
/address-commentsresolve the ones you accepted
/ultra-agents [skill] [depth]fully autonomous: review → auto-accept → fix, bounded by depth

// plus one command per MCP tool — the tool is X, you type /X. full table in the README.

# AGPL-3.0 · docs in 8 languages · github.com/ZoeLinUTS/MagicTeX-mcp_