Labsco
MCP SERVER

MCP LaTeX Server

by RobertoDure

Draft a LaTeX document, edit it in place and compile it to PDF without leaving the conversation.

Document Conversion, PDF & Translation
Summary
Write, check and build a paper in one place.

The base-directory rule and the validation step are what make it usable unattended: the server can only touch the folder you name, and it catches an unclosed environment before pdflatex turns it into a page of cascading errors.

What it is

An MCP server for LaTeX built on FastMCP. It creates .tex files from parameters or from bundled templates, edits them by replace, insert, append and prepend, validates the syntax, and compiles to PDF with pdflatex, xelatex or lualatex. Every file path is resolved inside one base directory and anything outside it is refused.

What you get
  • A new LaTeX file created from parameters
  • A document started from a bundled template - article, beamer or report
  • Targeted edits to an existing file: replace, insert, append, prepend
  • Syntax checked before compiling - braces, environments, references and required declarations
  • Compilation to PDF with pdflatex, xelatex or lualatex
  • The bundled templates browsable as resources under latex:// URIs
Requirements

Python 3.11.9 or newer, and a LaTeX distribution installed separately - MiKTeX or TeX Live on Windows, MacTeX on macOS, texlive-full on Linux. Without one the create and edit tools still work and compilation does not. Point the server at the folder your documents live in; that folder is the boundary.