Mathematica Documentation MCP server

Mathematica Documentation MCP server

By benhaotang GitHub

MCP server for checking Mathematica code via local MMA installation

mcp-server
Overview

What is MCP-MMA-Docs?

MCP-MMA-Docs is a server designed for checking Mathematica code through a local MMA installation, utilizing FastMCP for efficient operation.

How to use MCP-MMA-Docs?

To use MCP-MMA-Docs, ensure you have Mathematica installed and run the command fastmcp dev path/to/mcp-mma-doc.py to initialize the server. You can also install it to claude using the provided JSON configuration.

Key features of MCP-MMA-Docs?

  • Supports factory functions and functions via addons and packages.
  • Commands like get_docs and list_package_symbols for easy access to documentation and symbols.
  • Customizable path for wolframscript if needed.

Use cases of MCP-MMA-Docs?

  1. Checking and validating Mathematica code snippets.
  2. Accessing documentation for various Mathematica functions and packages.
  3. Integrating with other tools like claude for enhanced functionality.

FAQ from MCP-MMA-Docs?

  • What are the requirements to run MCP-MMA-Docs?

You need to have Mathematica installed and run pip install -r requirements.txt to set up the environment.

  • Can I customize the path for wolframscript?

Yes! You can change the path in the Python file to point to your custom installation of wolframscript.

  • Are there any known issues?

Yes, some issues related to incomplete implementation of function description and complex styling formats in MMA docs may occur, but they do not affect functionality.

Content

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

No tools information available.

-

mcp-server v2ex
View Details

my-mcp-server(without auth)

mcp-server cloudflare
View Details
mcp-server
mcp-server by iyerrama29

MCP demo

mcp-server demo
View Details
Next MCP server
Next MCP server by Collaborne

-

mcp-server NEXT
View Details
MCP-Server
MCP-Server by fmpoliveira

-

mcp-server meteostat
View Details

Mirror of

mcp-server timelock-encryption
View Details

-

mcp-server minio
View Details