Skip to main content
Glama

mcp-latex

A Model Context Protocol (MCP) server for LaTeX. Give an AI assistant (Claude Desktop, Claude Code, Cursor…) the ability to check your LaTeX document, parse compiler logs, and compile — so it can actually fix your thesis or paper instead of guessing. Static analysis works with no TeX install required.

🌍 English · Português · 📚 Documentation

CI npm License: MIT MCP

Tools

Tool

Description

check_document

Static analysis: undefined refs, duplicate/unused labels, unbalanced environments; lists labels/refs/citations. No TeX needed.

parse_log

Turns a .log into structured errors, warnings, undefined refs/citations, over/underfull boxes.

compile

Compiles a .tex with latexmk/pdflatex if installed; returns parsed errors (graceful if no engine).

Related MCP server: Overleaf MCP

Use with Claude Desktop / Claude Code

{
  "mcpServers": {
    "latex": { "command": "npx", "args": ["-y", "mcp-latex"] }
  }
}

Then ask: "Check my thesis for undefined references and unbalanced environments," or "Compile main.tex and fix the first error."

Why

Writing a thesis in LaTeX means fighting cryptic compiler errors, dangling \refs and \begin/\end mismatches. An AI assistant is great at fixing these — if it can see the actual errors. This server gives it structured eyes on your document. Built from the pain of writing a real master's thesis.

Run locally

npm install
npm start          # stdio server
npm test           # unit + stdio integration tests
npm run build      # tsc -> dist/

Try it with the MCP Inspector:

npx @modelcontextprotocol/inspector npx -y mcp-latex

License

MIT © Marcelo Domingues

Install Server
A
license - permissive license
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/marcelogdomingues/mcp-latex'

If you have feedback or need assistance with the MCP directory API, please join our Discord server