About FastMCP Maths Servers
FastMCP Maths Servers is an MCP server in the Science category: maths tools using multiple FastMCP servers.
Install
git clone https://github.com/latesh-munde/FastMCP-Maths-ServersThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about FastMCP Maths Servers
Powered by Claude · Grounded in docs
Security checks
- ✓README presentThe repository ships documentation.
5 checks have not been run yet.
README
🚀 FastMCP Math Server
A modular and extensible Model Context Protocol (MCP) server built using FastMCP in Python. This project goes beyond basic arithmetic and provides a structured mathematical toolkit including algebra, statistics, number theory, and linear algebra.
📌 Project Overview
Project Name: fastmcp_server
This project implements an MCP server exposing multiple math-focused tool groups:
🔢 Core Capabilities
-
Calculator
- add, subtract, multiply, divide
-
Equations
- linear solver
- quadratic solver
- system of equations (2 variables)
- Gaussian elimination (NxN)
-
Number Theory
- gcd, lcm
- prime check
- prime factorization
-
Statistics
- mean, median
- variance
- standard deviation
🧠 Architecture
+---------------------------+
| VS Code Copilot (Client) |
+------------+-------------+
|
| MCP (HTTP + SSE)
|
+------------v----------------------+
| FastMCP Server (Python) |
|----------------------------------|
| calculator tools |
| equations solvers |
| number theory utilities |
| statistics functions |
+----------------------------------+
🛠️ Tech Stack
- Python
- FastMCP
- Model Context Protocol (MCP)
- VS Code Copilot (Client)
📂 Project Structure
fastmcp_server/
│
├── .venv/ # Virtual environment
├── .vscode/
│ └── mcp.json # MCP configuration for VS Code
│
├── server_calculator.py # Basic arithmetic tools
├── server_equations.py # Linear, quadratic, system solvers
├── server_numberTheory.py # GCD, LCM, primes, factorization
├── server_statistics.py # Mean, median, variance, std dev
│
├── requirements.txt # Dependencies
├── README.md # Documentation
⚙️ Setup Instructions
1️⃣ Create Virtual Environment (Recommended)
python -m venv .venv
source .venv/bin/activate # Linux/Mac
.venv\Scripts\activate # Windows
2️⃣ Install Dependencies
pip install -r requirements.txt
Or manually:
pip install fastmcp
3️⃣ Configure MCP in VS Code
Create:
.vscode/mcp.json
{
"servers": {
"mcpCalculator": {
"type": "http",
"url": "http://localhost:3000/mcp"
},
"mcpNumberTheory": {
"type": "http",
"url": "http://localhost:3001/mcp"
},
"mcpEquations": {
"type": "http",
"url": "http://localhost:3002/mcp"
},
"mcpStatistics": {
"type": "http",
"url": "http://localhost:9000/mcp"
}
}
}
▶️ Running the Servers
Run each server (First try to run 1/2 servers)
python server_calculator.py
python server_equations.py
python server_statistics.py
python server_numberTheory.py
Servers runs at:
http://localhost:3000/mcp
http://localhost:3001/mcp
http://localhost:3002/mcp
http://localhost:9000/mcp
🔌 Connecting to VS Code Copilot
- Open VS Code
- Ensure Copilot is enabled
- Open Command Palette:
> MCP: List Servers
- Select:
mcpCalculator
mcpNumberTheory
mcpEquations
mcpStatistics
🔌 Connecting to VS Code Copilot (Easy Way For connection)
- Go in mcp.json
- Above each server there are multiple buttons (Start, Stop, Restart)
- You can connect servers from here
- Start to chat in Copilot window (ctrl + Alt + B)
💬 Example Prompts
🔢 Calculator
Add 10 and 20
Divide 100 by 5
📐 Equations
Solve 2x + 3y = 13 and x - y = 1
Solve quadratic equation 2x^2 + 5x + 3 = 0
🔬 Number Theory
Find gcd of 48 and 18
Check if 29 is prime
Prime factors of 84
📊 Statistics
Mean of [1,2,3,4,5]
Variance of [10,20,30]
Standard deviation of dataset
⚠️ Important Notes
- MCP is not REST
- It Uses:
- JSON-RPC
- Server-Sent Events (SSE)
Expected behavior:
- Accessing
/in browser →404 Not Found(expected) - Accessing
/mcpin browser →406 Not Acceptable(expected)
✔ This is normal
Use only MCP-compatible clients.
🚀 Future Enhancements
- NxN matrix operations (determinant, inverse)
- LU / QR decomposition
- Symbolic math support
- Graph plotting tools
- Financial/statistical models
- Streaming statistics (real-time data)
🙌 Acknowledgements
- FastMCP
- Model Context Protocol (MCP)
- VS Code Copilot
🛠️ Tech Stack
- Python
- FastMCP
- MCP (Model Context Protocol)
- VS Code Copilot (Client)
📜 License
MIT License
README copy captured when this server was indexed; it may lag the repository. The original is authoritative.