LaTeX MCP Server

LaTeX MCP Server

A server that enables compilation of LaTeX documents to PDF and management of reusable templates and snippets through the Model Context Protocol.

Category
Visit Server

README

LaTeX MCP Server

A Model Context Protocol (MCP) server for LaTeX compilation and document generation.

Features

  • LaTeX Compilation: Compile LaTeX source to PDF using various engines (pdflatex, xelatex, lualatex)
  • Template System: Manage reusable LaTeX templates
  • Snippets/Macros: Use predefined LaTeX components (equations, figures, multiple choice questions, etc.)
  • Automatic Cleanup: Old files are automatically cleaned up during compilation
  • Caching: Compiled documents are cached to avoid recompilation
  • Security: Dangerous LaTeX commands are blocked

MCP Tools

Core Tools

  • compile_latex - Compile LaTeX source to PDF
  • list_templates - List available LaTeX templates
  • get_template - Get template source code

Snippets System

  • list_snippets - List available LaTeX snippets/macros
  • get_snippet_info - Get detailed info about a snippet including parameters
  • render_snippet - Render a snippet with provided parameters

Available Snippets

  • multiple_choice - Creates multiple choice questions with 4 options
  • equation - Creates numbered equations with optional labels
  • figure - Creates figures with captions and optional labels

Installation

Docker (Recommended)

  1. Build the image:
docker build -f Dockerfile.simple -t mcp-latex-simple .
  1. Run the container:
docker run -d --name mcp-latex-server --restart unless-stopped -p 8083:8080 mcp-latex-simple

Manual Installation

  1. Install system dependencies:
# Install LaTeX
sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-latex-extra

# Install Python dependencies
pip install fastmcp jinja2 pydantic pyyaml uvicorn
  1. Run the server:
python server.py

Configuration

Set environment variables:

  • PORT - Server port (default: 8080)
  • LATEX_BASE_URL - Base URL for compiled files
  • LATEX_MAX_FILE_AGE_HOURS - File cleanup age in hours (default: 24)

Usage with Claude

Configure Claude Desktop to connect to your MCP server:

  • URL: https://your-domain.com/
  • Transport: HTTP

API

The server exposes a Model Context Protocol interface on the configured port and path.

Security

  • Dangerous LaTeX commands are blocked
  • File system access is restricted
  • No shell escapes allowed during compilation
  • Automatic cleanup prevents disk space issues

Development

See the included configuration files:

  • docker-compose-standalone.yml - Docker Compose setup
  • mcp-latex.service - Systemd service
  • nginx-include.conf - Nginx configuration

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured