Skip to content
SKILLS
MCP ServerPublisher identity verifiedNo findings from static checks

@spboucher/latex-build-mcpv1.0.0

MCP server that compiles LaTeX without shell escape and checks the result: parsed log diagnostics, overfull boxes, Beamer frames that overflow, references and citations, numbering from the .aux, LaTeX to Word.

  • downloadable
  • installable
  • executable
Version
1.0.0
Published
Nov 10, 2026
Licence
MIT
Archive
59 kB
Files
29
Transport
stdio
Tools
14

Install

Register the local server

claude mcp add --transport stdio --env LATEX_MCP_ROOT=<value> --env LATEX_MCP_TIMEOUT_S=<value> latex-build-mcp -- node server.mjs
.mcp.json (project scope)
{
  "mcpServers": {
    "latex-build-mcp": {
      "command": "node",
      "args": [
        "server.mjs"
      ],
      "env": {
        "LATEX_MCP_ROOT": "${LATEX_MCP_ROOT}",
        "LATEX_MCP_TIMEOUT_S": "${LATEX_MCP_TIMEOUT_S}"
      }
    }
  }
}

Environment variables — set locally, never sent to the registry

VariableRequiredPurpose
LATEX_MCP_ROOToptionalOnly directory the server reads and writes (default: working directory).
LATEX_MCP_TIMEOUT_SoptionalTime limit in seconds for each child process (default 120).
More steps
  1. 1Set the required environment variables locally

    LATEX_MCP_ROOT, LATEX_MCP_TIMEOUT_S — configured on your machine only; never sent to the registry.

  2. 2Optional: download the listing's source archive for review

    skills download @spboucher/latex-build-mcp@1.0.0
  • Declared permissions: shell, filesystem:read, filesystem:write, env.
  • This server runs locally on your machine with your user's privileges. Review the source before running it; the registry does not execute or host it.

Installing only copies or configures. Nothing is executed for you. The Skills CLI verifies the checksum before writing files.

Documentation

latex-build-mcp

An MCP server that compiles LaTeX and tells an agent, in structured form, what is wrong with the result: errors with file and line, overfull boxes, Beamer frames that run past the slide, undefined or unused labels and citations, the numbering recorded in the .aux, and a LaTeX → Word conversion that keeps cross-reference numbers.

It needs a TeX distribution on the machine (TeX Live or MacTeX). Optional tools add features: latexmk, biber, pandoc, texcount, chktex, pdftotext. toolchain_status shows what is there and what each missing tool disables.

Install

shell
npm install        # in this directory
json
{
  "mcpServers": {
    "latex-build": {
      "command": "node",
      "args": ["/path/to/latex-build-mcp/server.mjs"],
      "env": { "LATEX_MCP_ROOT": "/path/to/your/papers" }
    }
  }
}
VariableMeaningDefault
LATEX_MCP_ROOTThe only directory the server reads and writesworking directory
LATEX_MCP_TIMEOUT_STime limit for each child process, in seconds120

Tools

ToolWhat it returns
toolchain_statusInstalled tools and versions, engines available, capabilities
compileSuccess, page count, PDF path, parsed diagnostics. engine: pdflatex, xelatex, lualatex. clean: true builds from scratch
parse_logErrors (file, line, context, explanation), warnings, overfull / underfull boxes, undefined references and citations, duplicate labels, missing files, fonts and characters, rerun hints
check_overflowOverfull hboxes above hbox_threshold_pt with the source text; overfull vboxes; for Beamer, the overflowing frames by number, title and line
beamer_reportEvery frame (title, line, pages, overlay slides), overflowing frames, frames without a title
audit_referencesStatic scan: undefined references, duplicate labels with locations, unused labels, unreferenced floats, undefined citations, unused and duplicate .bib keys
bib_auditBackend expected by the document against the one that ran, entries not found, warnings, errors, incomplete entries
word_counttexcount figures (text, headings, captions), or a documented approximation
lintchktex, curated subset (all: true for everything)
extract_numberingNumber, page and kind of every label; captions; citation labels
to_docxA .docx with cross-references, caption numbers and equation numbers resolved from the .aux, and the list of what does not survive
pdf_textText of a page range of the PDF
clean_buildRemoves the build directory created by this server (confirm: true)
explain_errorCause and fix for a known error message

The tools that read a build (parse_log, check_overflow, beamer_report, bib_audit, extract_numbering, to_docx, pdf_text) use the last compile of the same file and say so when there is none.

Safety

  • One root. Every path is resolved, symlinks included, and refused when it leaves LATEX_MCP_ROOT. \input files outside the root are skipped by the scans.
  • No shell. Programs are started with execFile and a timeout; nothing is passed through a shell.
  • No shell escape. Engines always run with -no-shell-escape: \write18 and piped \input do nothing, and compile lists the commands the document tried to run. Documents that need shell escape (minted, externalised TikZ, gnuplot) will not build here; pre-generate their output.
  • No project rc file. latexmk runs with -norc, because a latexmkrc is Perl code. Settings from such a file (custom engines, extra rules) are therefore ignored.
  • A marked build directory. Output goes to .latex-build/ next to the main file, marked with a file. The server refuses to build into, and clean_build refuses to remove, a directory that is not marked. Source files are never deleted or modified.
  • Files are data. Text in .tex, .bib and log files is returned as data; the server gives it no authority.

