Full GUI control of Mathematica notebooks and kernel via Model Context Protocol
Project description
Mathematica MCP
Give your AI Agent the power of Wolfram Language.
What is this?
This MCP Server empowers AI Agents & IDEs (like Claude Desktop, Cursor, or VS Code) with a direct interface to your local Wolfram Engine. With 80+ tools across configurable profiles, it enables your agent to perform symbolic reasoning, precise calculation, and interactive visualization natively.
It works in two modes:
- Inside your LLM — Use Wolfram Language as a computational backend directly within any MCP-compatible chat interface or CLI agent. Your AI reasons, computes, and visualizes without leaving the conversation.
- External notebook control — Programmatically open, read, write, evaluate, screenshot, and export live Mathematica notebooks from outside the Mathematica GUI.
Capabilities:
- Execute Code: Run Wolfram Language expressions in a secure sandbox.
- Self-Correct: Diagnose and fix syntax errors automatically.
- Visualize: Generate high-fidelity plots and export them as images.
- Analyze Notebooks: Parse and manipulate
.nbfiles contextually. - Persist State: Maintain a stateful session (e.g.
x = 5) across interactions.
Watch it in action
Quick Start
Prerequisites
Before installing, you need:
-
Mathematica 14.0+ with
wolframscriptin your PATH- Download Mathematica
- macOS: Add to
~/.zshrc:export PATH="/Applications/Mathematica.app/Contents/MacOS:$PATH"
-
uv package manager
curl -LsSf https://astral.sh/uv/install.sh | sh
One-Command Setup (Recommended)
# For Claude Desktop
uvx mathematica-mcp-full setup claude-desktop
# For Cursor
uvx mathematica-mcp-full setup cursor
# For VS Code (requires GitHub Copilot Chat extension)
uvx mathematica-mcp-full setup vscode
# For OpenAI Codex CLI
uvx mathematica-mcp-full setup codex
# For Google Gemini CLI
uvx mathematica-mcp-full setup gemini
# For Claude Code CLI
uvx mathematica-mcp-full setup claude-code
# Optional: select a tool profile (default is "full")
uvx mathematica-mcp-full setup claude-desktop --profile notebook
Then restart Mathematica and your editor. Done!
VS Code: Alternative setup via Command Palette
Prerequisite: GitHub Copilot Chat extension must be installed - MCP support is built into Copilot.
- Press
Cmd+Shift+P(Mac) /Ctrl+Shift+P(Windows) - Type "MCP" → Select "MCP: Add Server"
- Choose "Command (stdio)" — not "pip"
- Enter command:
uvx - Enter args:
mathematica-mcp-full - Name it:
mathematica - Choose scope: Workspace or User
Alternative: Interactive Installer
bash <(curl -sSL https://raw.githubusercontent.com/AbhiRawat4841/mathematica-mcp/main/install.sh)
Verify Installation
uvx mathematica-mcp-full doctor
Tip: If you encounter errors after updating, clear the cache:
uv cache clean mathematica-mcp-full && uvx mathematica-mcp-full setup <client>
Tool Profiles
Choose how many tools to expose: math (~25 tools), notebook (~44), or full (~79, default).
Pass --profile during setup or set MATHEMATICA_PROFILE env var. See the Technical Reference for details.
Manual Installation
Click to expand manual setup instructions
-
Clone & Install:
git clone https://github.com/AbhiRawat4841/mathematica-mcp.git cd mathematica-mcp uv sync
-
Install Mathematica Addon:
wolframscript -file addon/install.wl
Restart Mathematica after this step.
-
Configure your editor (replace path with your actual path):
Claude Desktop (
~/Library/Application Support/Claude/claude_desktop_config.json):{ "mcpServers": { "mathematica": { "command": "uv", "args": ["--directory", "/path/to/mathematica-mcp", "run", "mathematica-mcp-full"] } } }
Cursor (
~/.cursor/mcp.json):{ "mcpServers": { "mathematica": { "command": "uv", "args": ["--directory", "/path/to/mathematica-mcp", "run", "mathematica-mcp-full"] } } }
VS Code (
~/.vscode/mcp.json):Note: VS Code MCP requires GitHub Copilot Chat extension.
{ "servers": { "mathematica": { "type": "stdio", "command": "uv", "args": ["--directory", "/path/to/mathematica-mcp", "run", "mathematica-mcp-full"] } } }
📖 See the Installation Guide for troubleshooting and advanced setup.
What you can do with it
- Symbolic computation — Integrate, differentiate, solve equations, simplify, and verify derivations step-by-step.
- Visualization — Generate 2D/3D plots, export as PNG/SVG/PDF, create animations, and compare plots side-by-side.
- Notebook operations — Open, read, convert, and export
.nbfiles. Parse notebooks offline without a running kernel. - Knowledge queries — Access Wolfram Alpha, entity data, physical constants, and unit conversions directly from your agent.
- Data workflows — Import from 250+ formats (CSV, JSON, Excel, SQL, URLs), analyze, and export results.
- Debugging — Trace evaluation steps, time expressions, check syntax, and inspect kernel state.
Documentation
- Technical Reference: Deep dive into architecture, tools, and configuration.
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mathematica_mcp_full-0.6.5.tar.gz.
File metadata
- Download URL: mathematica_mcp_full-0.6.5.tar.gz
- Upload date:
- Size: 86.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56ad8d6436df5994b0392eb7ed2b331bbf285a4738e48b9c44bc87011cceca2f
|
|
| MD5 |
802fdf8c95c9de9df0fa41732c08d55d
|
|
| BLAKE2b-256 |
fbab3ffa0d1a6f0fab84d8cc408007335567717c5cf2d852e6dc5f4444397068
|
File details
Details for the file mathematica_mcp_full-0.6.5-py3-none-any.whl.
File metadata
- Download URL: mathematica_mcp_full-0.6.5-py3-none-any.whl
- Upload date:
- Size: 99.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8c257e68214575aeb4ca58c946534df9d2bedb191c608f3065072347806bf0a
|
|
| MD5 |
9087c8d2d9e0144c05296aa92e7caf31
|
|
| BLAKE2b-256 |
a87c9335ea121cccfd963154d76795d4f13b02d54e180b9fb8dd7f2710b361e8
|