X

dw

Information

MCP 计算工具 一个提供高级数学和金融计算工具的模型上下文协议(MCP)服务器,用于与像 Cline 和 Roo Code 这样的 AI 代码助手集成。 概述 MCP 计算工具通过一个标准化接口暴露数学计算能力,AI 助手可以与其交互。这使得 AI 工具能够执行复杂的计算,而无需直接实现数学算法。 功能 数学工具 符号微积分 derivative: 计算表达式的符号导数 integral: 计算符号积分 limit: 评估变量接近指定值时的极限 solve: 解方程以求解特定变量 数值方法 riemann_sum: 使用多种方法(左、右、中点、梯形)通过黎曼和计算定积分 darboux_sum: 计算上达布和下达布和以近似积分 area: 计算两点之间的曲线下面积 volume: 计算绕 x 轴旋转的体积 数学变换 laplace_transform: 计算函数的拉普拉斯变换 fourier_transform: 计算函数的傅里叶变换 z_transform: 计算离散时间函数的 Z 变换 金融工具 compound_interest: 计算复利,可自定义复利周期 present_value: 计算未来现金流的现值 npv: 计算现金流系列的净现值 black_scholes: 使用 Black-Scholes 模型计算期权价格 option_greeks: 计算期权希腊字母(delta, gamma, vega, theta, rho) 实用函数 logarithm: 以任意底数计算对数 exponential: 计算指数函数 (e^x) 安装 # Clone the repository git clone https://github.com/yourusername/mcp-calc-tools.git # Navigate to project directory cd mcp-calc-tools # Install dependencies npm install # or pnpm install 使用 启动 MCP 服务器 # Make the script executable (if needed) chmod +x index.js # Run the server npm start # or node index.js 与 AI 助手集成 要将 MCP 计算工具与 AI 编码助手一起使用: 配置您的 AI 助手(Cline/Roo Code)以使用 MCP 服务器 将服务器 URL 设置为正在运行的实例 现在 AI 助手可以访问所有数学工具 示例请求计算导数: Calculate the derivative of x^2*sin(x) 要求 Node.js v14 或更高版本 所需包: genkit (^1.0.5) genkitx-mcp (^1.0.5) mathjs (^12.0.0) 开发 项目结构如下: index.js: 包含所有工具定义的主要服务器实现 package.json: 项目依赖项和脚本定义 许可证 [在此处添加您的许可证信息] 贡献 欢迎贡献!请随时提交 Pull Request。

Prompts

Reviews

Tags

Write Your Review

Detailed Ratings

ALL
Correctness
Helpfulness
Interesting
Upload Pictures and Videos

Name
Size
Type
Download
Last Modified
  • Community

Add Discussion

Upload Pictures and Videos