Skip to main 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

Metadata

Release files for iflow-mcp_benhaotang_mcp-mma-docs 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iflow-mcp_benhaotang_mcp-mma-docs 0.1.0
File Size Uploaded
iflow_mcp_benhaotang_mcp_mma_docs-0.1.0.tar.gz 349.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iflow-mcp_benhaotang_mcp-mma-docs 0.1.0
File Interpreter ABI Platform
iflow_mcp_benhaotang_mcp_mma_docs-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 704.3 kB

Release files / iflow_mcp_benhaotang_mcp_mma_docs-0.1.0.tar.gz

Download URL iflow_mcp_benhaotang_mcp_mma_docs-0.1.0.tar.gz
Size 349.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ccdf8bdf8fb3ede0f41edccf74c154d0924e781a2059190cb659345fa404f80b
BLAKE2b-256 checksum
How to use checksums
c1701c45b1687c35341bd097965c0dca524564f8ed74ec532725056f57f61964
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / iflow_mcp_benhaotang_mcp_mma_docs-0.1.0-py3-none-any.whl

Download URL iflow_mcp_benhaotang_mcp_mma_docs-0.1.0-py3-none-any.whl
Size 355.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b4b4b586551650bd4f9f5ed6d9d1a81f2f4ee2bc2aa76ca0e86ba38e9743202b
BLAKE2b-256 checksum
How to use checksums
37ecc736a84ef1909317117ac487ef692b1afd79733d34335095110bd7a3ef0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page