mcp-mma-docs

MCP.Pizza Chef: benhaotang

The mcp-mma-docs is an MCP server that enables querying Mathematica documentation through a local Mathematica (MMA) installation or wolframscript. It integrates with the MCP ecosystem to provide real-time access to Mathematica's extensive documentation, facilitating developers and users to retrieve precise information programmatically. It requires Mathematica or wolframscript to be installed and supports integration with Claude and other MCP clients for seamless documentation lookup within AI workflows.

Use This MCP server To

Query Mathematica documentation programmatically via local MMA installation Integrate Mathematica docs lookup into AI-assisted coding workflows Enable real-time access to Wolfram Language function references Support AI agents in retrieving precise Mathematica usage examples Automate Mathematica documentation retrieval in development environments

README

Mathematica Documentation MCP server

General & Usage

Made with mcp-python-sdk

Important

if you are still using FastMCP version of this mcp server, please consider pull this repo again and update to newer versions as FastMCP is already deprecated.

Requirements: pip install -r requirements.txt and have Mathematica installed (or at least wolframscript callable from terminal, e.g. via free wolfram engine for developers).

Run mcp dev path/to/mcp-mma-doc.py to initialize the server.

Run mcp install path/to/mcp-mma-doc.py to install to claude or add following to claude/cline config:

"mathematica-docs": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp",
        "mcp",
        "run",
        "/path/to/mcp-mma-doc.py"
      ]
    }

Note

Currently using uv with mcp seems to break certain Linux/macOS version of Claude-desktop, you might need to set as:

"mathematica-docs": {
      "command": "/path/to/mcp",
      "args": [
        "run",
        "/path/to/mcp-mma-doc.py"
      ]
    }

instead, with /path/to/mcp got from running which mcp in terminal

Custom wolframscript install path

If you need custom path to wolframscript, or it is not in system path, you can set via environmental variable by

export WOLFRAMSCRIPT_PATH="/usr/bin/wolframscript"

or set as an env key in mcp config

"mathematica-docs": {
      "command": ...,
      "args": ....
      "env": {
        "WOLFRAMSCRIPT_PATH": "/usr/bin/wolframscript"
      }
    }

Tools

The plugin provides the following commands:

  • get_docs: support factory functions, function via an addon, and function via a package.
    • Basic usage: get_docs("Plot")
    • With package: get_docs("WeightSystem", packages=["LieART"])
    • With addon: get_docs("FCFeynmanParametrize", packages=["FeynCalc"], load_addons=["FeynArts"])
  • list_package_symbols: list all symbols/functions in a package.
    • Basic usage: list_package_symbols("FeynCalc")

Known issues

  • If you see things like INFO Processing request of type __init__.py:431 ListToolsRequest in cline, you can ignore them as this will not affect it from working, this is because cline parse tool list together with console debug infos, and current python-sdk cannot disable console messages. This will not affect any function calling part other than seeing this warning.
  • Some MMA docs may contain complex styling format, and is not easy to remove with simple regex, your llm may be influenced by this, please instruct it to ignore the styling format and write in InputForm only.

Screenshots

screenshot

mcp-mma-docs FAQ

How do I install the mcp-mma-docs server?
Install dependencies with 'pip install -r requirements.txt' and ensure Mathematica or wolframscript is accessible from your terminal, then run the server with 'mcp dev path/to/mcp-mma-doc.py'.
What are the system requirements for running mcp-mma-docs?
You need a local Mathematica installation or wolframscript available in your system PATH, plus Python dependencies installed via pip.
Can I use mcp-mma-docs with different MCP clients?
Yes, it can be integrated with various MCP clients like Claude by configuring the client to run the server command.
Is there any compatibility issue I should be aware of?
Using 'uv' with 'mcp' may cause issues on some Linux/macOS versions; consider alternative run methods if problems occur.
How does mcp-mma-docs fetch documentation?
It queries the local Mathematica installation or wolframscript to retrieve official documentation content in real-time.
Can I update mcp-mma-docs from older FastMCP versions?
Yes, FastMCP is deprecated; you should pull the latest repo and update to the current version for best support.
Does mcp-mma-docs support Wolfram Engine for developers?
Yes, it works with the free Wolfram Engine for developers as long as wolframscript is callable from the terminal.