MCP Latex Server MCP Server

A Model Context Protocol (MCP) server for LaTeX file creation, editing, validation, and compilation. Built with

Local serverstdioPython

What is the MCP Latex Server MCP Server?

MCP Latex Server lets Claude, Cursor and other MCP clients work with MCP Latex Server directly. A Model Context Protocol (MCP) server for LaTeX file creation, editing, validation, and compilation. Built with FastMCP and Pydantic for type-safe, structured output.

What MCP Latex Server does

A Model Context Protocol (MCP) server for LaTeX file creation, editing, validation, and compilation. Built with FastMCP and Pydantic for type-safe, structured output.

Key capabilities

  • Create — LaTeX documents from parameters or bundled templates (article, beamer, report)
  • Edit — files with replace, insert, append, and prepend operations
  • Read — and list .tex files within a secure base directory
  • Validate — syntax — braces, environments, references, required declarations
  • Compile — to PDF with pdflatex, xelatex, or lualatex
  • Resources — — browse and retrieve bundled templates via latex:// URIs

Requirements

  • Python 3.11.9+ - LaTeX distribution (for compilation): - Windows: MiKTeX or TeX Live - macOS: MacTeX (brew install --cask mactex) - Linux: sudo apt install texlive-full (Debian/Ubuntu) or sudo dnf install texlive-scheme-full (Fedora)

Practical notes

  • Maintained by RobertoDure, written in Python.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
create_latex_file
create_from_template
edit_latex_file
read_latex_file
list_latex_files
validate_latex
get_latex_structure
compile_latex

How to install the MCP Latex Server MCP Server

{
  "mcpServers": {
    "latex-server": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp-latex-server",
        "run",
        "latex_server.py"
      ],
      "env": {
        "LATEX_SERVER_BASE_PATH": "/path/to/your/latex/files"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

  • Python 3.11.9+ - LaTeX distribution (for compilation): - Windows: MiKTeX or TeX Live - macOS: MacTeX (brew install --cask mactex) - Linux: sudo apt install texlive-full (Debian/Ubuntu) or sudo dnf install texlive-scheme-full (Fedora)
VariableDescriptionRequired
LATEX_SERVER_BASE_PATHDeclared in the maintainer’s client configuration.Check documentation

Example prompts to try

  • “Use MCP Latex Server to create latex file.”
  • “Use MCP Latex Server to create from template.”
  • “Use MCP Latex Server to edit latex file.”

Frequently asked questions

A Model Context Protocol (MCP) server for LaTeX file creation, editing, validation, and compilation. Built with Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.