TexMCP logo

TexMCP

by devroopsaha744

Renders raw LaTeX and Jinja2 templates into .tex files and optional PDFs through MCP tools.

Install TexMCP

Run the project’s own setup commands, in order.

Setup steps from the project

devroopsaha744/TexMCP installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    git clone https://github.com/devroopsaha744/TexMCP.git
    
  2. 2. Configure
    cd TexMCP
    
  3. 3. Run
    python -m venv .venv
    
  4. 4. Configure
    . .\\.venv\\Scripts\\Activate.ps1
    
  5. 5. Install
    python -m pip install --upgrade pip
    
  6. 6. Install
    pip install -r requirements.txt
    

Overview

devroopsaha744/TexMCP MCP server renders raw LaTeX and Jinja2 templates into `.tex` files and, when `pdflatex` is available, PDF documents. It exposes five MCP tools for rendering documents, inspecting templates, and listing generated files. Run it locally over stdio for Claude Desktop or switch to HTTP for clients that connect to an MCP endpoint. Reach for it when an agent needs to create structured documents such as reports, resumes, invoices, or research papers from LaTeX.

Use cases

  • Render a report from raw LaTeX
  • Generate a resume from a Jinja2 template
  • Inspect available document templates
  • List generated PDF and source artifacts

Key features

  • Render raw LaTeX to .tex and optional PDF
  • Render Jinja2 document templates
  • List and inspect templates
  • List generated artifacts
  • Support stdio and HTTP transports

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

25/25 checks healthy over the last 112d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars11Stargazers on the source repository.
Last commit1y agoMost recent push to the default branch.
Directory activity6 viewsConfig copies, upvotes, and views on AllMCPs.

How TexMCP works

What devroopsaha744/TexMCP MCP server does

devroopsaha744/TexMCP MCP server turns LaTeX source into saved document artifacts. A raw LaTeX request can produce a .tex file and optionally a compiled PDF. Template-based rendering uses Jinja2, allowing a client to select a .tex.j2 template and provide values before compilation.

The repository includes 15 example templates covering formats such as invoices, letters, reports, resumes, presentations, certificates, theses, receipts, recipes, poems, and CVs. Additional templates can be added to src/mcp_server/templates/. Generated files are written to src/artifacts/, where each rendering job can leave a source file and, if compilation succeeds, a matching PDF.

How it works

The server is implemented with FastMCP and uses run_server.py as its default entrypoint. In stdio mode, it communicates through standard input and output, which is the mode used when Claude Desktop starts the process. The transport can be changed to HTTP in the entrypoint; the Docker configuration exposes the HTTP service on port 8000 and uses /mcp for client connections.

PDF creation depends on the local LaTeX toolchain. In particular, pdflatex must be installed for compilation. Without it, the server can still return the generated .tex source, but it cannot produce the PDF artifact. The Dockerfile supports images both without LaTeX and with LaTeX enabled through the INSTALL_TEX=1 build argument.

Setup and configuration

Install Python 3.10 or newer, create a virtual environment, and install the dependencies from requirements.txt. Start the process with python run_server.py from the repository directory for local stdio use. Claude Desktop can be configured to invoke the Python executable inside the virtual environment with run_server.py as its argument.

For container use, build the included Docker image and map port 8000. Set MCP_TRANSPORT=stdio to override the container's default HTTP transport. Mount src/artifacts to a host directory if outputs need to persist after the container exits.

Tools and capabilities

devroopsaha744/TexMCP MCP server exposes five tools:

  • render_latex_document writes raw LaTeX and can compile it to PDF.
  • render_template_document renders a Jinja2 template and can compile the result.
  • list_templates reports the templates available to the server.
  • get_template returns a template's source so a client can inspect it before use.
  • list_artifacts lists files currently stored in src/artifacts/.

These tools support agent workflows that generate documents, inspect the available layout options, and retrieve the resulting files programmatically through an MCP or FastMCP client.

Limitations and notes

LaTeX compilation is optional but requires pdflatex; the server falls back to source output when that executable is unavailable. HTTP deployments need additional protection if exposed beyond localhost. The README specifically warns that arbitrary LaTeX can create security and resource risks, including shell-command execution in templates and excessive resource consumption. Use TLS, firewall controls, or authentication when making the HTTP endpoint reachable outside a trusted local environment.

The project is released under the MIT License.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about TexMCP

Clone the repository, create a Python 3.10+ virtual environment, install `requirements.txt`, and run `python run_server.py` from the project directory.

Yes. The server is prepared for Claude Desktop through MCP stdio mode. Configure Claude Desktop to launch the project virtual environment's Python executable with `run_server.py`.

Only for PDF compilation. If `pdflatex` is unavailable, the server can return the generated `.tex` file without a PDF.

Rendered outputs are stored in `src/artifacts/`.

Yes. It renders Jinja2 templates from `src/mcp_server/templates/`, and the repository includes 15 example templates.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewTexMCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/devroopsaha744-texmcp?style=directory)](https://allmcps.com/mcp/devroopsaha744-texmcp)
HTML Embed
<a href="https://allmcps.com/mcp/devroopsaha744-texmcp"><img src="https://allmcps.com/api/badge/devroopsaha744-texmcp?style=directory" alt="TexMCP on AllMCPs" /></a>