# mathematica-mcp [Health: Active]

**Category:** 👨‍💻 Code Execution  
**Repository:** https://github.com/lars20070/mathematica-mcp  
**GitHub Stars:** 8  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mathematica-mcp

## Description
MCP server for WolframScript

## Tools
Capabilities this server exposes over MCP:

- **evaluate** — Evaluate a Wolfram Language script by running the `wolframscript -print -file <script>` command.

Documentation for Wolfram Language:
https://context7.com/websites/reference_wolfram_language/llms.txt

IMPORTANT: The tool is returning the result of the last line executed in the script, and any expression printed explicitly with `Print[]`.

<example>
  <script>
    Integrate[x*Sin[x], x]
  </script>
  <output>
    -(x*Cos[x]) + Sin[x]
  </output>
</example>

<example>
  <script>
    r = D[Sin[x]^2, x]
    Integrate[r^2, x]
  </script>
  <output>
    x/2 - Sin[4*x]/8
  </output>
</example>

<example>
  <script>
    r = D[Sin[x]^2, x]
    Print[r]
    Integrate[r^2, x]
  </script>
  <output>
    2*Cos[x]*Sin[x]
    x/2 - Sin[4*x]/8
  </output>
</example>
- **version_wolframscript** — Get the version of the `wolframscript` tool.
- **version_wolframengine** — Get the version of the Wolfram Engine.
- **licensetype** — Get the license type of the Wolfram Engine.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "mathematica-mcp": {
    "command": "uvx",
    "args": ["mathematica-mcp"]
  }
}
```

## Documentation

## What the mathematica-mcp MCP server does

The mathematica-mcp MCP server connects an MCP-compatible client to the local Wolfram Engine through Mathematica's `wolframscript` command-line tool. Its primary purpose is to let an agent submit Wolfram Language code for evaluation, such as symbolic mathematics expressions, without requiring the agent to interact with the Mathematica notebook interface.

It also exposes installation diagnostics. An agent can ask for the installed WolframScript version, the Wolfram Engine version, and the engine's license type. These checks can help determine whether the local runtime is available and identify which installation is being used.

## How it works

The Python package runs as an MCP server and invokes `wolframscript` on the host system. WolframScript, in turn, communicates with the Wolfram Engine kernel that executes Wolfram Language code. Mathematica is described in the project as the notebook interface, while the server uses the command-line path instead.

The documented launch method uses standard input/output through an MCP client configuration. With `uvx`, the package environment is created automatically, the published package is installed, and its `mathematica-mcp` entry point is started. A local repository checkout can instead be launched with `uv` and a directory argument.

## Setup and configuration

Install and activate WolframScript before starting the server. The README demonstrates checking it with `wolframscript -version`, activating it with `wolframscript -activate`, and evaluating a sample expression from the shell. Wolfram Engine and WolframScript are stated to be available for personal use, subject to their own terms.

Install the `uv` package manager, then add a server entry to the MCP client's configuration. The package-based form uses `uvx` with `mathematica-mcp` as its argument. For development or customization, clone the repository and replace that configuration with a `uv --directory ... run mathematica-mcp` command pointing to the local checkout.

On macOS, the documented Claude Desktop configuration file is `~/Library/Application Support/Claude/claude_desktop_config.json`. Logs from the `uvx` setup are written to the default user log directory; the README gives `~/Library/Logs/mathematica_mcp/mathematica_mcp.log` as the macOS example.

## Tools and capabilities

The mathematica-mcp MCP server provides these tools:

- `evaluate`: runs a Wolfram Language script.
- `version_wolframscript`: returns the WolframScript version.
- `version_wolframengine`: returns the Wolfram Engine version.
- `licensetype`: returns the Wolfram Engine license type.

The available computation depends on the Wolfram installation and activation state on the host. The project materials specifically illustrate symbolic evaluation with an integral, but do not define a narrower mathematical feature set.

## Limitations and notes

A working local WolframScript installation is required; installing the Python package alone does not provide the Wolfram runtime. WolframScript must also be activated before evaluation. No environment variables or remote Wolfram service configuration are described.

_Full upstream README: https://allmcps.com/mcp/mathematica-mcp/readme_

