Get the FREE Ultimate OpenClaw Setup Guide β†’

fermat

πŸš€ Fermat MCP: The Ultimate Math Engine - Unifying SymPy, NumPy & Matplotlib in one powerful server! Perfect for devs & researchers.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio abhiphile-fermat-mcp uv --directory /path/to/fermat-mcp run server.py

How to use

Fermat MCP is a FastMCP server for mathematical computations, offering numerical and symbolic calculation capabilities along with plotting utilities. It integrates modules for NumPy operations (numpy_mcp), SymPy-based symbolic math (sympy_mcp), and a plotting interface via the mpl_mcp module, enabling users to perform tasks such as linear algebra, statistics, calculus, and data visualization through MCP clients. Typical workflows involve sending evaluation requests to the server for numerical results (e.g., eigenvalues, matrix operations) or symbolic expressions (simplification, solving equations), and generating plots like bar charts, scatter plots, and equation visuals as part of analysis pipelines. You can connect to Fermat MCP using common MCP clients (e.g., Gemini CLI, Claude Anthropic client, or Smithery) by pointing at the configured uv server and the run script.

To use the available tools, you can access the numpy_mcp operations for basic math, trigonometry, statistics, linear algebra, and array manipulation; the sympy_mcp operations for algebra, calculus, and equation solving; and the mpl_mcp plotting functions to visualize results. For example, you can request eigenvalues and eigenvectors of a matrix using numpy_mcp, simplify or factor expressions with sympy_mcp, and generate plots such as charts and scatter plots with mpl_mcp. Ensure your MCP client is configured with the correct server address and entry point (server.py via uv in this setup) to receive results and visualizations.

How to install

Prerequisites:

  • Python 3.12 or higher
  • uv (uv tool for running Python MCP servers)
  • Git (for cloning the repository) or Smithery for one-click installation

Install steps:

  1. Clone the Fermat MCP repository git clone https://github.com/abhiphile/fermat-mcp

  2. Install uv (if not already installed) pip install uv

  3. Install Smithery (optional, for automated setup) npm i -g @smithery/cli

  4. Run the server locally (example using uv as in the readme) uv --directory /path/to/fermat-mcp run server.py

  5. Alternative: Install via Smithery (client gemini) npx -y @smithery/cli install @abhiphile/fermat-mcp --client gemini

  6. Verify installation by connecting a MCP clientconfigured to the fmcp server with a command like: mcp contact fmcp --endpoint <server-address> --test

Additional notes

Notes and tips:

  • The Fermat MCP includes modules for numpy_mcp, sympy_mcp, and mpl_mcp. Be explicit in your MCP client requests to target the desired module (e.g., numpy_mcp for array operations, sympy_mcp for symbolic math).
  • Use Python 3.12+ to ensure compatibility with uv and the project dependencies.
  • The configuration path in the uv command should point to your local fermat-mcp directory where server.py resides; update /path/to/fermat-mcp accordingly.
  • If you encounter issues starting the server, ensure that dependencies for each MCP module are installed (e.g., numpy, sympy, matplotlib) in the Python environment used by server.py.
  • When using plotting capabilities (mpl_mcp), ensure a suitable backend is available in your environment, especially if running headless or on servers without a display.
  • If you prefer a different runner (e.g., Docker or npx-based installation), adapt the mcp_config accordingly using the documented formats in the MCP ecosystem.

Related MCP Servers

Sponsor this space

Reach thousands of developers β†—