A comprehensive Model Context Protocol (MCP) server that provides advanced LaTeX file creation, editing, and management capabilities for Large Language Models and AI assistants.
MCPpedia last refreshed this data
MCP Latex Server is an MCP server that a comprehensive Model Context Protocol (MCP) server that provides advanced LaTeX file creation, editing, and management capabilities for Large Language Models and AI assistants. It exposes 8 tools over stdio, sse and http, requires no API key, and scores 69/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients - only the file and path differ.
{
"mcpServers": {
"latex-server": {
"env": {
"LATEX_SERVER_BASE_PATH": "/path/to/your/latex/files"
},
"args": [
"--directory",
"/path/to/mcp-latex-server",
"run",
"latex_server.py"
],
"command": "uv"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A Model Context Protocol (MCP) server for LaTeX file creation, editing, validation, and compilation. Built with FastMCP and Pydantic for type-safe, structured output.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories - click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Click any tool to inspect its schema.
latex_templates_listList available bundled templates
latex://templates
latex_template_contentGet the content of a specific template
latex://template/{name}
Be the first to review
Have you used this server?
Share your experience - it helps other developers decide.
Sign in to write a review.
Others in writing / developer-tools
XcodeBuildMCP provides tools for Xcode project management, simulator management, and app utilities.
MCP server for using the GitLab API
MCP server for enterprise local codebase indexing, semantic search, and code dependency graphs.
Inspect and drive Flutter debug apps/games: semantic snapshots, search, and custom client tools
MCP Security Weekly
Get CVE alerts and security updates for Mcp Latex Server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A Model Context Protocol (MCP) server for LaTeX authoring: create and edit documents, analyze multi-file projects, validate structure and references, run quality checks, inspect PDFs, and compile to PDF. Built with FastMCP/MCPServer and Pydantic for structured tool output.
Editing, reading, listing, validation, project analysis, word counts, and PDF reading do not require LaTeX to be installed. Tools that need an external binary report available=false or a clear install hint instead of failing the server.
git clone https://github.com/RobertoDure/mcp-latex-server
cd mcp-latex-server
uv venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
uv pip install -e ".[dev]"
git clone https://github.com/RobertoDure/mcp-latex-server
cd mcp-latex-server
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS/Linux
source .venv/bin/activate
pip install -e ".[dev]"
python scripts/quick_setup.py
The setup script checks Python, installs dependencies, verifies the server, and optionally writes a Claude Desktop configuration. Existing configs are backed up and malformed JSON is left untouched.
After installation, launch the server with any of:
mcp-latex-server
python -m mcp_latex_server
python latex_server.py # compatibility shim
The canonical packaged entry point is mcp-latex-server. The root latex_server.py stays as a compatibility shim for existing MCP client configurations.
A container image is included for the server runtime. It does not include a TeX distribution; extend the image or mount a TeX installation if you need compilation inside the container.
docker build -t mcp-latex-server .
docker run --rm -i \
-e LATEX_SERVER_BASE_PATH=/workspace \
-v "$PWD/documents:/workspace" \
mcp-latex-server
The container communicates over stdio, so keep the interactive stdin flag
(-i) when connecting it to an MCP client.
| Variable | Description | Default |
|---|---|---|
LATEX_SERVER_BASE_PATH | Root directory for all file operations | . (current directory) |
LATEX_SERVER_MAX_READ_BYTES | Maximum file size a read tool may load | 5000000 |
LATEX_SERVER_MAX_PDF_BYTES | Maximum PDF size returned by read_pdf_file | 50000000 |
LATEX_SERVER_LOG_LEVEL | Logging level used by the entry point | INFO |
LATEX_SERVER_TEMPLATE_DIRS | os.pathsep-separated custom template directories | empty |
LATEX_SERVER_SNAPSHOT_DIR | Snapshot directory inside the base path | .latex-mcp/snapshots |
All tool paths resolve relative to the base directory. Paths that escape it, including symlinks that resolve outside, are denied. A templates directory inside the base path is