cal
用于计算数学表达式的MCP
claude mcp add --transport stdio pwh-pwh-cal-mcp node index.ts \ --env BUN_RUNTIME=" Bun runtime is recommended; placeholder if not using Bun (required for actual deployment)"
How to use
Cal MCP is a lightweight mathematical expression calculator built on the FastMCP framework. It exposes a single tool named cal that accepts a string expression and returns the computed result. The server leverages the expr-eval library to parse and evaluate expressions and provides built-in constants such as E, PI, true, and false. You interact with the server via standard input/output (stdio), sending an expression like 'PI * 2' and receiving the computed value as a string in response. This makes Cal suitable for quick arithmetic tasks, embedding in pipelines, or as a simple evaluation service within larger MCP handlers.
How to install
Prerequisites:
- A runtime environment capable of executing the server (the project is described to run with Bun, but the MCP entry in this document uses a Node-based invocation as a placeholder).
- Git installed to clone the repository if you have access to the source.
Step-by-step installation:
- Clone the repository (replace <repo-url> with the actual URL): git clone <repo-url>
- Install dependencies (example using Bun; replace with your preferred runtime if Bun is not available): bun install
- Start the server (using Bun as described in the project): bun run index.ts
If you must use Node directly, ensure you transpile TS to JS or adjust to a TS runner that can execute index.ts in your environment.
Additional notes
Notes and tips:
- The server uses stdio for input/output; ensure you connect to the process's stdin/stdout when integrating with other MCP components.
- Built-in constants: E (Math.E), PI (Math.PI), true, false.
- The project relies on FastMCP, expr-eval, and zod for parameter validation; verify versions in your environment if you fork or modify the code.
- If you encounter expression parsing errors, confirm the expression is syntactically valid and uses supported constants (PI, E) or built-in logical literals (true, false).
- When deploying outside Bun, ensure the runtime can execute TypeScript directly or compile to JavaScript beforehand.
Related MCP Servers
obsidian -tools
Add Obsidian integrations like semantic search and custom Templater prompts to Claude or any MCP client.
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
mcp -arangodb
This is a TypeScript-based MCP server that provides database interaction capabilities through ArangoDB. It implements core database operations and allows seamless integration with ArangoDB through MCP tools. You can use it wih Claude app and also extension for VSCode that works with mcp like Cline!
CodeRAG
Advanced graph-based code analysis for AI-assisted software development
mcp-bundler
Is the MCP configuration too complicated? You can easily share your own simplified setup!