Math MCP Server
Overview
This is an MCP (Model Context Protocol) server that can do basic arithmetic in 64 bit precision, along with matrix multiplication.
Features
- Addition
- Subtraction
- Multiplication
- Division
- Matrix multiplication
Installation
Prerequisities
Ensure you have the following installed:
- Python 3.13+
- uv
Installing UV
See installation guide for all options.
Unix/MacOS
or
Windows
Clone the Repository
Integration with Clients
Claude Code
fastmcp install claude-code src/math_server.py
Claude Desktop
fastmcp install claude-desktop src/math_server.py
Cursor
fastmcp install cursor src/math_server.py
VS Code
Add the following .vscode/mcp.json and use your actual path.
Contributing
- Fork the repository
- Create a new branch:
- Make changes and commit (remember to add unit tests in test/ directory)
- Push to your fork git push origin add-feature
- Open a pull request.
Project Structure
Architecture
This MCP server uses Fast MCP 2.0, which provides many more features than Fast MCP 1.0, which is what the official Python SDK for MCP uses.
Also, the unit tests are written with Pytest, which is what Fast MCP 2.0 recommends.
Lastly, if you don't know, uv is a much faster version of pip that also provides a lockfile for project dependencies (this will be familiar if you've used npm or cargo before). The MCP Python SDK itself uses uv, and I use it for all new Python projects, because it's 10-100x faster than pip, and the lockfile makes dependency version management much simpler.
Enables basic arithmetic operations (addition, subtraction, multiplication, division) with 64-bit precision and matrix multiplication capabilities. Provides mathematical computation tools for AI assistants through the Model Context Protocol.
Related MCP Servers
- AsecurityFlicenseAqualityA server that provides tools for performing basic arithmetic operations (addition, subtraction, multiplication, division) via the Model Context Protocol.Last updated -4JavaScript
- AsecurityFlicenseAqualityA simple server that provides basic arithmetic operations (addition, subtraction, multiplication, division) as tools that can be called by Large Language Models through the Model Context Protocol.Last updated -4JavaScript
- AsecurityFlicenseAqualityA simple Model Context Protocol server that provides basic arithmetic operations (addition, subtraction, multiplication, division) as tools that can be called by Large Language Models.Last updated -4JavaScript
- -securityFlicense-qualityProvides basic arithmetic operations and advanced mathematical functions through the Model Context Protocol (MCP), with features like calculation history tracking and expression evaluation.Last updated -Python