Calculator MCP

by wrtnlabs
Verified

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Integrations

  • Enables GitHub Copilot agents in VS Code to use calculator functionality for basic mathematical operations including addition, subtraction, multiplication, division, modulo, and square root.

MCPを計算する

基本的な計算機機能を利用したブラウザ自動化機能を提供するモデルコンテキストプロトコル(MCP)サーバー。このサーバーにより、LLMと計算機の連携が可能になります。(実際にはテストプログラム用に作成しました)

ユースケース

  • MCP 機能を接続するためのテスト コード。
  • おもちゃプロジェクト

設定例

{ "mcpServers": { "calculate": { "command": "npx", "args": [ "-y", "@wrtnlabs/calculator@latest" ] } } }

VS Codeでのインストール

あるいは、VS Code CLI を使用して Playwright MCP サーバーをインストールすることもできます。

# For VS Code code --add-mcp '{"name":"calculator","command":"npx","args":["-y", "@wrtnlabs/calculator-mcp@latest"]}'
# For VS Code Insiders code-insiders --add-mcp '{"name":"calculator","command":"npx","args":["-y", "@wrtnlabs/calculator-mcp@latest"]}'

インストール後、Calculator MCP サーバーは VS Code 内の GitHub Copilot エージェントで使用できるようになります。

CLIオプション

Calculator MCP サーバーは、次のコマンドライン オプションをサポートしています。

  • --port <port> : SSEトランスポートをリッスンするポート

Linux で DISPLAY なしのブラウザを実行する

ディスプレイのないシステム上または IDE のワーカー プロセスからヘッダー付きブラウザーを実行する場合は、DISPLAY のある環境から MCP サーバーを実行し、 --portフラグを渡して SSE トランスポートを有効にします。

npx @wrtnlabs/calculator-mcp@latest --port 8931

次に、MCP クライアント構成で、SSE エンドポイントへのurlを設定します。

{ "mcpServers": { "calculator": { "url": "http://localhost:8931/sse" } } }

カスタムトランスポートを使用したプログラムによる使用

import { createServer } from "@wrtnlabs/calculator-mcp"; // ... const server = createServer({ name: "calculator", version: "1.0.0" }); transport = new SSEServerTransport("/messages", res); server.connect(transport);

ツール

  • 追加
  • サブ
  • マル
  • 分割
  • モッド
  • 平方

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

LLM に基本的な計算機能を提供し、加算、減算、乗算、除算、モジュロ、平方根などの数学演算を実行できるようにするモデル コンテキスト プロトコル サーバー。

  1. Use Cases
    1. Example config
      1. Installation in VS Code
    2. CLI Options
      1. Running headed browser on Linux w/o DISPLAY
        1. Programmatic usage with custom transports
          1. Tools
            ID: or17qswqzb