mathematica-mcp
This server lets AI agents run Mathematica code, control live notebooks, and access Wolfram knowledge — bridging LLMs with the Mathematica ecosystem.
Code Execution & Evaluation
Execute Wolfram Language code in a persistent kernel session, notebook cell, or interactive front-end (for
Manipulate/Dynamic)Batch multiple commands, trace/time expressions, check syntax without executing, and verify mathematical derivations step-by-step
Notebook & Cell Management
Create, open, save, close, and list notebooks; read
.nbfiles with or without a kernelRead, write, delete, select, and evaluate cells; export notebooks to PDF, HTML, LaTeX, or Markdown
Screenshots & Visuals
Screenshot entire notebooks or specific cells; rasterize expressions; compare plots side-by-side; create animations; inspect and export graphics
Symbolic Mathematics
Integrate, differentiate, solve, simplify, expand, factor, compute limits, and series expansions
Wolfram Knowledge & Data
Query Wolfram Alpha with natural language; look up real-world entity data; convert units; retrieve physical/mathematical constants
Interpret natural language math descriptions into Wolfram Language code
Search and load from the Wolfram Function Repository and Data Repository
Import/export data from files or URLs
Session & Kernel Management
Get kernel status, restart kernel, list/get/set/clear variables, load packages, and retrieve recent messages/warnings
Advanced & Async
Submit long-running computations for background execution and poll for results
Cache expressions for reuse; run Wolfram script files (
.wl,.m)
Allows Google Gemini to execute Mathematica code, control notebooks, and verify results.
Allows OpenAI Codex to execute Mathematica code, control notebooks, and verify results.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mathematica-mcpintegrate x^2 sin(x) from 0 to pi"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Mathematica MCP
A front-end / notebook automation layer for Mathematica, built for AI agents.
Your AI agent can write Mathematica code. This server lets it run that code in your live Mathematica session: create and edit notebooks, build interactive Manipulate panels, capture screenshots, verify derivations step by step, and read .nb files even without a kernel. Works with Claude, Cursor, VS Code, Codex, and Gemini.
It runs beside the official Wolfram Local MCP, not instead of it: Wolfram's server is the reference evaluator and documentation surface; this one owns the live notebook. See How it compares.
Upgrading from an earlier version? See the Migration Guide.
Watch it in action

An AI agent solving math, generating plots, and controlling a live Mathematica notebook. Errors are returned directly to the agent, no copy-pasting notebook output back into chat.
Why this exists
LLMs can write Wolfram Language, but they cannot run it, see the result, or fix their own mistakes. This server closes that loop:
Live notebook control: the agent creates, edits, evaluates, and screenshots real notebooks in your running Mathematica front end. Interactive content (
Manipulate,Dynamic, sliders) renders as live panels.Fast by default: computation runs on a persistent kernel session that starts warming the moment the server launches; calls return in milliseconds, not the ~13 seconds of a cold
wolframscriptstart per request.Self-debugging agents: Mathematica errors flow back with a
suggested_fixand, when derivable, a ready-to-runretry_withcall. No copying red text from the notebook into chat.Derivation checking:
verify_derivationvalidates a chain of mathematical steps and pinpoints the first invalid one.Reads notebooks without a license:
read_notebook_fileparses.nbfiles in pure Python when no kernel is available (a kernel is used for higher fidelity when present).Local and private: core execution stays on your machine. Cloud services are contacted only by opt-in tools like
wolfram_alpha.
Related MCP server: JupyterMCP
What you can ask for
"Integrate x^2 sin(x) from 0 to pi, then verify the result."
evaluate("Integrate[x^2 Sin[x], {x, 0, Pi}]") => -4 + Pi^2
verify_derivation(steps=["Integrate[x^2 Sin[x], {x, 0, Pi}]", "-4 + Pi^2"])
=> Step 1 → 2: ✓ VALID
All steps are valid!"Plot the sombrero function in a new notebook."
notebooks(action="create", title="Sombrero")
evaluate("Plot3D[Sinc[Sqrt[x^2+y^2]], {x,-4,4}, {y,-4,4}]", target="notebook")
=> [3D surface plot rendered in the live notebook]"Give me a Chebyshev polynomial explorer with a degree slider."
evaluate("Manipulate[Plot[ChebyshevT[n, x], {x, -1, 1}], {n, 0, 30, 1}]", target="notebook")
=> [live slider panel in the notebook; interactive code is auto-routed to the front end]Quick start
Prerequisites: Mathematica 14.0+ (15+ recommended) with wolframscript on your PATH, and the uv package manager.
# One command, pick your client:
uvx mathematica-mcp-full setup claude-desktop # or: cursor | vscode | codex | gemini | claude-codeRestart Mathematica (so the addon loads) and restart your editor. Then verify:
uvx mathematica-mcp-full doctorDone - ask your agent for a plot.
The PyPI package and CLI are named
mathematica-mcp-full.
Manual installation, per-client configuration details, and troubleshooting live in the Installation Guide.
The lean default
Agents see a consolidated 12-tool surface (~2.9k tokens of schema) instead of the classic 82 tools (~15k tokens) - a 5x cut in the context an agent pays before doing any work, with the same engine underneath. Prefer everything? MATHEMATICA_PROFILE=classic restores the full pre-1.0 surface, and MATHEMATICA_TOOLSETS adds opt-in extras to lean.
Tool reference: Technical Reference - Lean Profile Tools
Profiles and toolsets: Technical Reference - Tool Profiles
How it stays fast: Technical Reference - Architecture
How it compares
Runs alongside the official Wolfram Local MCP (setup <client> --with-official configures both side by side). The differentiator is live notebook / front-end automation:
Capability | Official Wolfram Local MCP | This MCP |
Wolfram-Language evaluation |
|
|
Wolfram Alpha |
|
|
Symbol docs / definitions |
|
|
Read a notebook file |
|
|
Write a notebook file |
|
|
Live notebook control (create/edit/eval/screenshot) | No | Yes |
Interactive UIs (sliders, | No | Yes, in the live front-end |
Derivation verification | No |
|
Doc search / code inspection / test reports |
| Deliberately not duplicated - use the official server |
Who this is for
Audience | Use case |
Researchers using LLM coding assistants | Run Mathematica from Claude/Cursor/VS Code without leaving your editor |
Data scientists | Import, transform, and visualize data through natural language |
Educators | Create interactive Mathematica notebooks through AI conversation |
Not for | Production web services, untrusted multi-tenant environments |
Documentation
Installation Guide: manual setup, per-client configs, troubleshooting
Migration Guide: upgrading between versions
Technical Reference: architecture, tools, and configuration
Security Model: threat model, permissions, and vulnerability reporting
Benchmarks: performance data and reproduction steps
Examples: worked agent conversations (symbolic calculus, notebook analysis)
Contributing: development setup, testing, and PR process
Changelog: version history
License
MIT License
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AbhiRawat4841/mathematica-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server