Ntropy MCP服务器
MCP服务器,用于使用Ntropy API丰富银行数据。这允许使用财务数据的LLM代理轻松调用任何Ntropy API端点。
组件
工具
服务器实现以下工具以与Ntropy API交互:
- check_connection:验证与Ntropy API的连接
- 返回:连接状态信息
- set_api_key:在运行时设置或更新Ntropy API密钥
- 参数: api_key (字符串) - 返回:API密钥更新和验证的状态
- create_account_holder:创建帐户持有人
- 参数: id (字符串/int), type (字符串), name (字符串) - 返回:创建的账户持有人详细信息
- update_account_holder:更新现有帐户持有人
- 参数: id (字符串/int), name (字符串,可选), type (字符串,可选) - 返回:更新的账户持有人详细信息
- 富集交易:丰富银行交易
- 参数: id (字符串/int), description (字符串), date (字符串), amount (浮动), entry_type (字符串), currency (字符串), account_holder_id (字符串/int), country (字符串,可选) - 返回:丰富的交易数据
- get_count_holder:获取账户持有人的详细信息
- 参数: account_holder_id (字符串/int) - 退货:账户持有人详细信息
- list_交易:列出账户持有人的交易记录
- 参数: account_holder_id (字符串/int), limit (int,默认值=10), offset (int,默认值=0) - 返回:交易列表
- get_transaction:获取特定交易的详细信息
- 参数: transaction_id (字符串/int) - 返回:交易详情
- 大宗交易:同时丰富多个交易
- 参数: transactions (交易对象列表) - 返回:丰富交易列表
- delete_account_holder:删除账户持有人和所有相关数据
- 参数: account_holder_id (字符串/int) - 返回:删除状态
- 删除交易:删除特定交易
- 参数: transaction_id (字符串/int) - 返回:删除状态
快速启动
安装
首先,通过在上创建帐户来获取您的Ntropy API密钥 ntropy.com.确保更换 YOUR_NTROPY_API_KEY 下面是您的实际API密钥。
使用uvx运行服务器
uvx ntropy-mcp --api-key YOUR_NTROPY_API_KEY克劳德桌面
Claude Desktop配置文件通常位于:
在MacOS上: ~/Library/Application\ Support/Claude/claude_desktop_config.json
在Windows上: %APPDATA%/Claude/claude_desktop_config.json
如果使用uvx,请将以下内容添加到配置文件中:
"mcpServers": {
"ntropy-mcp": {
"command": "uvx",
"args": [
"ntropy-mcp",
"--api-key",
"YOUR_NTROPY_API_KEY"
]
}
}如果使用docker,则如下:
"mcpServers": {
"ntropy-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ntropy-mcp"
"--api-key",
"YOUR_NTROPY_API_KEY"
]
}
}示例用法
检查连接
# Check if your API key is valid and the Ntropy API is accessible
connection_status = check_connection()
print(connection_status)创建和更新帐户持有人
# Create a new account holder
account_holder = create_account_holder(
id="user123",
type="individual",
name="John Doe"
)
# Update an existing account holder
updated_account = update_account_holder(
id="user123",
name="John Smith"
)丰富交易
# Enrich a single transaction
enriched_transaction = enrich_transaction(
id="tx123",
description="AMAZON.COM*MK1AB6TE1",
date="2023-05-15",
amount=-29.99,
entry_type="debit",
currency="USD",
account_holder_id="user123",
country="US"
)
# Bulk enrich multiple transactions
transactions = [
{
"id": "tx124",
"description": "NETFLIX.COM",
"date": "2023-05-16",
"amount": -13.99,
"entry_type": "debit",
"currency": "USD",
"account_holder_id": "user123"
},
{
"id": "tx125",
"description": "Starbucks Coffee",
"date": "2023-05-17",
"amount": -5.65,
"entry_type": "debit",
"currency": "USD",
"account_holder_id": "user123"
}
]
enriched_transactions = bulk_enrich_transactions(transactions)调试
您可以使用MCP检查器调试服务器。对于uvx安装:
npx @modelcontextprotocol/inspector uvx ntropy-mcp --api-key YOUR_NTROPY_API_KEY构建
Docker构建:
docker build -t ntropy-mcp .贡献
欢迎拉取请求!请随时贡献新想法、错误修复或增强功能。
许可证
ntropy mcp根据MIT许可证获得许可。这意味着您可以根据MIT许可证的条款和条件自由使用、修改和分发软件。有关更多详细信息,请参阅项目存储库中的LICENSE文件。
