Skip to main content
Glama

Mathematica Documentation MCP server

by benhaotang

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

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

A server that provides access to Mathematica documentation through FastMCP, enabling users to retrieve function documentation and list package symbols from Wolfram Mathematica.

  1. General & Usage
    1. Custom wolframscript install path
      1. Tools
        1. Known issues
          1. Screenshots

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              FastMCP is a comprehensive MCP server allowing secure and standardized data and functionality exposure to LLM applications, offering resources, tools, and prompt management for efficient LLM interactions.
              Last updated -
              3
              Python
              MIT License
            • -
              security
              F
              license
              -
              quality
              An MCP server that fetches real-time documentation for popular libraries like Langchain, Llama-Index, MCP, and OpenAI, allowing LLMs to access updated library information beyond their knowledge cut-off dates.
              Last updated -
              2
              Python
            • A
              security
              A
              license
              A
              quality
              A documentation server based on MCP protocol designed for various development frameworks that provides multi-threaded document crawling, local document loading, keyword searching, and document detail retrieval.
              Last updated -
              2
              51
              JavaScript
              MIT License
              • Apple
              • Linux
            • -
              security
              F
              license
              -
              quality
              An MCP server that enables searching and retrieving content from Confluence documentation systems, providing capabilities for both document searches and full page content retrieval.
              Last updated -
              1
              Python

            View all related MCP servers

            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/benhaotang/mcp-mma-docs'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server