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: 숫자 배열에 대한 기본 산술 연산(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

📦 설치 및 설정

  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 및 원격 웹 클라이언트 연결 (SSE HTTP 모드)

Calculator MCP를 웹 HTTP 서비스로 실행하려면(웹 기반 플랫폼, 웹 커넥터, 원격 AI 에이전트용):

  1. SSE 웹 서버 시작:

    python -m calculator_mcp.server --transport sse --port 8000
  2. 웹 클라이언트 구성:

    {
      "mcpServers": {
        "calculator-web": {
          "serverUrl": "http://localhost:8000/sse"
        }
      }
    }
  3. 원격 웹 앱용 공용 터널링 (선택 사항): 웹 클라이언트(예: 원격 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 커넥터 구성에 사용하세요.


🔍 웹 인터페이스를 통한 대화형 테스트 (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