Cal Server 是一个基于 FastMCP 框架构建的简单数学表达式计算服务,使用 Bun 运行时环境。它利用 expr-eval 库解析和计算用户输入的数学表达式,并通过标准输入输出(stdio)与外界交互。该项目旨在提供一个轻量、高效的计算工具,支持基本数学运算和内置常量。 - 表达式计算:支持用户输入数学表达式并返回计算结果。 - E:Bun 环境中的 Math.E。 - PI:Bun 环境中的 Math.PI。 - true:逻辑真值。 - false:逻辑假值。 - 工具名称:cal。 - 参数:接受一个字符串类型的数学表达式(exp)。 - fastmcp:用于构建 MCP 服务。 - expr-eval:用于解析和计算数学表达式。 - zod:用于参数验证。 - 确保已安装 Bun 运行时(推荐最新版本)。 To install cal-mcp for Claude D
Add this skill
npx mdskills install pwh-pwh/cal-mcpLightweight math expression calculator with clear documentation and multiple installation options
1# Cal Server2[](https://archestra.ai/mcp-catalog/pwh-pwh__cal-mcp)3[](https://smithery.ai/server/@pwh-pwh/cal-mcp)45<a href="https://glama.ai/mcp/servers/@pwh-pwh/cal-mcp">6 <img width="380" height="200" src="https://glama.ai/mcp/servers/@pwh-pwh/cal-mcp/badge" alt="Cal Server MCP server" />7</a>89## 项目简介1011`Cal Server` 是一个基于 `FastMCP` 框架构建的简单数学表达式计算服务,使用 Bun 运行时环境。它利用 `expr-eval` 库解析和计算用户输入的数学表达式,并通过标准输入输出(stdio)与外界交互。该项目旨在提供一个轻量、高效的计算工具,支持基本数学运算和内置常量。1213## 功能1415- **表达式计算**:支持用户输入数学表达式并返回计算结果。16- **内置常量**:17 - `E`:Bun 环境中的 `Math.E`。18 - `PI`:Bun 环境中的 `Math.PI`。19 - `true`:逻辑真值。20 - `false`:逻辑假值。21- **工具名称**:`cal`。22- **参数**:接受一个字符串类型的数学表达式(`exp`)。2324## 依赖2526- `fastmcp`:用于构建 MCP 服务。27- `expr-eval`:用于解析和计算数学表达式。28- `zod`:用于参数验证。2930## 前置条件3132- 确保已安装 [Bun](https://bun.sh/) 运行时(推荐最新版本)。3334## 安装35### Installing via Smithery3637To install cal-mcp for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@pwh-pwh/cal-mcp):3839```bash40npx -y @smithery/cli install @pwh-pwh/cal-mcp --client claude41```4243### mcp客户端配置44```json45"cal-mcp": {46 "name": "计算",47 "description": "",48 "isActive": true,49 "command": "bunx",50 "args": [51 "cal-mcp"52 ]53 }54```5556### Manual Installation571. 克隆项目仓库:58 ```bash59 git clone <仓库地址>60 ```612. 进入项目目录并安装依赖:62 ```bash63 bun install64 ```6566## 使用方法67681. 启动服务:69 ```bash70 bun run index.ts71 ```72 服务将通过标准输入输出(stdio)运行。73742. 输入数学表达式:75 - 示例输入:`2 + 3 * PI`76 - 输出:计算结果(字符串形式)。77783. 支持的表达式示例:79 - 基本运算:`2 + 2` → `4`80 - 使用常量:`PI * 2` → `6.283185307179586`81 - 复杂表达式:`E ^ 2 + 1` → `8.38905609893065`8283## 注意事项8485- 输入的表达式必须是有效的数学表达式,否则可能抛出错误。86- 服务当前仅支持通过 `stdio` 交互。87- 项目使用 Bun 运行时,确保命令与 Bun 兼容。
Full transparency — inspect the skill content before installing.