math
实现一些数学计算工具的 MCP Server
claude mcp add --transport stdio 111-test-111-math-mcp-server uvx math-mcp \ --env FONT_PATH="path/to/font" \ --env OUTPUT_PATH="path/to/output"
How to use
This MCP server implements a Python-based suite of mathematical computation tools under the math-mcp package. It registers modules for basic math, linear algebra (matrix operations), statistics, calculus, optimization, regression, plotting, geometry, number theory, complex analysis, probability, and specialized areas like signal processing and financial mathematics. You can run the server using the UVX launcher (uvx math-mcp) or start the underlying Python script directly if you have the dependencies installed. Once running, you can invoke the registered tools through the MCP protocol to perform calculations, generate plots, or analyze data sets. The plotting module exposes visualization utilities, while the statistics and probability modules offer common statistical functions and distributions. The repository’s structure shows modular components (basic, matrix, calculus, optimization, etc.) that you can extend or customize as needed.
How to install
Prerequisites:
- Python 3.8+ (recommended 3.9+)
- Access to a terminal/command prompt
- Optional: pipx for installing and running uvx-based servers
Installation steps:
-
Install Python if not already installed.
- Download from https://www.python.org/ or use your OS package manager.
-
Install uvx (or ensure it is available in your environment).
- If using pipx: pipx install uvx
- Alternatively, ensure the uvx executable is on your PATH if you install via another method.
-
Install the math-mcp package (or clone the repository) and install dependencies.
- If you have the repository locally, navigate to it and (optionally) install in editable mode:
- cd path/to/math_mcp_repository
- python -m pip install -e .
- If you are using a packaged distribution, install it as you would install any Python package.
- If you have the repository locally, navigate to it and (optionally) install in editable mode:
-
Run the server using UVX or directly with Python:
- UVX method (recommended): uvx math-mcp
- Direct Python method (requires dependencies installed): python math_mcp/math_mcp_server.py
Notes:
- If you run directly, ensure all listed modules (basic, matrix, calculus, plotting, etc.) are importable and dependencies (e.g., plotting backends) are installed.
- You may need to configure OUTPUT_PATH and FONT_PATH if you enable theClaude Desktop integration described in the README.
Additional notes
Tips:
- The server exposes a suite of mathematical tools; refer to the module names (basic, matrix, calculus, optimization, plotting, geometry, number_theory, complex_analysis, probability, signal_processing, financial, graph_theory) when calling specific functions.
- If plotting utilities are used, ensure your environment has a valid display backend or use a headless backend (e.g., Matplotlib with Agg) for server deployments.
- Environment variables like OUTPUT_PATH and FONT_PATH are recommended for Claude Desktop integration. Adjust these paths to valid directories on your system.
- When upgrading, check for breaking changes in core modules (e.g., calculus or optimization) and verify compatibility with existing workflows.
- If you encounter import errors, verify that your Python path includes the math_mcp package and that dependencies are installed (install from repository as needed).
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP