Sarutahiko MCP 計算ツール
About
Sarutahiko MCP 計算ツール is a sample calculator implementation that uses the Model Context Protocol (MCP) to provide basic arithmetic operations. It is built with TypeScript and communicates via standard input/output (STDIO), making it suitable for integration with any…
Details
- Author
- lil-shimon
- Downloads
- 166
- Categories
- Other
Jump to
- Five arithmetic tools: add, subtract, multiply, divide, power.
- Division includes zero-division error handling.
- Communicates over STDIO (standard input/output).
- TypeScript implementation with build and run scripts.
- Includes a test client for verification.
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Sarutahiko MCP 計算ツールCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install dependencies with npm install, compile TypeScript with npm run build, then start the server with npm start. For testing, run node dist/calculator-client.js. To integrate with a custom MCP client, use the @modelcontextprotocol/sdk to connect via StdioClientTransport and call the available tools (add, subtract, multiply, divide, power).
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"sarutahiko mcp \u8a08\u7b97\u30c4\u30fc\u30eb": {
"Sarutahiko": {
"command": "node",
"args": [
"dist/calculator-client.js"
]
}
}
}
}
McpServers
{
"Sarutahiko": {
"command": "node",
"args": [
"dist/calculator-client.js"
]
}
}
Sarutahiko MCP 計算ツール
このプロジェクトは、Model Context Protocol (MCP) を使用した簡単な計算ツールのサンプル実装です。
機能
このMCPサーバーは以下の計算機能を提供します:
- 加算(add):2つの数値を足し算
- 減算(subtract):2つの数値を引き算
- 乗算(multiply):2つの数値を掛け算
- 除算(divide):2つの数値を割り算(ゼロ除算エラー処理あり)
- 累乗(power):基数を指数乗
インストール
依存関係をインストールします:
npm install
ビルド
TypeScriptをコンパイルします:
npm run build
実行
サーバーを起動します:
npm start
または、テストクライアントを使って機能をテストできます:
node dist/calculator-client.js
MCPサーバーの使い方
このサーバーは標準入出力(STDIO)経由で通信するため、他のMCPクライアントから次のように利用できます:
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
const transport = new StdioClientTransport({
command: "node",
args: ["dist/calculator-server.js"]
});
const client = new Client({
name: "your-client",
version: "1.0.0"
});
await client.connect(transport);
// 利用可能なツールを確認
const tools = await client.listTools();
console.log(tools);
// 加算ツールの呼び出し例
const result = await client.callTool({
name: "add",
arguments: {
a: 5,
b: 3
}
});
console.log(result);
カスタマイズ
新しい計算機能を追加するには、calculator-server.tsファイルに新しいツールを追加してください。
注意
このプロジェクトは完全に生成AI(Claude)によって作成されています。コードやドキュメントはAIによって自動生成されたものです。
ライセンス
ISC
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