A TeX document is still a program: it can read files the TeX configuration allows (by default, not parent directories or dotfiles) and loop until the timeout. Compile untrusted documents in a sandbox.

Limits

  • Log parsing is exact for logs produced by this server (long lines, file:line:error). For other logs, wrapped at 79 columns, file attribution can be missing.
  • TeX reports an overfull paragraph when the paragraph ends: a paragraph that starts in an \input file and ends in its parent is attributed to the parent.
  • Beamer overflow is what Beamer reports as an overfull \vbox. Content placed with absolute positioning (textpos, TikZ overlays) that leaves the slide raises no warning. Frame titles come from the source in order; frames produced by macros, \againframe or conditionals make the mapping approximate, and the report says so.
  • audit_references is a static scan: labels and keys built by macros are not seen.
  • to_docx: cross-references become plain text; section numbers come from pandoc, not the .aux; citations are re-rendered by citeproc (author-date unless a CSL file is given); TikZ, custom layout and PDF/EPS images do not carry over.
  • word_count without texcount is an approximation and is labelled as such.

Tests

shell
npm test               # offline parser tests + real compiles of the fixtures (about 20 s)
npm run test:offline   # no TeX needed

The integration tests compile five small fixtures through the MCP protocol and assert exact diagnostics: file and line of each defect, the overflowing frame of the deck, the numbers in the Word file, that \write18 and a hostile latexmkrc do nothing, and that paths outside the root are refused. Tested on macOS with TeX Live 2026, pandoc 3.9 and Node 26. Not tested on Windows or with MiKTeX.

License

MIT

Tools

14 tools · declared by the publisher
ToolWhat it does
toolchain_statusWhich LaTeX tools are installed, with versions, and what each missing tool disables.
compileCompile to PDF with pdflatex, xelatex or lualatex (latexmk when installed), never with shell escape; returns page count and parsed diagnostics.
parse_logErrors with file and line, warnings, overfull and underfull boxes, undefined references and citations, duplicate labels, missing files and fonts.
check_overflowOverfull boxes above a threshold; for Beamer, the frames whose content runs past the slide, by number and title.
beamer_reportEvery frame of a deck with title, source line and pages; overflowing frames; frames without a title.
audit_referencesUndefined references, duplicate and unused labels, unreferenced floats, citations missing from the .bib, unused keys.
bib_auditExpected against actual bibliography backend, entries not found, backend warnings and errors, incomplete entries.
word_countWord count with texcount, or a documented approximation without it.
lintchktex with a curated subset of rules.
extract_numberingNumber, page and kind of every label, captions and citation labels, read from the .aux.
to_docxLaTeX to Word through pandoc with cross-reference numbers from the .aux; lists what does not survive.
pdf_textText of a page range of the compiled PDF.
clean_buildRemove the build directory this server created; needs confirm: true.
explain_errorUsual cause and fix of a LaTeX, BibTeX or Biber error message.

Environment variables

VariableRequiredPurpose
LATEX_MCP_ROOToptionalOnly directory the server reads and writes (default: working directory).
LATEX_MCP_TIMEOUT_SoptionalTime limit in seconds for each child process (default 120).

Files

29 files · 207 kB unpacked

Select a file to preview it. Files are shown as plain text and never executed.

Security & permissions

Declared permissions

  • shell
  • filesystem:read
  • filesystem:write
  • env

Static checks

  • lowscript spawns other processeslib/engine.mjs

Static checks are advisory. They never certify that a package is safe. Compatibility entries are publisher claims unless marked verified.

Compatibility

  • claude-code · claimed
  • codex · claimed
  • cursor · claimed
  • generic-mcp · claimed

Versions

1 release · immutable
VersionPublishedSizeSHA-256State
1.0.0latestNov 10, 202659 kB77071c1df01a…published

Publication history

  1. release.publish@spboucher/latex-build-mcp@1.0.0by Simon-Pierre Boucher
  2. artifact.create@spboucher/latex-build-mcpby Simon-Pierre Boucher
  • MCP ServerVerified publisher

    @spboucher/pangram-experiment-mcp

    MCP server for text-revision experiments that record the Pangram detector score as an observed outcome: frozen editorial plan, one submission per step, a real evaluation of every version, preservation checks, full history, chart and report.

    Latest version
    v1.0.0
    Licence
    MIT
    Updated
    2 h ago
  • MCP ServerVerified publisher

    @spboucher/manuscript-audit-mcp

    MCP server for deterministic, offline audits of LaTeX and Markdown manuscripts: citations, cross-references, numbers, statistics reporting, tables, claims, style, replication statements, referee-report scaffold, version comparison.

    Latest version
    v1.0.0
    Licence
    MIT
    Updated
    3 h ago
  • MCP ServerVerified publisher

    @spboucher/xlsx-audit-mcp

    MCP server that audits Excel workbooks without Excel: errors, hard-coded numbers, broken formula patterns, circular references, controls, stale values, comparison with a reference and a rubric-based grading aid. Read-only, dependency-free reader.

    Latest version
    v1.0.0
    Licence
    MIT
    Updated
    3 h ago

↑↓ to navigate · enter to open · esc to close