Skip to main content
Glama
souravjai

Calculator MCP Server

by souravjai

Calculator MCP Server

stdio 経由で基本的な電卓操作を提供する、小さな Model Context Protocol (MCP) サーバーです。

Calculator MCP server tutorial

機能

このサーバーは以下のツールを提供します:

ツール

説明

引数

add

2つの数値を加算します

op1, op2

sub

最初の数値から2番目の数値を減算します

op1, op2

mul

2つの数値を乗算します

op1, op2

div

最初の数値を2番目の数値で除算します

op1, op2

すべての引数は数値でなければなりません。divop20 のときエラーを返します。

Related MCP server: Math MCP Server

要件

  • Node.js 18 以降

  • npm

セットアップ

このディレクトリで依存関係をインストールします:

npm install

サーバーを実行する

stdio 経由で MCP サーバーを起動します:

npm start

サーバーは MCP クライアントの接続を待機するため、通常のアプリケーション出力をターミナルに表示しません。

サンプルクライアントでテストする

サンプルクライアントはサーバーを起動してツールを一覧表示し、ゼロ除算エラーを示すために div100 で呼び出します:

npm run test-client

成功する操作をテストするには、mcp-client-test.tscallTool 引数を更新します。例:

arguments: { op1: 10, op2: 2 },

MCP Inspector を使用する

次のコマンドでインタラクティブな MCP Inspector を実行します:

npm run mcp-inspect

コマンドが出力した URL を開き、電卓ツールを選択して op1op2 に値を入力してください。

プロジェクトファイル

  • mcp-server.ts - MCP サーバーと電卓ツールの定義

  • mcp-client-test.ts - サンプル MCP クライアント

  • mcp-calculator.gif - チュートリアルのウォークスルー

  • package.json - スクリプトと依存関係

A
license - permissive license
Not graded
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
    A
    quality
    C
    maintenance
    Enables basic arithmetic operations (addition, subtraction, multiplication, division) with 64-bit precision and matrix multiplication capabilities. Provides mathematical computation tools for AI assistants through the Model Context Protocol.
    5
    1
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    Provides basic mathematical operations including addition, subtraction, multiplication, division, and power calculations through a Model Context Protocol interface.
    5
    1
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides file reading and mathematical calculation tools through the Model Context Protocol. Enables reading file contents and evaluating mathematical expressions via stdio transport.

View all related MCP servers

Related MCP Connectors

  • Precision math engine for AI agents. 203 exact methods. Zero hallucination.

  • A Model Context Protocol server for Wix AI tools

  • AI-callable calculators and engineering models with real formulas. No hallucinated math.

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/souravjai/calculator-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server