mcp-server-mathematica

mcp-server-mathematica

3

The Mathematica MCP Server allows Model Context Protocol clients to execute and verify Mathematica code, facilitating complex mathematical tasks. It integrates with various clients, enabling them to utilize the capabilities of Mathematica for enhanced computation and derivation verification.

Overview

This project is a Model Context Protocol (MCP) server designed to enable clients such as Cursor to execute Mathematica code using wolframscript. It facilitates complex mathematical calculations, verification of mathematical derivations, and generation of LaTeX or Mathematica string representations.

Features

  • Execute Mathematica code and return results.
  • Verify mathematical derivations for logical consistency using Simplify[prev == current].
  • Integrates with MCP clients allowing customization and automated tool approval.

Prerequisites

  • Mathematica must be installed.
  • wolframscript must be available in the PATH.
  • Node.js v16 or later.

Installation

  1. Clone the repository.
  2. Install dependencies using npm.
  3. Build the server with npm.

Running the Server

Run the MCP server in a terminal with a specified Node.js command. For robust deployment, use a process manager.

Integration with MCP Clients

Start the server, configure the client settings, restart the client, and potentially specify tool permissions in client configuration files.