Latex Mathml
FreeNot checkedA Model Context Protocol (MCP) server that converts LaTeX mathematical expressions to MathML format.
About
A Model Context Protocol (MCP) server that converts LaTeX mathematical expressions to MathML format.
README
A Model Context Protocol (MCP) server that converts LaTeX mathematical expressions to MathML format. And this README.md is written by DeepSeek V3.
Features
- Converts LaTeX mathematical expressions to MathML
- Provides both tool-based conversion and resource-based access
- Standard MCP protocol implementation for easy integration
- Lightweight and fast conversion using MathJax-node
Installation
Clone this repository:
git clone https://github.com/HappyAny/latex-mathml-mcp-server.git cd latex-mathml-mcp-serverInstall dependencies:
npm install mathjax-node npm install @modelcontextprotocol/sdk
Usage
Starting the Server
Run the server using Node.js:
node index.js
The server will start and listen for MCP client connections via stdio transport.
Available Services
Tool-based Conversion:
- Tool name:
latex2mathml - Input: LaTeX string
- Output: MathML string
- Tool name:
Resource-based Access:
- Resource URI pattern:
mathml://{latex_expression} - Returns: MathML representation of the LaTeX expression
- Resource URI pattern:
Client Integration
To connect to this server from an MCP client, add the following configuration to your client's settings:
{
"mcpServers": {
"latex-mathml-server": {
"isActive": true,
"command": "node",
"args": [
"path_to_your_server/index.js"
]
}
}
}
Replace path_to_your_server/index.js with the actual path to the server script.
API Details
Tool: latex2mathml
Request Format:
{
"latex": "your_LaTeX_expression"
}
Example Request:
{
"latex": "E = mc^2"
}
Response Format:
{
"content": [
{
"type": "text",
"text": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\">...</math>"
}
]
}
Resource: mathml://{id}
Access mathematical expressions as resources using the URI pattern:
mathml://E%20%3D%20mc%5E2
(Note: LaTeX expressions should be URL-encoded in the resource URI)
Development
Dependencies
@modelcontextprotocol/sdk: MCP server SDKmathjax-node: LaTeX to MathML conversionzod: Input validation
Building
This is a Node.js project. Simply clone and install dependencies as shown in the Installation section.
License
MIT
Installing Latex Mathml
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/HappyAny/latex-mathml-mcp-serverFAQ
Is Latex Mathml MCP free?
Yes, Latex Mathml MCP is free — one-click install via Unyly at no cost.
Does Latex Mathml need an API key?
No, Latex Mathml runs without API keys or environment variables.
Is Latex Mathml hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Latex Mathml in Claude Desktop, Claude Code or Cursor?
Open Latex Mathml on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectCompare Latex Mathml with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
