Calculator MCP Server
Calculator MCP Server (Python)
Ein funktionsreicher Model Context Protocol (MCP)-Server für mathematische Berechnungen, wissenschaftliche Funktionen, Einheitenumrechnungen, Finanzkennzahlen und statistische Analysen.
Erstellt mit Python 3.10+, dem offiziellen mcp SDK (FastMCP) und sympy. Unterstützt sowohl stdio (Claude Desktop) als auch sse (Claude Web / Remote-HTTP-Connectors) als Übertragungsmodi.
🚀 Funktionen & bereitgestellte Tools
evaluate_math_expression: Wertet benutzerdefinierte mathematische Ausdrücke sicher mit SymPy aus (z. B.2 * (3 + 4),sqrt(144) + sin(pi / 2),log(100, 10),5^3).perform_arithmetic: Grundrechenarten (add,subtract,multiply,divide) auf Zahlenarrays.scientific_calculation: Potenzen, Wurzeln (sqrt,cbrt), Fakultäten, Logarithmen (log,ln) und trigonometrische Funktionen (sin,cos,tan).convert_unit: Umrechnung physikalischer Einheiten (Länge, Masse/Gewicht, Temperatur, Volumen, Zeit).financial_calculator: Einfache Zinsen, Zinseszins, Darlehens-EMI-Berechnungen und Prozentsätze.calculate_statistics: Zusammenfassende Statistiken (mean,median,mode,variance,stdev,summary).
Related MCP server: MCP Mathematics
📦 Installation & Einrichtung
Abhängigkeiten installieren:
pip install -r requirements.txt pip install -e .Automatisierte Unit-Tests ausführen:
pytest
💻 1. Verbinden mit Claude Desktop (Stdio-Modus)
Ihre claude_desktop_config.json wurde automatisch erstellt unter:
C:\Users\ADMIN\AppData\Roaming\Claude\claude_desktop_config.json
{
"mcpServers": {
"calculator": {
"command": "C:\\Users\\ADMIN\\AppData\\Local\\Programs\\Python\\Python312\\python.exe",
"args": [
"-m",
"calculator_mcp.server"
],
"env": {
"PYTHONPATH": "E:/mcp tutorials"
}
}
}
}Verwendung in Claude Desktop:
Claude Desktop vollständig beenden und neu starten.
Öffnen Sie einen Chat und suchen Sie nach dem 🔨 (Hammer/Werkzeuge-Symbol) unten rechts in der Nachrichtenleiste.
Fragen Sie Claude: "Was ist sqrt(144) + sin(pi / 2)?" oder "Rechne 100 degC in degF um".
🌐 2. Verbinden mit Claude Web & Remote-Web-Clients (SSE-HTTP-Modus)
Um den Calculator MCP als Web-HTTP-Dienst auszuführen (für webbasierte Plattformen, Web-Connectors oder Remote-KI-Agenten):
SSE-Webserver starten:
python -m calculator_mcp.server --transport sse --port 8000Web-Client-Konfiguration:
{ "mcpServers": { "calculator-web": { "serverUrl": "http://localhost:8000/sse" } } }Öffentliches Tunneling für Remote-Web-Apps (optional): Wenn Ihr Web-Client (z. B. ein entferntes Claude Web) außerhalb Ihres lokalen Netzwerks gehostet wird, machen Sie Port 8000 mit
ngrokoderlocaltunnelöffentlich zugänglich:npx localtunnel --port 8000 # Or using ngrok: ngrok http 8000Verwenden Sie dann die generierte öffentliche HTTPS-URL:
https://<your-subdomain>.loca.lt/ssein Ihrer Web-MCP-Connector-Konfiguration.
🔍 Interaktives Testen über die Webschnittstelle (MCP Inspector)
Sie können die offizielle interaktive Web-Inspector-UI des Model Context Protocol starten, um alle Tools visuell in Ihrem Browser zu testen:
mcp dev calculator_mcp/server.pyOder über Node:
npx @modelcontextprotocol/inspector@0.4.1 python -m calculator_mcp.serverThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA comprehensive MCP server that enables file operations, mathematical calculations with unit conversions, and system information retrieval. Provides secure access to local file system, calculator functions with statistics, and system monitoring capabilities.7ISC
- AlicenseCqualityCmaintenanceA comprehensive MCP server that turns any AI assistant into a powerful mathematical computation engine, providing 52 advanced functions, 158 unit conversions, financial calculations, and secure AST-based evaluation.1813MIT
- AlicenseAqualityDmaintenanceA symbolic mathematics MCP server supporting calculus, linear algebra, number theory, statistics, and unit conversion via natural language.8MIT
- Flicense-qualityDmaintenanceA comprehensive MCP server providing basic and advanced math operations (addition, subtraction, statistics, etc.) as well as smart prompts for multiplication tables, equation solving, financial calculations, geometry, unit conversion, loan amortization, probability, and fitness analytics.1
Related MCP Connectors
This MCP server enables users to perform scientific computations regarding linear algebra and vect…
Educational MCP server with 17 math/stats tools, visualizations, and persistent workspace
Hosted MCP server for business-day math, deadline planning, meeting overlap, and SLA calculations.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Michaelndegwa1/mcp-tutorials'
If you have feedback or need assistance with the MCP directory API, please join our Discord server