Mathematica MCP Server
Allows interaction with Wolfram Engine via WolframScript, enabling evaluation of Wolfram Language code and retrieval of installation details such as version and license type.
Provides tools to evaluate Wolfram Language scripts, leveraging the full symbolic computation capabilities of the Wolfram Language through the Wolfram Engine.
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 MCP Serverevaluate Integrate[x*Sin[x], x]"
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 Server
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.
Tool | Description |
| Evaluates a Wolfram Language script |
| Returns version of |
| Returns version of Wolfram Engine |
| Returns 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.
Related MCP server: Mathematica MCP Server
Installation
Please ensure WolframScript is installed and activated on your system.
wolframscript -version
wolframscript -activate
wolframscript -code "Integrate[x*Sin[x], x]"Install the uv package manager.
curl -LsSf https://astral.sh/uv/install.sh | shEdit the Claude Desktop config file and add the
mathematica-mcpserver. Note thatuvxsets up an environment, installs themathematica-mcppackage, and runs the server by calling themathematica-mcpentry point defined inpyproject.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.logon macOS.
{
"mcpServers": {
"mathematica-mcp": {
"command": "uvx",
"args": [
"mathematica-mcp"
]
}
}
}Claude Desktop config file on macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
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
Available Tools
4 toolsevaluateA
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[].
Arguments: script (str): Wolfram Language script to execute.
Returns: str: The result of the Wolfram Language script as a string.
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses that it runs wolframscript command, returns last line of execution and Print[] outputs. No annotations provided, so description carries burden, and it does so adequately though it omits potential side effects or error handling.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Includes multiple examples and documentation link, which are helpful but make the description longer than necessary. Could be more concise while retaining clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers the essential behavior for a single-parameter tool with a string return. Lacks details on error handling or timeouts, but is sufficient given the tool's simplicity and presence of an output schema (though not shown explicitly).
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The single 'script' parameter is explained as a Wolfram Language script, with examples illustrating usage. Schema description coverage is 0%, so description adds significant value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it evaluates a Wolfram Language script by running a specific command, distinguishing it from sibling tools (licensetype, version_*) that handle license/version queries.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides clear guidance on output behavior (last line result and Print[] outputs) and includes a documentation link. Does not explicitly state when not to use or compare to alternatives, but siblings are distinct enough.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
licensetypeA
Get the license type of the Wolfram Engine.
Returns: str: License type of the Wolfram Engine e.g. 'Professional'.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden of behavioral disclosure. It states the return type (str) and implies a read-only operation, but lacks explicit mention of side effects like destructive behavior. However, for a simple getter, it is sufficiently transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with only two sentences, front-loading the purpose. Every sentence is informative and without unnecessary detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity of the tool (no parameters, no nested objects), the description is complete. An output schema exists, but the description already specifies the return type, making it fully informative.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has no parameters, and schema coverage is 100%. The description adds no parameter details because none are needed. It is concise and provides no gaps.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states 'Get the license type of the Wolfram Engine' with a specific verb and resource, and it is distinct from sibling tools like evaluate, version_wolframengine, and version_wolframscript.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implicitly indicates when to use this tool (when needing the license type). While it does not explicitly state when not to use it or provide alternatives, the context is clear enough for an agent to differentiate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
version_wolframengineA
Get the version of the Wolfram Engine.
Returns: str: Version of the Wolfram Engine.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It states the return type (str) but does not disclose potential behaviors like network requirements, error states, or side effects. For a version check, this is minimally adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with two sentences, front-loading the action and then stating the return format. No wasted text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with no parameters and an output schema, the description completely covers its purpose and return value. No further information is necessary.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist in the input schema, so schema coverage is 100%. The description adds no additional parameter information because none is needed. Baseline for zero parameters is 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Get the version of the Wolfram Engine', using a specific verb and resource. The sibling version_wolframscript suggests differentiation between engine and script versions, making it easy to select the correct tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives like evaluate or licensetype, but the purpose is simple and self-explanatory. Implied usage for checking the engine version.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
version_wolframscriptA
Get the version of the wolframscript tool.
Returns:
str: Version of the wolframscript tool.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden for behavioral disclosure. It states that the tool returns a version string, implying a read-only, non-destructive operation. While minimal, it adds sufficient context for safe invocation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is exceptionally concise with two sentences: the first defines the purpose, the second specifies the return type. It is front-loaded and every sentence adds value with no extraneous text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity and the presence of an output schema (as indicated by context signals), the description is complete. It adequately covers the tool's action and return value without needing to elaborate further.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and the schema coverage is 100% (vacuously). The description adds no param details, which is appropriate since there are none. No additional semantic burden is required.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves the version of the wolframscript tool. It distinguishes itself from siblings like evaluate (execution), licensetype (license type), and version_wolframengine (engine version), making its specific purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not provide explicit guidance on when to use this tool versus alternatives, but its purpose is self-evident as a simple version query. No exclusionary context is needed given the straightforward nature.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a clearly distinct purpose: evaluate executes scripts, licensetype returns license info, and the two version tools return specific version strings. There is no overlap.
Tool names mix conventions: evaluate is a verb, licensetype is a compound noun without underscore, and version_wolframengine/script use noun_verb pattern. Inconsistency in verb usage and separators.
With 4 tools, the server covers core evaluation and basic information retrieval. Slightly thin but reasonable for a focused Mathematica evaluation server.
The server provides the essential evaluate tool but lacks auxiliary capabilities like error handling, file management, or interactive sessions. Some gaps for advanced use cases.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
Remote MCP gateway for ScriptMasterLabs x402-paid tools and agent-native API access.
An authenticated remote MCP server for user-owned devices and one-shot capability invocation.
A paid remote MCP for hosted MCP server, built to return verdicts, receipts, usage logs, and audit-r
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables integration of Semgrep in development environments via the MCP protocol, supporting static code analysis, rule management, and scan result operations.2MIT
- FlicenseAqualityDmaintenanceAllows LLMs to execute Wolfram Language code in a secure, session-based environment by providing an interface to interact with a Wolfram Mathematica kernel.33
- AlicenseAqualityFmaintenanceAn MCP server that connects AI assistants to a local Wolfram Engine, enabling symbolic math, numerical analysis, and data visualization through Wolfram Language. It provides secure expression filtering, client authentication, and supports both local stdio and HTTP transports.232MIT
- AlicenseBqualityDmaintenanceEnables MCP clients to execute Mathematica code via wolframscript and verify mathematical derivations.224MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/lars20070/mathematica-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server