LaTeX PDF MCP Server

by tobioffice

Not rated
GitHub

About

Converts LaTeX source code into professionally formatted PDF documents.

Details

Author
tobioffice
Categories
Developer Tools, Other

Setup

Install LaTeX PDF MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/tobioffice/LateXPDF-MCP

Follow the installation instructions in the repository README, then restart your MCP client.

Converts LaTeX source code into professionally formatted PDF documents.

A Model Context Protocol (MCP) server that provides tools for converting LaTeX source code into PDF documents. This server enables AI assistants to generate high-quality PDF documents from LaTeX markup with professional formatting capabilities.

- LaTeX to PDF Conversion: Convert LaTeX source code directly to PDF format
- Professional Document Generation: Supports all standard LaTeX features for academic and professional documents
- Local File Generation: Creates PDF files in a specified directory for easy access
- HTTP Server Integration: Generates downloadable links for created PDFs
- Error Handling: Comprehensive error reporting for LaTeX compilation issues

Before using this MCP server, ensure you have:
- Node.js(version 18 or higher)
- LaTeX Distribution: A complete LaTeX installation such as:

- Windows:MiKTeXorTeX Live
- macOS:
MacTeX
- Linux: TeX Live (install via package manager)

git clone https://github.com/ihor-sokoliuk/latexpdf-mcp.git cd latexpdf-mcp

Add the server to your Claude Desktop configuration file:

Windows:%APPDATA%\Claude\claude_desktop_config.jsonmacOS:~/Library/Application Support/Claude/claude_desktop_config.jsonLinux:~/.config/Claude/claude_desktop_config.json

{ "mcpServers": { "latexpdf-mcp": { "command": "latexpdf-mcp", "env": { "LATEXPDF_OUTPUT_DIR": "/path/to/your/pdf/directory" } } } }

By default, PDFs are generated in:C:\Users\Admin\Documents\GeneratedPDF

You can customize the output directory by setting theLATEXPDF_OUTPUT_DIRenvironment variable in your MCP configuration.

{ "mcpServers": { "latexpdf-mcp": { "command": "latexpdf-mcp", "env": { "LATEXPDF_OUTPUT_DIR": "C:\\Users\\YourName\\Documents\\MyPDFs" } } } }
{ "mcpServers": { "latexpdf-mcp": { "command": "latexpdf-mcp", "env": { "LATEXPDF_OUTPUT_DIR": "/home/yourname/Documents/PDFs" } } } }

Once configured, you can use the server through your MCP-compatible client:

Converts LaTeX source code into a PDF document.

- file_name(string, required): Name of the output PDF file (must end with .pdf)
- latex_source(string, required): LaTeX source code to convert

\documentclass{article} \usepackage[utf8]{inputenc} \title{Sample Document} \author{Your Name} \date{\today} \begin{document} \maketitle \section{Introduction} This is a sample LaTeX document generated via MCP. \subsection{Features} \begin{itemize} \item Professional formatting \item Mathematical expressions: $E = mc^2$ \item Cross-references and citations \end{itemize} \end{document}

After generating a PDF, you can access it via HTTP server:
- Navigate to the output directory (default:C:\Users\Admin\Documents\GeneratedPDF, or your customLATEXPDF_OUTPUT_DIR):
- Access your PDFs athttp://localhost:8000/[filename].pdf

The server automatically provides download links in this format when PDFs are generated.

latexpdf-mcp/ ├── index.ts # Main server implementation ├── package.json # Package configuration ├── tsconfig.json # TypeScript configuration ├── pnpm-lock.yaml # Dependency lock file └── dist/ # Compiled JavaScript output

- LaTeX not found: Ensure LaTeX is properly installed andlatexmkis in your PATH
- Permission errors: Check write permissions for the output directory
- Compilation errors: Review LaTeX syntax and required packages

The server provides detailed error messages for:

- Missing LaTeX installation
- Compilation failures
- File system permissions
- Invalid input parameters
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request

This project is licensed under the MIT License. See theLICENSEfile for details.

- Repository:https://github.com/ihor-sokoliuk/latexpdf-mcp
- Issues:
https://github.com/ihor-sokoliuk/latexpdf-mcp/issues
- Model Context Protocol:
https://modelcontextprotocol.io

This MCP server enables seamless LaTeX to PDF conversion within AI-assisted workflows, perfect for generating academic papers, technical documentation, and professional reports.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Create PDFs from Markdown, fill forms, merge, split, rotate, watermark, encrypt, extract text, and add QR codes. 16 tools, TypeScript-native.

Convert Markdown documents to PDF files with syntax highlighting, custom styling, and optional watermarking.

Parses PDF files from a URL into structured formats like JSON and Markdown.

Local-first PDF engine for AI agents. Zero-dep TypeScript, PDF/A, signatures, 800+ pages/sec.

Validate, convert & visualize YAML, and edit saved diagrams, from your AI editor.

Universal document generation and conversion MCP. Generate PDF/DOCX/XLSX from templates+JSON (invoices, contracts, reports), batch generation, 100+ format conversions.

A server for reading and converting documents between PDF, DOCX, and Markdown formats using marker-pdf and pandoc.

Convert, compress, merge and OCR PDFs and 100+ file formats from any AI agent — 126 tools via the GuruPDF API.

Convert PDF bank statements to checked Excel, CSV, or JSON with balance validation.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.