LaTeX MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add latex-mcp -- npx mcp-remote https://latex-mcp.onrender.com/mcp
README.md

Render LaTeX math expressions into beautiful PNG images

latex-mcp 🧮

An MCP server that renders LaTeX math expressions into beautiful PNG images — built for AI assistants like Poke that solve math problems from photos.

How It Works

User sends photo of math problem
→ AI (Poke) solves it
→ AI calls this MCP server with the LaTeX solution
→ Server renders it into a clean PNG image
→ AI sends the image URL back in iMessage

Tools

`render_solution` ⭐ (Primary tool)

Renders a full step-by-step solution with highlighted final answer. Returns both a hosted image URL (for iMessage) and a base64 PNG.

`get_image_url`

Returns a hosted CodeCogs URL for any LaTeX expression — iOS renders it inline in iMessage.

`render_latex`

Renders LaTeX to a base64-encoded PNG for embedding.

MCP Endpoint

https://latex-mcp.onrender.com/mcp

Connect to Poke / Claude Desktop

{
  "mcpServers": {
    "latex-mcp": {
      "command": "npx",
      "args": ["mcp-remote", "https://latex-mcp.onrender.com/mcp"]
    }
  }
}

Example Usage

When Poke solves 2x + 4 = 10, it should call:

{
  "tool": "render_solution",
  "params": {
    "problem_description": "Solve for x: 2x + 4 = 10",
    "steps_latex": ["2x + 4 = 10", "2x = 10 - 4", "2x = 6", "x = \\frac{6}{2}"],
    "final_answer_latex": "x = 3"
  }
}

Returns an image_url to send directly in iMessage. šŸŽ‰

Tools (3)

render_solutionRenders a full step-by-step solution with highlighted final answer.
get_image_urlReturns a hosted CodeCogs URL for any LaTeX expression.
render_latexRenders LaTeX to a base64-encoded PNG for embedding.

Configuration

claude_desktop_config.json
{"mcpServers": {"latex-mcp": {"command": "npx", "args": ["mcp-remote", "https://latex-mcp.onrender.com/mcp"]}}}

Try it

→Solve the quadratic equation 2x^2 + 5x - 3 = 0 and render the step-by-step solution as an image.
→Generate a hosted image URL for the LaTeX expression \int_{0}^{\infty} e^{-x^2} dx.
→Create a visual representation of the Pythagorean theorem using the render_latex tool.
→Provide a step-by-step solution for the derivative of sin(x)cos(x) and return the image URL.

Frequently Asked Questions

What are the key features of LaTeX MCP?

Renders LaTeX math expressions into high-quality PNG images. Generates hosted image URLs compatible with messaging platforms like iMessage. Supports step-by-step mathematical solution rendering. Provides base64-encoded PNG output for direct embedding.

What can I use LaTeX MCP for?

AI assistants providing visual math solutions to users via messaging apps. Creating high-quality math diagrams for educational documents or presentations. Embedding complex mathematical formulas into web applications or chat interfaces. Automating the generation of visual study aids from LaTeX source code.

How do I install LaTeX MCP?

Install LaTeX MCP by running: npx mcp-remote https://latex-mcp.onrender.com/mcp

What MCP clients work with LaTeX MCP?

LaTeX MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep LaTeX MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare