Skip to main content

ferritex-mcp

A Model Context Protocol server that exposes FerriTeX to AI agents. An agent can turn LaTeX into a PDF and validate LaTeX in a self-correction loop — without a TeX Live install and without spawning subprocesses.

Install

pip install ferritex-mcp

This pulls in ferritex, the in-memory LaTeX-to-PDF engine.

Run

ferritex-mcp

Set FERRITEX_MCP_OUTPUT_DIR to a dedicated output directory. Relative output_path values resolve under it; paths that resolve outside it return invalid_path. If unset, paths are relative to the server's working directory unless absolute. This is not a sandbox or an overwrite safeguard; use trusted clients and restrict the server's filesystem permissions.

The server speaks MCP over stdio. Register it with your client, for example Claude Desktop:

{
  "mcpServers": {
    "ferritex": {
      "command": "ferritex-mcp"
    }
  }
}

Tools

compile_latex_to_pdf

Compiles a LaTeX document and writes the PDF to disk.

Argument Type Description
latex string A complete LaTeX document
output_path string Where to write the PDF
engine string "fast", "full", or "auto" (default)
margin string? Uniform margin override, e.g. "1in"
font_size string? Base font size override, e.g. "11pt"

Returns:

{
  "success": true,
  "output_path": "paper.pdf",
  "engine_used": "fast",
  "compile_time_ms": 6.2,
  "page_count": 2,
  "bytes": 18234,
  "warnings": []
}

On failure, success is false and error is one of syntax, unsupported, full_engine_missing, asset, compilation, or invalid_path, with a human-readable message and, for syntax errors, line, column, and snippet.

validate_latex

Dry-run validation: no PDF is written. Returns structured diagnostics so an agent can fix and retry.

{
  "valid": false,
  "error": "syntax",
  "message": "unclosed brace `{` (line 3, column 45)",
  "line": 3,
  "column": 45,
  "snippet": "\\textbf{bold text"
}

Why it matters

The fast engine lets agents validate and render supported documents without starting a TeX executable on each revision. Validation checks fast-mode compilation, not compatibility with every LaTeX package.

License

MIT. See LICENSE.

Metadata

Release files for ferritex-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ferritex-mcp 0.1.0
File Size Uploaded Provenance Actions
ferritex_mcp-0.1.0.tar.gz 5.0 kB With provenance Details for ferritex_mcp-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ferritex-mcp 0.1.0
File Interpreter ABI Platform Actions
ferritex_mcp-0.1.0-py3-none-any.whl Python 3 none any Details for ferritex_mcp-0.1.0-py3-none-any.whl

Total release size: 11.0 kB

Release files / ferritex_mcp-0.1.0.tar.gz

Download URL ferritex_mcp-0.1.0.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c8221325e4d8e0229bcecf60ac29aba0cf31934153979288fea155f7c7b22799
BLAKE2b-256 checksum
How to use checksums
ddf01f679b6a8187bafcd97dc8c82a202e0d5b4cdb6f9b0f9c5ff237939785f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Release files / ferritex_mcp-0.1.0-py3-none-any.whl

Download URL ferritex_mcp-0.1.0-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc60ae6b51bcf1278162536a855f986284d392beeb61b0d7fe0460cb5de6c3c0
BLAKE2b-256 checksum
How to use checksums
b2af45de1a893cbddae342705f39118168bcab2a8840a8dfa2ef35c85bfd6106
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Security for ferritex-mcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ferritex_mcp-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page