mathematica-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MATHEMATICA_PROFILE | No | Tool profile: math, notebook, or full | full |
| MATHEMATICA_ROUTING_ACTION | No | Routing action, e.g. compute_cli_skip | |
| MATHEMATICA_ROUTING_MEMORY | No | Routing memory mode: observe or advise |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_mathematica_statusB | Get connection status and system info. |
| get_session_briefA | Compact session state summary: connection, profile, recent errors, routing advice. |
| get_notebooksA | List all open Mathematica notebooks. Returns ID, filename, title. |
| get_notebook_infoC | Get details about a notebook (filename, directory, cell count). |
| create_notebookA | [ADVANCED] Create a new empty notebook. Use when the user explicitly asks for a NEW notebook. This sets the active
notebook so subsequent For code execution in whatever notebook is already open, use
|
| save_notebookC | Save a notebook to disk. |
| close_notebookC | Close a notebook. |
| get_cellsC | Get list of cells in a notebook. |
| get_cell_contentC | Get the full content of a specific cell. |
| write_cellA | [ADVANCED] Write a cell without evaluating it. Prefer |
| delete_cellC | Delete a cell from a notebook. |
| evaluate_cellA | [ADVANCED] Re-evaluate an existing cell in a notebook. Prefer |
| execute_codeA | [PRIMARY] Execute Wolfram Language code. Prefer this for nearly all computation and plotting. Choose a style:
Prefer this over |
| batch_commandsC | Execute multiple commands in one round-trip. |
| evaluate_selectionA | [ADVANCED] Evaluate the currently selected notebook cell or cells. Prefer |
| screenshot_notebookC | Capture a screenshot of an entire notebook window. Args: notebook: Notebook ID. If None, uses selected notebook. max_height: Maximum height in pixels (prevents huge images) Returns the screenshot as an image that can be viewed directly. |
| screenshot_cellC | Capture a screenshot of a specific cell's content and output. Useful for seeing plots, graphics, or formatted mathematical output. Args: cell_id: The cell object ID to screenshot |
| rasterize_expressionA | Render a Wolfram Language expression as an image. Useful for visualizing plots, matrices, or formatted output without modifying any notebook. Args: expression: Wolfram Language expression to render image_size: Size of the resulting image in pixels Examples: rasterize_expression("Plot[Sin[x], {x, 0, 2 Pi}]") rasterize_expression("MatrixForm[{{1, 2}, {3, 4}}]") rasterize_expression("Graphics[Circle[]]", image_size=200) |
| select_cellB | Select a cell in the notebook (moves cursor to it). |
| scroll_to_cellC | Scroll the notebook view to make a cell visible. |
| export_notebookC | Export a notebook to PDF, HTML, TeX, or Markdown. |
| verify_derivationC | Verify a sequence of mathematical expressions steps. |
| get_kernel_stateA | Get current Wolfram kernel session state (memory, uptime, version). |
| load_packageC | Load a Mathematica package (e.g., "Developer`"). |
| list_loaded_packagesA | List all currently loaded packages and contexts. |
| list_variablesC | List all user-defined variables in the current Mathematica kernel session. |
| get_variableC | Get detailed information about a specific variable. |
| set_variableA | Set a variable in the Mathematica kernel session. Args: name: Variable name (e.g., "x", "myData") value: Wolfram Language expression to assign (e.g., "5", "{1,2,3}", "Plot[Sin[x],{x,0,Pi}]") Returns: Confirmation with the assigned value Example: set_variable("x", "Range[10]") -> {success: true, value: "{1,2,3,4,5,6,7,8,9,10}"} |
| clear_variablesA | Clear variables from the Mathematica kernel session. Equivalent to Python's 'del' or clearing notebook state. Args: names: Specific variable names to clear (e.g., ["x", "y", "z"]) pattern: Wolfram pattern to match (e.g., "temp*" clears temp1, temp2, etc.) clear_all: If True, clear ALL Global` variables (use with caution!) Returns: List of cleared variables Example: clear_variables(names=["x", "y"]) -> {cleared: ["x", "y"], count: 2} clear_variables(pattern="temp*") -> {cleared: ["temp1", "temp2"], count: 2} |
| get_expression_infoA | Get detailed structural information about a Wolfram expression. Like Python's type() on steroids - shows Head, FullForm, tree structure, depth, leaf count, and type checks (NumericQ, ListQ, etc.) Args: expression: Wolfram Language expression to analyze Returns: Structural information: head, full form, depth, leaf count, type flags Example: get_expression_info("{{1,2},{3,4}}") -> {head: "List", depth: 3, dimensions: [2,2]} get_expression_info("Sin[x] + Cos[x]") -> {head: "Plus", leaf_count: 3} |
| get_messagesA | Get recent Mathematica messages/warnings from the session. Like Python's exception traceback - helps debug what went wrong. Includes recently captured evaluation and dispatch-level messages. Args: count: Number of recent messages to retrieve (default 10) Returns: List of recent messages with timestamps Example: After a failed computation: get_messages() -> [{timestamp: "...", message: "Power::infy: Infinite expression 1/0 encountered."}] |
| restart_kernelA | Restart the Mathematica kernel, clearing all state. This is the nuclear option - clears all variables, definitions, and state. Use when the kernel is in a bad state or you need a fresh start. Returns: Confirmation of kernel restart |
| open_notebook_fileA | Open an existing Mathematica notebook file (.nb) in the Mathematica frontend. Supports:
Args: path: Path to the .nb file Returns: Notebook ID and metadata for use with other notebook commands Example: open_notebook_file("~/Documents/analysis.nb") -> {id: "NotebookObject[...]", cell_count: 15} |
| run_scriptA | Execute a Wolfram Language script file (.wl, .m) and return the result. This is equivalent to Get[path] - loads and executes the script in the current kernel session. Any definitions or side effects persist. Args: path: Path to the .wl or .m script file Returns: The result of the last expression in the script, plus timing info Example: run_script("~/scripts/setup.wl") -> {result: "Null", timing_ms: 150} |
| read_notebook_contentA | [LEGACY] Read notebook content as structured text. Prefer |
| convert_notebookA | [LEGACY] Convert a notebook into markdown, LaTeX, plain text, or Wolfram code. Prefer |
| get_notebook_outlineA | [LEGACY] Get the notebook's section outline. Prefer |
| parse_notebook_pythonB | [LEGACY] Parse a notebook with the Python-native parser. Prefer |
| get_notebook_cellA | [LEGACY] Read a single notebook cell by index. Prefer |
| read_notebookA | [PRIMARY] Read a Mathematica notebook with backend-aware dispatch. Prefer this over |
| wolfram_alphaA | Query Wolfram Alpha with natural language. This gives Mathematica superpowers - ask questions in plain English and get computed answers, data, and more. Args: query: Natural language question (e.g., "population of France", "integrate x^2 from 0 to 1", "weather in Tokyo") return_type: - "result": Simple text result (default) - "data": Structured data when available - "full": All available pods/information Returns: Wolfram Alpha response in requested format Example: wolfram_alpha("population of Tokyo") -> "13.96 million people (2021)" wolfram_alpha("derivative of sin(x^2)", "data") -> {result: "2 x cos(x^2)"} |
| interpret_natural_languageA | Convert natural language mathematical description to Wolfram Language code. This is magic - describe what you want in English and get executable code. Args: text: Natural language description (e.g., "the integral of x squared from 0 to 1", "solve x squared equals 4 for x", "plot sine of x from 0 to 2 pi") Returns: Wolfram Language code and its evaluation result Example: interpret_natural_language("the derivative of e to the x") -> {code: "D[E^x, x]", result: "E^x"} |
| entity_lookupA | Look up real-world entity data from Wolfram's curated knowledge base. Entity types include: "Country", "City", "Chemical", "Planet", "Company", "Person", "Movie", "University", "Element", "Star", and many more. Args: entity_type: Type of entity (e.g., "Country", "City", "Chemical") name: Name to look up (e.g., "France", "Tokyo", "Water") properties: Specific properties to retrieve (default: common properties) Returns: Entity data with requested properties Example: entity_lookup("Country", "Japan", ["Population", "Capital", "GDP"]) -> {name: "Japan", Population: "125.8 million", Capital: "Tokyo", GDP: "$4.94 trillion"} |
| convert_unitsA | Convert between units using Wolfram's comprehensive unit system. Args: quantity: Value with unit (e.g., "5 miles", "100 kg", "25 Celsius") target_unit: Target unit (e.g., "kilometers", "pounds", "Fahrenheit") Returns: Converted quantity Example: convert_units("100 kilometers", "miles") -> "62.1371 miles" convert_units("0 Celsius", "Fahrenheit") -> "32 Fahrenheit" |
| get_constantA | Get a physical or mathematical constant. Args: name: Constant name (e.g., "SpeedOfLight", "PlanckConstant", "Pi", "EulerGamma", "GoldenRatio", "Avogadro") Returns: Constant value with unit (if applicable) and numeric approximation Example: get_constant("SpeedOfLight") -> {value: "299792458 m/s", numeric: "2.998e8"} |
| trace_evaluationC | Trace the step-by-step evaluation of an expression. |
| time_expressionB | Time the evaluation of an expression with memory tracking. |
| check_syntaxA | Validate Wolfram Language code syntax without executing it. |
| import_dataB | Import data from a file or URL into Mathematica. |
| export_dataD | Export data or graphics to a file. |
| list_supported_formatsA | List all supported import/export formats. |
| inspect_graphicsC | Analyze the structure of a graphics object. |
| export_graphicsC | Export a graphics expression to an image file. |
| compare_plotsC | Generate a side-by-side comparison of multiple plots. |
| create_animationC | Create an animation by varying a parameter. |
| get_feature_statusA | Get the status of all feature flags. |
| get_computation_journalA | Get recent computation history: code previews, outputs, timing, success status. |
| clear_computation_journalC | Clear the computation journal. |
| resolve_functionC | Search for Wolfram Language functions and optionally auto-execute. |
| get_symbol_infoB | Get comprehensive information about a Wolfram Language symbol. |
| suggest_similar_functionsA | Find Wolfram functions similar to a query using fuzzy matching. |
| mathematica_integrateC | Compute integral using Integrate. |
| mathematica_solveC | Solve an equation using Solve. |
| mathematica_simplifyC | Simplify a mathematical expression. |
| mathematica_differentiateC | Compute derivative using D. |
| mathematica_expandC | Expand a mathematical expression. |
| mathematica_factorC | Factor a mathematical expression. |
| mathematica_limitC | Compute limit using Limit. |
| mathematica_seriesC | Compute Taylor/power series expansion. |
| search_function_repositoryC | Search the Wolfram Function Repository. |
| get_function_repository_infoB | Get details about a Wolfram Function Repository function. |
| load_resource_functionB | Load a function from the Wolfram Function Repository. |
| search_data_repositoryC | Search the Wolfram Data Repository. |
| get_dataset_infoC | Get detailed information about a Wolfram Data Repository dataset. |
| load_datasetC | Load a dataset from the Wolfram Data Repository. |
| submit_computationC | Submit a long-running computation for background execution. |
| poll_computationB | Check the status of a submitted computation. |
| get_computation_resultC | Retrieve the result of a completed computation. |
| cache_expressionC | Evaluate and cache a Wolfram expression for later reuse. |
| get_cachedC | Retrieve a previously cached expression result. |
| list_cacheA | List all cached expressions with their metadata. |
| clear_expression_cacheB | Clear all cached expressions. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| mathematica_expert | Expert guidance for using Mathematica tools effectively. |
| calculate | Compute a result inline in chat. Use for quick math, algebra, or any text answer. |
| notebook | Execute in the current Mathematica notebook. Use for plots, visualizations, or notebook artifacts. |
| new_notebook | Create a fresh Mathematica notebook and execute there. Use when you want a clean slate. |
| interactive | Execute with frontend mode for dynamic/interactive content (Manipulate, Animate, sliders). |
| quickstart | Show available execution styles and how to use them. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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