# MagicTeX

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5 repo stars
- Author: ZoeLinUTS
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ZoeLinUTS/MagicTeX-mcp
- Updated: 2026-11-15
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/magictex

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add magictex -- npx -y magictex-mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add magictex -- npx -y magictex-mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "magictex": {
            "command": "npx",
            "args": [
                "-y",
                "magictex-mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "magictex": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "magictex-mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add magictex npx -y magictex-mcp
```

## When to use it
- 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
- 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

## Similar
- [paper-writing](https://affpapa.org/en/nevibecode/skills/paper-writing.md) — skill · 619 installs
- [related-work-writing](https://affpapa.org/en/nevibecode/skills/related-work-writing.md) — skill · 1700 installs
- [figure-designer](https://affpapa.org/en/nevibecode/skills/figure-designer.md) — skill · 919 installs
- [academic-researcher](https://affpapa.org/en/nevibecode/skills/academic-researcher.md) — skill · 764 installs
- [paper-write](https://affpapa.org/en/nevibecode/skills/paper-write.md) — skill · 596 installs
- [academic-research](https://affpapa.org/en/nevibecode/skills/academic-research.md) — skill · 148 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
