Mathematica Documentation MCP server logo

Mathematica Documentation MCP server

by benhaotang

This server provides Mathematica documentation via the Model Context Protocol (MCP). It allows users to access documentation for functions, packages, and addons within a Mathematica environment.

View on GitHub

Last updated: N/A

What is Mathematica Documentation MCP server?

The Mathematica Documentation MCP server is a tool that allows you to access Mathematica documentation programmatically using the Model Context Protocol. It uses wolframscript to retrieve documentation and provides it to other applications.

How to use Mathematica Documentation MCP server?

  1. Install requirements: pip install -r requirements.txt.
  2. Ensure Mathematica or wolframscript is installed and accessible.
  3. Initialize the server: mcp dev path/to/mcp-mma-doc.py.
  4. Install to Claude or configure Claude/Cline with the provided JSON configuration, adjusting paths as needed.
  5. If needed, configure the WOLFRAMSCRIPT_PATH environment variable or in the mcp config.

Key features of Mathematica Documentation MCP server

  • Provides documentation for Mathematica functions.

  • Supports documentation retrieval for functions within packages.

  • Supports documentation retrieval for functions via addons.

  • Provides a command to list symbols/functions in a package.

  • Uses MCP for communication.

Use cases of Mathematica Documentation MCP server

  • Integrating Mathematica documentation into other applications.

  • Providing documentation access within a chatbot or assistant.

  • Automating documentation retrieval for code analysis.

  • Enabling programmatic access to Mathematica's extensive documentation.

FAQ from Mathematica Documentation MCP server

How do I specify a custom path to wolframscript?

Set the WOLFRAMSCRIPT_PATH environment variable or configure it in the MCP config.

What do I do if I see INFO Processing request of type __init__.py:431 ListToolsRequest in Cline?

You can ignore these messages as they are console debug information and do not affect the functionality of the server.

The documentation contains complex styling formats. What can I do?

Instruct your LLM to ignore the styling format and write in InputForm only.

What is the basic usage of the get_docs command?

The basic usage is get_docs("Plot") to retrieve documentation for the Plot function.

How do I get documentation for a function in a specific package?

Use the get_docs command with the packages argument, e.g., get_docs("WeightSystem", packages=["LieART"]).