mcp -mathematica
MCP server from texra-ai/mcp-server-mathematica
claude mcp add --transport stdio texra-ai-mcp-server-mathematica node build/index.js
How to use
The Mathematica MCP Server enables MCP clients to offload Mathematica computations to a local Mathematica installation by invoking wolframscript through a Node.js-based MCP server. It exposes two tools: execute_mathematica, which runs arbitrary Mathematica code and returns the result in a selectable format (text, latex, or mathematica), and verify_derivation, which checks a sequence of mathematical steps for logical consistency using Simplify[prev == current]. Clients such as Cursor or Cline can send tool requests with the appropriate input payloads to perform calculations, render results as LaTeX or Mathematica syntax, and validate derivations for correctness. The server is intended to be run locally so that your installed Mathematica environment is used for all computations.
To use the tools, start the server (node build/index.js after building) and configure your MCP client to point at the running server. You can call execute_mathematica with a code string, specify the desired output format, and receive the computed result. For verification tasks, provide an array of step strings to verify each transition, and choose an output format for the report. The server acts as a bridge between MCP clients and Wolfram Mathematica via wolframscript.
How to install
Prerequisites:
- Mathematica installed on the system with wolframscript available in PATH
- Node.js (recommended v16 or later)
Installation steps:
- Clone the repository and navigate to it:
git clone <repository-url>
cd <repository-directory>
- Install dependencies:
npm install
- Build the server (transpile TypeScript to JavaScript):
npm run build
- Run the server:
node build/index.js
If you prefer a production deployment, you can use a process manager like pm2 to keep the server running in the background:
pm2 start build/index.js --name mathematica-mcp
Additional notes
Notes and tips:
- Ensure wolframscript is accessible in your system PATH by running wolframscript -help in a terminal.
- The server communicates over stdio; keep the terminal open (or the process manager running) while using MCP clients.
- If you modify the code, re-run npm run build to update build/index.js before restarting the server.
- In client configurations (e.g., Cursor or Cline), specify the command as node and the path to build/index.js to connect to this MCP server. Environment variables can be added if your deployment requires custom Mathematica options or wolframscript behavior.
- For robust deployments, monitor logs for errors from wolframscript and ensure licensing for Mathematica is valid on the host machine.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.