Skip to content
MCP server
API, CLI e MCP

MCP server

Let AI models generate, convert and check equations and chemical structures through neomath-mcp, without opening the app and without opening a network port.

On this page

neomath-mcp lets AI models (Claude, GPT, Gemini, local models and any client that speaks MCP) generate, convert and open equations and work with chemistry precisely and without opening the app.

  • It is a separate program, a single executable, with no installation.
  • It speaks MCP over stdio: the client opens the program and talks through standard input and output. It opens no network port.
  • Results are identical to those of the app, the command line and the API.

Set it up in the client#

Claude Desktop

In claude_desktop_config.json:

JSON
{
  "mcpServers": {
    "neomath": {
      "command": "C:/Path/to/neomath-mcp.exe",
      "env": { "NEOMATH_MCP_ROOTS": "C:/Users/you/Documents/Equations" }
    }
  }
}

Claude Code

Terminal
claude mcp add neomath --env NEOMATH_MCP_ROOTS=C:/Users/you/Documents/Equations -- C:/Path/to/neomath-mcp.exe

Cursor and VS Code

Use the same format as Claude Desktop (command and env) in .cursor/mcp.json or .vscode/mcp.json (in VS Code, the key is servers).

Any other client: neomath-mcp command, stdio transport, no arguments. In JSON on Windows, use / or \\ in paths.

Allowed folders#

NEOMATH_MCP_ROOTS defines where the server can read and write: folders separated by ; on Windows and : on other systems. Without the variable, only the user folder and the temp folder. * allows any folder (not recommended).

  • Absolute paths only.
  • Never overwrites an existing file without overwrite: true; a batch skips files that already exist.
  • Symbolic links are resolved before the check.
  • A request outside the folders returns the message reading outside the allowed folders is blocked (or writing …) and the list of accepted folders.

Equation tools#

Tool What it does Writes?
render_equation LaTeX or MathML to EPS, SVG or PNG; PNG comes back as an image for the model to check only with output_path
check_equation validates and returns normalized MathML, LaTeX, size and corrections no
latex_to_mathml, mathml_to_latex text conversions no
normalize_mathml cleans MathML coming from Word and the web no
open_eps recovers MathML, LaTeX, format and preferences from an EPS, SVG or PNG generated by NeoMath no
batch_render up to 2000 equations per call, one file each in the given folder
render_folder folder of MathML .txt to EPS, with a report in the output
convert_files converts folders of Neo files; never changes the originals in the output
inspect_preferences, create_preferences reads and creates preferences only with output_path
equation_layout exact geometry of each glyph and stroke no
extract_docx_equations equations from a .docx only with output_dir
restyle_folder, undo_restyle, list_restyle_backups batch style; simulation by default with backup
list_fonts, neomath_info fonts, version, formats and tips no

Common options (options)#

Option Effect
color, color_cmyk, color_everything color of the whole equation, in RGB or CMYK
preferences_file, preferences_text style (fonts, sizes and spacing)
normalize, multiplication, thousands_separator, function_application MathML cleanup
title, date, fix_symbol_metrics title, date and symbol measurement

Chemistry#

The chem_* tools work with chemistry. The structure comes in input: a SMILES or a CML, MOL or SDF document.

Tool What it does
chem_read_molecule formula, molar mass, charge, rings, composition and accessible description; explain: true gives the why
chem_properties just the properties
chem_convert between smiles, cml, mol, sdf, json and svg
chem_render 2D drawing as SVG or PNG, with style (style.preset: default, acs, rsc, latex, dark)
chem_export writes the molecule to a file
chem_report Markdown report for school work
chem_validate valence, disconnected parts, charge and overlapping atoms
chem_reaction_scheme reaction scheme in text, drawn or converted
chem_balance balancing and stoichiometry, with limiting reagent and yield
chem_element data of an element; all returns the compact table
chem_catalog, chem_batch_convert structure catalog and folder conversion
JSON
{ "name": "chem_render", "arguments": { "input": "CC(=O)O", "format": "png", "dpi": 150, "white_background": true } }

NeoScript through the AI#

Four tools let the AI write correct scripts without guessing the API:

  1. neoscript_docs_listar: the map of sections and of all functions.
  2. neoscript_docs_ler: a section or a function in Markdown.
  3. neoscript_docs_buscar: searches for a term.
  4. run_neoscript: runs the script with folders (allowed folders), timeout_seconds and memory_mb, and returns the output, the value and the error with the line.

Resources and prompts#

Resource Content
neochem://tabela-periodica the 118 elements as JSON
neochem://elemento/<Z, symbol or name> complete data for an element
neochem://catalogo catalog of ready-made structures
neomath://quimica-latex chemistry commands NeoMath accepts
neomath://api-http OpenAPI specification of the local API

Ready-made prompts: converter_docx, revisar_equacoes and prova_estequiometria. In Claude Code, for example, /mcp__neomath__revisar_equacoes.