Ntropy MCP 服务器用于丰富银行数据,借助它,处理财务数据的 LLM 代理能够轻松调用任意 Ntropy API 端点,为财务数据处理提供便利。
该服务器实现了一系列工具,用于与 Ntropy API 进行交互,具体如下:
api_key(字符串)作为参数,返回 API 密钥更新和验证的状态。id(字符串/整数)、type(字符串)和 name(字符串)作为参数,返回创建的账户持有人详细信息。id(字符串/整数)为必需,name(字符串,可选)和 type(字符串,可选)为可选参数,返回更新后的账户持有人详细信息。id(字符串/整数)、description(字符串)、date(字符串)、amount(浮点数)、entry_type(字符串)、currency(字符串)、account_holder_id(字符串/整数),country(字符串,可选)为可选参数,返回丰富后的交易数据。account_holder_id(字符串/整数)作为参数即可。account_holder_id(字符串/整数)为必需参数,limit(整数,可选,默认为 10)和 offset(整数,可选,默认为 0)为可选参数,返回交易列表。id(交易 ID,字符串/整数)、description(交易描述,字符串)、date(交易日期,字符串)、amount(交易金额,浮点数)、entry_type(入账类型,字符串)、currency(货币代码,字符串)、account_holder_id(账户持有人 ID,字符串/整数),返回丰富后的交易对象数组。使用 npm 进行安装,命令如下:
npm install @modelcontextprotocol/mcp-server
创建一个 MCP 服务器实例并设置 API 密钥:
const { MCPServer } = require('@modelcontextprotocol/mcp-server');
const server = new MCPServer({
apiKey: 'your_api_key_here',
});
server.listen(3000);
使用工具进行操作:
await server.createAccountHolder({
id: "1",
type: "personal",
name: "John Doe"
});
await server.updateAccountHolder({
id: "1",
name: "Jane Smith"
});
await server.enrichTransaction({
id: "tx123",
description: "Grocery Shopping",
date: "2024-01-01",
amount: -50.0,
entry_type: "debit",
currency: "USD",
account_holder_id: "1"
});
你可以使用 MCP 检查器来调试服务器。对于 npm 安装,使用以下命令:
npx @modelcontextprotocol/inspector MCPServer -p 3000
使用 Docker 进行构建,命令如下:
docker build -t ntropy-mcp .
欢迎提交拉取请求! 无论是新想法、错误修复还是功能增强,都非常欢迎大家贡献力量。
ntropy-mcp 采用 MIT 许可证。这意味着你可以自由使用、修改和分发软件,但需遵守 MIT 许可证的条款和条件。有关详细信息,请参阅项目仓库中的 LICENSE 文件。