Skip to main content
Glama
Michaelndegwa1

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: 数値配列に対する基本演算(addsubtractmultiplydivide)。

  • scientific_calculation: 累乗、ルート(sqrtcbrt)、階乗、対数(logln)、三角関数(sincostan)。

  • convert_unit: 物理単位の変換(長さ、質量/重量、温度、体積、時間)。

  • financial_calculator: 単利、複利、ローンEMI計算、パーセンテージ。

  • calculate_statistics: 要約統計(meanmedianmodevariancestdevsummary)。


Related MCP server: MCP Mathematics

📦 インストールとセットアップ

  1. 依存関係のインストール:

    pip install -r requirements.txt
    pip install -e .
  2. 自動単体テストの実行:

    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 での使用方法:

  1. Claude Desktop を完全に終了して再起動します。

  2. チャットを開き、メッセージバーの右下にある 🔨(ハンマー/ツールアイコン) を探します。

  3. Claudeに次のように尋ねます: 「sqrt(144) + sin(pi / 2) はいくつ?」 または 「100 degC を degF に変換して」


🌐 2. Claude Web およびリモートWebクライアントへの接続(SSE HTTPモード)

Calculator MCP をWeb HTTPサービスとして実行するには(Webベースのプラットフォーム、Webコネクタ、リモートAIエージェント向け):

  1. SSE Webサーバーを起動:

    python -m calculator_mcp.server --transport sse --port 8000
  2. Webクライアントの設定:

    {
      "mcpServers": {
        "calculator-web": {
          "serverUrl": "http://localhost:8000/sse"
        }
      }
    }
  3. リモート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.server
F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    -
    quality
    D
    maintenance
    A 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.
    7
    ISC
  • A
    license
    C
    quality
    C
    maintenance
    A 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.
    18
    13
    MIT
  • F
    license
    -
    quality
    D
    maintenance
    A 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

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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