MCP Calc Tools

MCP Calc Tools

一个服务器,为 AI 代码助手提供高级数学和金融计算能力,使其无需直接实现算法即可执行复杂的计算,例如符号微积分、数值方法和金融分析。

Category
访问服务器

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 编码助手一起使用:

  1. 配置您的 AI 助手 (Cline/Roo Code) 以使用 MCP 服务器
  2. 将服务器 URL 设置为您的运行实例
  3. 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

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选