LaTeX editor for AI agents: live PDF preview, PDF comments that drive edits, git history
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag โ we're steadily working through the catalog.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by MagicTeX.
render_previewxelatex` \
check_commentsReturns the accepted comments as located work items โ page, quoted passage, the source `file:line`, and the ask. Reviewer suggestions awaiting your decision are reported but not returned as work.
add_commentdefender`) ยท `page?` ยท `accepted?
resolve_commentMarks a comment done after the edit, with one line describing what changed. It turns **green** in the workspace for your review.
reply_to_commentreviewer` \
show_diffRenders a side-by-side diff **as an image**, shown inline in the conversation. Defaults to the current uncommitted changes; pass a checkpoint sha for a saved version.
English ยท ็ฎไฝไธญๆ ยท ๆฅๆฌ่ช ยท ํ๊ตญ์ด ยท Espaรฑol ยท Franรงais ยท Deutsch ยท Portuguรชs
MagicTeX is a LaTeX editor built for AI agents โ an Overleaf-like
one-window workspace for Claude Code, served by an MCP server, with no local TeX
install and no Overleaf account: live PDF preview, a source editor with a Visual
(WYSIWYG) mode, change history, and comments you anchor on the rendered PDF that
become edit instructions for the agent. (npm package: magictex-mcp.)
It compiles with a WASM TeX Live 2026 engine (texlyre-busytex) running inside a headless browser, so there's nothing multi-gigabyte to install โ just a one-time WASM asset download.

A guided walkthrough of the comment โ agent loop lives at zoelin.dev/tools/magictex, built from real tool output. It's a replay, not a hosted instance โ the TeX engine is a one-time ~650 MB download and the agent half is Claude itself, so MagicTeX runs next to your project rather than in a web page.
One browser window (inspired by Typst's one-surface editor and LiquidText's anchored annotations):
check_comments as located work items (page + quoted passage
file:line it anchors to + your ask), edits the source, and
resolves each card with a note. You interact with the document; Claude interacts
with the source. Run it hands-off with /loop โ see
docs/AGENT-LOOP.md.refs/latex-preview/checkpoints) โ never touching your branches,
git log, or working tree. The History tab shows the timeline and each
checkpoint's colorized diff beside the PDF.git push. See docs/USER-GUIDE.md.add_comment; you Accept/Reject them (or flip Auto-accept for
copilot mode); an author loop resolves the accepted ones. Comments carry roles and
a reply thread. See docs/AGENT-LOOP.md.\input/\include, .bib, in-repo .cls/.sty/.bst and figures, runs
BibTeX and reruns when needed; common missing packages are auto-injected.backend: "system" / "wasm". Every compile
reports which one ran.IEEEtran is bundled, because no venue class ships in the
WASM TeX Live and a missing class can't be worked around the way a package can.
Conference classes (NeurIPS, ICML, CVPR, ACL, AAAI โฆ) carry no redistributable
licence, so put the .cls from the author kit beside your source โ it's picked up
automatically.render_preview (compile + open the workspace), check_comments /
resolve_comment / add_comment / reply_to_comment (the review loop), show_diff
(side-by-side diff as an image โ useful on image-capable clients).{file, line, message}
errors so Claude can self-correct, and show in the workspace.MagicTeX is on npm as magictex-mcp and
listed in the official MCP registry as
io.github.ZoeLinUTS/magictex โ so any client that reads the registry can find it.
There's nothing to clone and no TeX install; npx fetches it on first use.
Add it to your paper project's .mcp.json (see .mcp.json.example):
For local development from a clone, point it at the source instead:
"command": "npx", "args": ["tsx", "/absolute/path/to/magictex-mcp/src/server.ts"]
Restart Claude Code (or /mcp reconnect) so it picks up the server.
Ask Claude to render. e.g. "render a preview of this paper" โ the first call downloads the WASM TeX Live assets (~650 MB, one time), compiles, and opens the live preview tab. Subsequent edits reload it automatically.
The WASM assets are not in this repo. They're fetched on first run into a
per-user cache โ ~/Library/Caches/magictex on macOS, $XDG_CACHE_HOME/magictex
on Linux, %LOCALAPPDATA%\magictex on Windows โ so upgrading MagicTeX doesn't
re-download them, and a checkout, a global install and an npx run share one copy.
Set MAGICTEX_ASSETS_DIR to put them elsewhere. To pre-fetch:
npx texlyre-busytex download-assets <that directory>.
For a low-typing workflow, install MagicTeX as a plugin โ one install gives you the MCP server and the slash commands:
Then, in your paper project, use the workflow commands for the common flows:
/magic-latex โ compile and open the workspace (the live preview)./ai-review [skill] โ review the paper with a skill (default
academic-paper-revision; pass any skill name) and post comments for you to
Accept/Reject. Missing skills are reported with an install hint./address-comments โ resolve your accepted comments (loop it with
/loop 60s /address-comments)./ultra-agents [skill] [depth] โ fully autonomous: review, auto-accept, fix,
repeat, up to depth rounds (default 2), stopping early the moment a round finds
nothing new. No per-round approval โ that's the point, and the risk. depth > 5
asks you to confirm before starting. Ends with a summary (what was raised, what
changed, which checkpoints to look at) โ every round is still an ordinary,
revertible checkpoint. See docs/AGENT-LOOP.md.Every MCP tool also has a slash command with the same name, so you can drive any
single step by typing the tool name. The rule to teach: the tool is X โ type
/X.
Factual signals from GitHub, npm, and our automated checks โ not a rating.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/magictex)<a href="https://allmcps.com/mcp/magictex"><img src="https://allmcps.com/api/badge/magictex?style=directory" alt="MagicTeX on AllMCPs" /></a>