furoku/calculator-mcp
If you are the rightful owner of calculator-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Calculator MCP Server is a creative storytelling tool that performs arithmetic calculations and transforms them into imaginative prompts using the Model Context Protocol (MCP).
Calculator MCP Server
Template notice: This repository is being prepared as a starter template for MCP servers. To create a new server:
- Copy / use as GitHub Template
- Edit
package.json
(name, description, bin)- Replace the
calculator
tool with your own implementation- Start versioning from
0.1.0
in the new repository- Update README(s) & remove this banner
See
README.template.md
for a placeholder-driven variant.
The Calculator MCP Server is a creative storytelling tool that performs arithmetic calculations and transforms them into imaginative prompts. Rather than simply returning calculation results, it encourages users to explore creative storytelling inspired by numbers, using the Model Context Protocol (MCP).
Installation
Prerequisites
- Node.js 18+
Published Package
This MCP server is available as a published npm package: calculator-mcp
- No need to clone the repository locally
- Can be run directly via
npx calculator-mcp@latest
- See setup instructions below for Claude Code
Build locally
cd /path/to/calculator-mcp
npm i
npm run build
Setup: Claude Code (CLI)
Use this one-line command:
claude mcp add Calculator-MCP -s user -- npx calculator-mcp@latest
To remove the server from Claude Code:
claude mcp remove Calculator-MCP
Other Clients and Agents
VS Code
Add via CLI:
code --add-mcp '{"name":"Calculator-MCP","command":"npx","args":["calculator-mcp@latest"]}'
Available Tools
- calculator
- inputs:
- a: number (1つ目の数値)
- b: number (2つ目の数値)
- operator: string (演算子: 'add', 'subtract', 'multiply', 'divide')
- outputs: Creative storytelling prompts based on calculation results when AI sampling is enabled. When sampling is disabled, returns only the calculation formula and result (e.g., "計算式: 1 + 1 = 2").
- inputs:
Example invocation (MCP tool call)
{
"name": "calculator",
"arguments": {
"a": 14,
"b": 98,
"operator": "add"
}
}
Example Output (with AI Sampling enabled):
計算式: 14 + 98 = 112
この計算結果から、とても興味深いストーリーを想像できそうですね。例えば:
- 14人のチームが98人の新メンバーと合流して、112人の大きなプロジェクトチームになる話
- 14個のアイデアと98個のひらめきが組み合わさって、112通りの創造的な解決策を生み出す物語
このストーリーを以下のどの形で展開したいですか?
1. 文章 - 詳細な物語として書き上げる
2. 画像 - ビジュアルで表現する
3. 動画 - 動きのある映像作品として構想する
Example Output (without AI Sampling):
計算式: 14 + 98 = 112
Troubleshooting
- Ensure Node 18+
- For npx usage:
npx calculator-mcp@latest
should work without local build - For local development: use absolute path to
build/index.js
References
License
MIT License. See LICENSE
file.