Skip to main content
Glama
wrtnlabs

Calculator MCP

by wrtnlabs

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";
// ... other import statement

const client = new Client({
  name: "test client",
  version: "0.1.0",
});

const server = createServer({
  name: "calculator",
  version: "1.0.0"
});

const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();

await Promise.all([
  client.connect(clientTransport),
  server.connect(serverTransport),
]);

ツール

  • 追加

  • サブ

  • マル

  • 分割

  • モッド

  • 平方

Install Server
A
license - permissive license
B
quality
C
maintenance

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

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

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