Wolfram Language MCP
Enables mathematical computation via Wolfram Language/Mathematica integration, supporting calculations, equation solving, calculus, matrix operations, and symbolic mathematics.
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)
- Download from Wolfram Research
Option B: Wolfram Engine (Free for developers)
- Download from Wolfram Engine
- Requires free license activation
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
- Generate data with Wolfram:
Table[{x, Sin[x], Cos[x]}, {x, 0, 2*Pi, 0.1}]
- Visualize with React or Python:
- See
examples/trig_visualization.jsxfor interactive React charts - See
examples/trig_plot.pyfor publication-quality matplotlib plots
š 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.pymatch your installation - Ensure Wolfram Engine is activated (run
wolframscriptin 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_executewith 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:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
MIT License - see LICENSE file for details
Acknowledgments
- Built with FastMCP by Marvin
- Powered by Wolfram Language
- Designed for Claude Desktop
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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.