MagicTeX — Claude Code MCP server: what it does, how to install
MagicTeX is an MCP server for Claude Code that opens a LaTeX workspace with live PDF rendering. Review comments placed on the compiled pages turn into edit instructions for the agent.
AGPL-3.0 ★ 5 updated 2026-11-15
claude mcp add magictex -- npx -y magictex-mcpWhat MagicTeX does
MagicTeX spins up a local browser workspace with a CodeMirror editor, rendered PDF preview, and change tracking. Compilation runs through a bundled WASM TeX Live 2026 engine, downloading roughly 650 MB of assets on the initial launch. It switches to local latexmk automatically if one is installed.
Readers mark text on the rendered document to leave instructions. The agent reads these tasks through the check_comments tool with exact page, quoted text, and source file line references, then updates the files. Every successful build records a snapshot under refs/latex-preview/checkpoints, keeping the main repository tree and git log clean.
The server bundles the IEEEtran document class. Other conference templates, such as ICML or NeurIPS, must sit directly in the project folder as .cls files.
What it helps with
- compile LaTeX documents without a full local TeX Live setup
- turn annotations on rendered PDF pages into structured agent tasks
- inspect build diffs without polluting repository git history
- bundle project sources into a clean zip archive
Example prompts for the agent
- Open the paper preview and check the latest PDF comments
- Address all accepted review comments in Section 3
- Show the visual diff between the last two compile checkpoints
How to install MagicTeX
Platform CLI
claude mcp add magictex -- npx -y magictex-mcpPlatform CLI
codex mcp add magictex -- npx -y magictex-mcpConfig file
{
"mcpServers": {
"magictex": {
"command": "npx",
"args": [
"-y",
"magictex-mcp"
]
}
}
}Config file
{
"servers": {
"magictex": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"magictex-mcp"
]
}
}
}Platform CLI
gemini mcp add magictex npx -y magictex-mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about MagicTeX
How to install MagicTeX in Claude Code?
Run claude mcp add magictex -- npx -y magictex-mcp in your terminal. NPX downloads the package automatically.
What does MagicTeX do?
It provides an interactive LaTeX workspace with instant PDF reload and routes rendered document annotations to the AI model as source-code tasks.
What is required to run MagicTeX?
Node.js with npx is required. The bundled WASM TeX engine requires a one-time download of roughly 650 MB unless a local latexmk installation is present.