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.
Before using this MCP server, ensure you have:
npm install -g latexpdf-mcp
git clone https://github.com/ihor-sokoliuk/latexpdf-mcp.git
cd latexpdf-mcp
pnpm install
pnpm run build
Add the server to your Claude Desktop configuration file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.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 the LATEXPDF_OUTPUT_DIR
environment variable in your MCP configuration.
Example configurations:
Windows:
{
"mcpServers": {
"latexpdf-mcp": {
"command": "latexpdf-mcp",
"env": {
"LATEXPDF_OUTPUT_DIR": "C:\\Users\\YourName\\Documents\\MyPDFs"
}
}
}
}
macOS/Linux:
{
"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:
create_pdf
Converts LaTeX source code into a PDF document.
Parameters:
file_name
(string, required): Name of the output PDF file (must end with .pdf)latex_source
(string, required): LaTeX source code to convertExample:
\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:
C:\Users\Admin\Documents\GeneratedPDF
, or your custom LATEXPDF_OUTPUT_DIR
):cd [YOUR_OUTPUT_DIRECTORY]
python -m http.server
http://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
pnpm run build
pnpm run watch
latexmk
is in your PATHThe server provides detailed error messages for:
This project is licensed under the MIT License. See the LICENSE file for details.
Ihor Sokoliuk - GitHub Profile
This MCP server enables seamless LaTeX to PDF conversion within AI-assisted workflows, perfect for generating academic papers, technical documentation, and professional reports.
Enables secure, contextual AI interactions with Jenkins tools via the Model Context Protocol.
An AI agent for the Playwright MCP server, enabling automated web testing and interaction.
Interact with Odoo instances using the XML-RPC API. Requires configuration via environment variables or config files.
Integrates with the Stability AI API for image generation, editing, and upscaling.
Edit the mcp.json configuration file for tools like AWS Q Developer and Claude Desktop.
Control your Android phone using ADB commands. Requires ADB tools and an Android device with USB debugging enabled.
Securely execute shell commands with whitelisting, resource limits, and timeout controls for LLMs.
Terragrunt documentation always up to date.
A GraphQL server that supports the Model Context Protocol (MCP), enabling Large Language Models (LLMs) to interact with GraphQL APIs through schema introspection and query execution.
Generate MCP servers using Smithery with Cursor IDE integration.