MCP.so
Sign In

Overview

What is Mathematica MCP Server?

The Mathematica MCP Server is a bridge that exposes Mathematica’s computation capabilities to MCP clients (such as Cursor) via the wolframscript command-line utility. It allows users to execute arbitrary Mathematica code and verify mathematical derivation steps, returning results in text, LaTeX, or raw Mathematica format. This server is intended for developers and mathematicians who want to integrate a local Mathematica installation into AI‑powered workflows.

How to use Mathematica MCP Server?

Install Mathematica and ensure wolframscript is in your PATH, then have Node.js v16+. Clone the repository, run npm install and npm run build to compile TypeScript. Start the server with node build/index.js—it listens over stdio. Configure your MCP client (e.g., Cline or Cursor) by adding a server entry that points to the built index.js file. Once the server is running and the client is configured, restart the client to begin using the tools.

Key features of Mathematica MCP Server

  • Execute arbitrary Mathematica code and return results
  • Verify mathematical derivation steps using Simplify
  • Output results as plain text, LaTeX, or Mathematica strings
  • Exposes two tools: execute_mathematica and verify_derivation
  • Works with any MCP client that supports stdio servers

Use cases of Mathematica MCP Server

  • Perform complex symbolic or numeric calculations during AI interactions
  • Automatically verify multi‑step mathematical derivations provided by humans or AI
  • Generate beautiful LaTeX representations of mathematical expressions
  • Integrate a full Mathematica kernel into coding assistants like Cursor

FAQ from Mathematica MCP Server

What are the exact prerequisites for running this server?

You need a licensed, local installation of Mathematica with the wolframscript command available in your PATH, plus Node.js v16 or later. The server spawns wolframscript for every tool invocation.

How do I configure this server in Cursor or Cline?

In Cline, add an entry to your settings.json file under mcpServers with the command node and arguments pointing to the absolute path of build/index.js. For Cursor, edit a similar JSON file (the exact path may vary) using the same structure. After configuration, restart the client.

Is Mathematica installed on a remote machine supported?

No—the server runs locally and requires wolframscript to be available on the same machine. It does not connect to Wolfram Cloud or any remote kernel.

What transport does the server use?

The server communicates via standard input/output (stdio), using the JSON‑RPC message format of the Model Context Protocol. No HTTP or WebSocket transport is provided.

What should I do if I get a “wolframscript not found” error?

Verify that wolframscript -help works in your terminal. If not, ensure Mathematica is installed and that the directory containing wolframscript is listed in your system’s PATH. Restart the server after fixing the PATH.

Tags

More from Other