Skip to main content

Mathematica Documentation MCP server using wolframscript CLI

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_benhaotang_mcp_mma_docs-0.1.0.tar.gz (349.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file iflow_mcp_benhaotang_mcp_mma_docs-0.1.0.tar.gz.

File metadata

  • Download URL: iflow_mcp_benhaotang_mcp_mma_docs-0.1.0.tar.gz
  • Upload date:
  • Size: 349.3 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for iflow_mcp_benhaotang_mcp_mma_docs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ccdf8bdf8fb3ede0f41edccf74c154d0924e781a2059190cb659345fa404f80b
MD5 0ff3d7592018631a036c5770d69d18b2
BLAKE2b-256 c1701c45b1687c35341bd097965c0dca524564f8ed74ec532725056f57f61964

See more details on using hashes here.

File details

Details for the file iflow_mcp_benhaotang_mcp_mma_docs-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_benhaotang_mcp_mma_docs-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 355.0 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for iflow_mcp_benhaotang_mcp_mma_docs-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b4b4b586551650bd4f9f5ed6d9d1a81f2f4ee2bc2aa76ca0e86ba38e9743202b
MD5 2a7a9d015aa30cee42457bd6cb735b19
BLAKE2b-256 37ecc736a84ef1909317117ac487ef692b1afd79733d34335095110bd7a3ef0a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page