MCP Calc Tools
一个服务器,为 AI 代码助手提供高级数学和金融计算能力,使其无需直接实现算法即可执行复杂的计算,例如符号微积分、数值方法和金融分析。
Tools
derivative
Calculate the derivative of a mathematical expression
integral
Calculate the indefinite integral of a mathematical expression
riemann_sum
Calculate the Riemann sum of a function using different methods
area
Calculate the area under a curve between two points
volume
Calculate the volume of revolution around x-axis
logarithm
Calculate logarithm with any base
exponential
Calculate exponential function (e^x)
compound_interest
Calculate compound interest
present_value
Calculate present value of future cash flows
npv
Calculate Net Present Value of cash flows
darboux_sum
Calculate the Darboux sum of a function
limit
Calculate the limit of a function as it approaches a value
solve
Solve an equation for a variable
laplace_transform
Calculate the Laplace transform of a function
fourier_transform
Calculate the Fourier transform of a function
z_transform
Calculate the Z-transform of a function
black_scholes
Calculate Black-Scholes option price
option_greeks
Calculate the Greeks for a Black-Scholes option
README
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)
安装
# 克隆仓库
git clone https://github.com/yourusername/mcp-calc-tools.git
# 导航到项目目录
cd mcp-calc-tools
# 安装依赖
npm install
# 或
pnpm install
用法
启动 MCP 服务器
# 使脚本可执行(如果需要)
chmod +x index.js
# 运行服务器
npm start
# 或
node index.js
与 AI 助手集成
要将 MCP 计算工具与 AI 编码助手一起使用:
- 配置您的 AI 助手 (Cline/Roo Code) 以使用 MCP 服务器
- 将服务器 URL 设置为您的运行实例
- AI 助手现在将可以访问所有数学工具
计算导数的示例请求:
计算 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。
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。