Wolfram Language MCP

Wolfram Language MCP

Enables mathematical computation via Wolfram Language/Mathematica integration, supporting calculations, equation solving, calculus, matrix operations, and symbolic mathematics.

Category
访问服务器

README

Wolfram Language MCP Server

A Model Context Protocol (MCP) server that provides powerful mathematical computation capabilities via Wolfram Language/Mathematica integration. Built with FastMCP for seamless integration with Claude Desktop.

Features

  • Mathematical Calculations - Evaluate complex expressions
  • Equation Solving - Solve algebraic and differential equations
  • Calculus Operations - Integration and differentiation
  • Matrix Operations - Linear algebra computations
  • Statistical Analysis - Statistical measures and data analysis
  • Symbolic Mathematics - Simplify, factor, and expand expressions
  • Arbitrary Code Execution - Execute any Wolfram Language code
  • Data Visualization Workflow - Generate data with Wolfram, visualize with React/Python

Prerequisites

  • Python 3.10+
  • Wolfram Mathematica 14.0+ or Wolfram Engine (free for developers)
  • Claude Desktop

Installation

1. Install Wolfram Mathematica or Wolfram Engine

Option A: Wolfram Mathematica (Commercial)

Option B: Wolfram Engine (Free for developers)

2. Install the MCP Server

# Clone the repository
git clone https://github.com/paraporoco/Wolfram-MCP.git
cd Wolfram-MCP

# Create virtual environment
python -m venv venv

# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

3. Configure Claude Desktop

Add to your Claude Desktop configuration file:

Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "wolfram": {
      "command": "C:\\Users\\YOUR_USERNAME\\Projects\\Wolfram-MCP\\venv\\Scripts\\python.exe",
      "args": [
        "C:\\Users\\YOUR_USERNAME\\Projects\\Wolfram-MCP\\wolfram_mcp_server.py"
      ]
    }
  }
}

Note: Adjust paths according to your installation location.

4. Verify Installation

Restart Claude Desktop and ask:

Can you test the Wolfram connection?

Claude should use the wolfram_test_connection tool and report success.

Available Tools

Tool Description Example
wolfram_calculate Evaluate mathematical expressions 2 + 2, Integrate[x^2, x]
wolfram_solve Solve equations Solve x^2 - 5x + 6 == 0 for x
wolfram_integrate Compute integrals Integrate x^2 with respect to x
wolfram_differentiate Compute derivatives Differentiate x^3 + 2x^2 + x
wolfram_simplify Simplify expressions Simplify (x^2 - 1)/(x - 1)
wolfram_factor Factor expressions Factor x^2 - 5x + 6
wolfram_expand Expand expressions Expand (x + 1)^3
wolfram_matrix_operations Matrix computations Inverse of {{1,2},{3,4}}
wolfram_statistics Statistical analysis Mean of {1, 2, 3, 4, 5}
wolfram_execute Execute arbitrary Wolfram code Table[Prime[n], {n, 1, 10}]
wolfram_test_connection Test Wolfram connection Verify setup

Visualization Workflow

The Wolfram MCP excels at mathematical computation but returns symbolic representations rather than rendered images. For visual graphs and charts, use the hybrid workflow:

Wolfram (Computation) → Data Extraction → Visualization Tool (Rendering)

📖 Complete Visualization Guide - Comprehensive documentation on creating beautiful, interactive charts

Quick Example

  1. Generate data with Wolfram:
Table[{x, Sin[x], Cos[x]}, {x, 0, 2*Pi, 0.1}]
  1. Visualize with React or Python:

📁 View All Examples - Complete working examples with code


Usage Examples

Basic Mathematics

What is the integral of x^2?
Solve the equation x^2 - 5x + 6 = 0

Advanced Calculus

Find the derivative of sin(x) * cos(x)
Compute the definite integral of x^2 from 0 to 1

Linear Algebra

Calculate the inverse of the matrix {{1,2},{3,4}}
Find the eigenvalues of {{4,1},{2,3}}

Statistics

What is the mean of the dataset {1, 2, 3, 4, 5}?
Calculate the standard deviation of {10, 20, 30, 40, 50}

Symbolic Math

Simplify (x^2 - 1)/(x - 1)
Factor x^2 - 5x + 6
Expand (x + 1)^3

Configuration

The server defaults to using WolframScript at:

C:\Program Files\Wolfram Research\Mathematica\14.0\wolframscript.exe

To use a different version or location, modify the paths in wolfram_mcp_server.py:

WOLFRAM_SCRIPT_PATH = r"C:\Your\Custom\Path\wolframscript.exe"
MATH_KERNEL_PATH = r"C:\Your\Custom\Path\MathKernel.exe"

Troubleshooting

"Wolfram Language Not Found"

  • Verify Mathematica/Wolfram Engine is installed
  • Check the paths in wolfram_mcp_server.py match your installation
  • Ensure Wolfram Engine is activated (run wolframscript in terminal)

"Connection Test Failed"

  • Make sure your Mathematica license is active
  • Try running wolframscript -code "2+2" in your terminal
  • Check that the executable path is correct

"Execution Timed Out"

  • Complex calculations may need more time
  • Use wolfram_execute with a custom timeout parameter
  • Consider simplifying the expression

Development

Project Structure

Wolfram-MCP/
├── wolfram_mcp_server.py    # Main server implementation
├── requirements.txt          # Python dependencies
├── README.md                # Documentation
├── LICENSE                  # MIT License
└── venv/                    # Virtual environment (not in git)

Running Tests

# Test the connection directly
python wolfram_mcp_server.py

# Use with Claude Desktop to test all tools

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT License - see LICENSE file for details

Acknowledgments

Links

Support

For issues and questions:

  • Open an issue on GitHub
  • Check existing issues for solutions
  • Refer to Wolfram Language documentation for syntax help

Made with ❤️ for the Claude + Wolfram community

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选