FormaTeX

\usepackage{mcp}

Your AI can compile
LaTeX now.

FormaTeX speaks MCP. Give Claude, Cursor, Windsurf, Zed, or any MCP-compatible editor direct access to a full LaTeX compilation stack — no context switching, no infrastructure.

Works with
Claude Desktop
Claude Code
Cursor
VS Code
Windsurf
Zed
Cline

01

You ask your AI

Ask Claude, Cursor, or any MCP-compatible assistant to generate or compile a LaTeX document.

02

MCP calls FormaTeX

The AI calls the FormaTeX MCP tool with your LaTeX. We compile it in a sandboxed environment.

03

PDF returned inline

The compiled PDF comes back to your conversation as a base64 file — ready to save or preview.

\begin{tools}

9 tools, 0 setup friction

Your AI gets direct access to compile, validate, and inspect LaTeX — plus a guided prompt for debugging any error.

compile_smart
quota

Auto-detects the best engine, applies common fixes, and compiles in one call. The default tool for most workflows.

Compile this LaTeX document to PDF

compile_latex
quota

Explicit engine selection. Use when you need xelatex for Unicode, lualatex for scripting, or latexmk for citations.

Compile using xelatex for this multilingual document

check_syntax
free

Validates LaTeX syntax without compiling. Catches errors before consuming quota. Includes engine recommendation.

Check this LaTeX for errors before compiling

list_engines
free

Returns all available engines with descriptions and use cases. Helps the AI pick the right engine for the job.

Which engine should I use for a document with Arabic text?

get_usage
free

Returns current month compilation stats and remaining quota. Useful before large batch compilation jobs.

How many compilations do I have left this month?

compile_async
quota

Submits a compilation job asynchronously and returns a job ID immediately. Use get_job to poll the result. Best for large or batch jobs.

Compile this document asynchronously and tell me when it's done

get_job
free

Polls an async job by ID. Automatically fetches the PDF when complete, or the error log when failed. Use after compile_async.

Check the status of job abc123 and get the PDF if ready

list_templates
free

Lists your saved LaTeX templates with IDs, names, and descriptions. Requires Pro plan. Use the ID with compile_template.

List my saved LaTeX templates

compile_template
quota

Compiles a saved template by ID with optional variable substitutions. Returns the PDF as base64. Requires Pro plan.

Compile my invoice template with name='Acme Corp' and amount='$500'

fix_latexprompt

A guided prompt that walks the AI through diagnosing compilation errors, finding root causes, and producing corrected source with an explanation.

“Use fix_latex to help me fix this error: [paste log]”

\begin{setup}

Two ways to connect

Use the hosted remote endpoint for zero-install setup, or build and run the binary locally for offline or air-gapped environments.

Add to your MCP config

Works with Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, Zed, Cline, and any client that supports Streamable HTTP. No binary download required.

claude_desktop_config.json
{
  "mcpServers": {
    "formatex": {
      "url": "https://mcp.formatex.io/mcp",
      "headers": {
        "Authorization": "Bearer fex_..."
      }
    }
  }
}

Replace fex_... with your FormaTeX API key from the dashboard.

Restart your client after saving. The formatex tools will appear in your next session.

Supported clients

Claude Desktop
localremote
Claude Code
localremote
Cursor
localremote
VS Code
localremote
Windsurf
localremote
Zed
localremote
Cline
localremote

Any client that supports the Model Context Protocol (MCP) over stdio or Streamable HTTP will work.

Ready to connect your AI?

Get an API key, drop in the config, and your assistant compiles LaTeX in the next message.

One quick thing

We track anonymous usage — page views, feature usage, compilation events — to understand what works and what doesn't. No ads, no personal data, no third-party sharing.

Cookie policy