mcpField
M
mathematica-mcp

mathematica-mcp

Local
github.com/lars20070Science & Education8Updated 36w ago

About mathematica-mcp

mathematica-mcp wraps the wolframscript command-line interface for users and tools that need to evaluate Wolfram Language code. It also reports WolframScript and Wolfram Engine versions and the engine license type.

Key features

  1. 01Evaluate Wolfram Language scripts
  2. 02Report wolframscript version
  3. 03Report Wolfram Engine version
  4. 04Identify engine license type

Use cases

  1. 01Evaluate symbolic or computational expressions
  2. 02Check installed Wolfram software versions
  3. 03Inspect the Wolfram Engine license

MCP support

Exposes Wolfram Language evaluation and Wolfram Engine installation information to MCP clients through four tools.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"lars20070-mathematica": {
"command": "uvx",
"args": [
"mathematica_mcp"
]
}
}
}
Run commanduvx mathematica_mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypimathematica_mcp0.1.11

Tools

4

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
scriptstringYesWolfram Language script to execute.

Details

From the project README

Mathematica MCP Server

codecov Build Python Version License PyPI version

MCP server that wraps Mathematica's wolframscript command-line interface. It provides tools to evaluate Wolfram Language code and retrieve information about the Wolfram Engine installation.

ToolDescription
evaluateEvaluates a Wolfram Language script
version_wolframscriptReturns version of wolframscript
version_wolframengineReturns version of Wolfram Engine
licensetypeReturns license type of Wolfram Engine

Background

  • Wolfram Language: symbolic programming language e.g. Integrate[x*Sin[x], x]
  • Wolfram Engine: kernel for running Wolfram Language code
  • WolframScript: command-line interface to Wolfram Engine
  • Mathematica: notebook interface to Wolfram Engine

Both Wolfram Engine and WolframScript are freely available for personal use.

Installation

  1. Please ensure WolframScript is installed and activated on your system.
wolframscript -version
wolframscript -activate
wolframscript -code "Integrate[x*Sin[x], x]"
  1. Install the uv package manager.
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Edit the Claude Desktop config file and add the mathematica-mcp server. Note that uvx sets up an environment, installs the mathematica-mcp package, and runs the server by calling the mathematica-mcp entry point defined in pyproject.toml. No cloning of the repository is necessary. The logs are written to the default user log directory, e.g. ~/Library/Logs/mathematica_mcp/mathematica_mcp.log on macOS.
{
  "mcpServers": {
    "mathematica-mcp": {
      "command": "uvx",
      "args": [
        "mathematica-mcp"
      ]
    }
  }
}

Claude Desktop config file on macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  1. Alternatively, you can clone the repository and then modify or extend the MCP server code. In this case, make sure to update the path to the local repository in the Claude Desktop config file.
{
  "mcpServers": {
    "mathematica-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/Users/lars/Code/mathematica-mcp",
        "run",
        "mathematica-mcp"
      ]
    }
  }
}

Claude Desktop config file on macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.