Calculator MCP Server
Calculator MCP Server (Python)
数学計算、科学関数、単位変換、財務指標、統計解析のための多機能 Model Context Protocol (MCP) サーバー。
Python 3.10+、公式 mcp SDK(FastMCP)、sympy で構築されています。stdio(Claude Desktop)と sse(Claude Web / リモートHTTPコネクタ)の両方のトランスポートモードに対応しています。
🚀 機能と公開ツール
evaluate_math_expression: SymPyを使用してカスタム数式を安全に評価します(例:2 * (3 + 4)、sqrt(144) + sin(pi / 2)、log(100, 10)、5^3)。perform_arithmetic: 数値配列に対する基本演算(add、subtract、multiply、divide)。scientific_calculation: 累乗、ルート(sqrt、cbrt)、階乗、対数(log、ln)、三角関数(sin、cos、tan)。convert_unit: 物理単位の変換(長さ、質量/重量、温度、体積、時間)。financial_calculator: 単利、複利、ローンEMI計算、パーセンテージ。calculate_statistics: 要約統計(mean、median、mode、variance、stdev、summary)。
Related MCP server: MCP Mathematics
📦 インストールとセットアップ
依存関係のインストール:
pip install -r requirements.txt pip install -e .自動単体テストの実行:
pytest
💻 1. Claude Desktop への接続(Stdioモード)
claude_desktop_config.json は次の場所に自動的に作成されました:
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"
}
}
}
}Claude Desktop での使用方法:
Claude Desktop を完全に終了して再起動します。
チャットを開き、メッセージバーの右下にある 🔨(ハンマー/ツールアイコン) を探します。
Claudeに次のように尋ねます: 「sqrt(144) + sin(pi / 2) はいくつ?」 または 「100 degC を degF に変換して」。
🌐 2. Claude Web およびリモートWebクライアントへの接続(SSE HTTPモード)
Calculator MCP をWeb HTTPサービスとして実行するには(Webベースのプラットフォーム、Webコネクタ、リモートAIエージェント向け):
SSE Webサーバーを起動:
python -m calculator_mcp.server --transport sse --port 8000Webクライアントの設定:
{ "mcpServers": { "calculator-web": { "serverUrl": "http://localhost:8000/sse" } } }リモートWebアプリ向けのパブリックトンネリング(オプション): Webクライアント(リモートの Claude Web など)がローカルネットワークの外部でホストされている場合は、
ngrokまたはlocaltunnelを使用してポート8000を公開します:npx localtunnel --port 8000 # Or using ngrok: ngrok http 8000次に、生成されたパブリックHTTPS URL:
https://<your-subdomain>.loca.lt/sseをWeb MCPコネクタ設定で使用します。
🔍 Webインターフェースによる対話型テスト(MCP Inspector)
公式の Model Context Protocol インタラクティブ Web Inspector UI を起動して、ブラウザですべてのツールを視覚的にテストできます:
mcp dev calculator_mcp/server.pyまたは 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