math-svg-mcp

v1.1.2
io.github.wspringer/math-svg-mcp Checked 3 days ago Published 10 months ago

Convert LaTeX math expressions to crisp, scalable SVG images

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

latex_to_svg

Convert a LaTeX math expression to SVG and return the SVG content directly. Best for small expressions where you need the SVG inline.

ParameterTypeDescription
latex *stringThe LaTeX math expression to convert
unit *stringOutput unit for width/height. Use pt for print/InDesign, px for web/browsers, mm for metric print, ex to keep relative units
displaybooleanDisplay mode (block) vs inline mode. Default: true
fontSizenumberFont size (em size) in the same unit as the output. E.g., 11 for 11pt when unit=pt, or 16 for 16px when unit=px. Default: 16
xHeightRationumberRatio of x-height to font size. Varies by font: Times 0.45, Helvetica 0.52, Computer Modern 0.43. Default: 0.5

latex_to_svg_file

Convert a LaTeX math expression to SVG and save it to a file. Best for larger expressions or when you need to reference the SVG by path.

ParameterTypeDescription
latex *stringThe LaTeX math expression to convert
outputPath *stringThe file path where the SVG should be saved
unit *stringOutput unit for width/height. Use pt for print/InDesign, px for web/browsers, mm for metric print, ex to keep relative units
displaybooleanDisplay mode (block) vs inline mode. Default: true
fontSizenumberFont size (em size) in the same unit as the output. E.g., 11 for 11pt when unit=pt, or 16 for 16px when unit=px. Default: 16
xHeightRationumberRatio of x-height to font size. Varies by font: Times 0.45, Helvetica 0.52, Computer Modern 0.43. Default: 0.5