personal-finance-mcp-server
personal-finance-mcp-server
用于 personal-finance-service 的远程 MCP 服务器:
将其业务操作(分组、支付方式、支出)作为 MCP 工具暴露,
通过 Keycloak 进行身份验证。设计用于从 Kiro/Claude(交互式登录)或
云中的无头代理(M2M 登录)使用。
要求
Docker + Docker Compose
personal-finance-service正在运行(在该仓库中执行docker compose up -d)—— 本服务器连接到其 Keycloak 和 API,不会自行启动它们。
Related MCP server: MCP Agent - AI Expense Tracker
如何运行
cp .env.example .env
# completar KEYCLOAK_CLIENT_SECRET con el secret de mcp-personal-finance-server
# (ver "Setup de Keycloak" en AGENTS.md si todavía no existen los clients)
docker compose up -d --buildGET http://localhost:8000/healthPOST http://localhost:8000/mcp— 需要Authorization: Bearer <jwt>
在 Kiro 中配置 MCP
{
"mcpServers": {
"personal-finance-remote": {
"url": "http://localhost:8000/mcp",
"oauth": {
"clientId": "mcp-personal-finance-client",
"scopes": []
}
}
}
}首次使用时,Kiro 会打开浏览器进行 Keycloak 登录——使用
你在 personal-finance-service 中已经使用的相同用户名/密码。
可用工具
工具 | 功能 |
| 列出用户的群组 |
| 创建群组 |
| 列出群组成员 |
| 列出用户的支付方式 |
| 创建支付方式 |
| 修改支付方式 |
| 删除支付方式 |
| 列出支出,支持筛选 |
| 记录支出(可选分期和/或分摊) |
| 为信用卡分期支出生成下一期 |
| 支出的完整详情 |
| 修改支出 |
| 删除支出 |
personal-finance-service 的 API 密钥管理(创建/列出/删除)
有意不作为工具暴露——参见 AGENTS.md。
无头代理(M2M)
对于没有人类用户背后的代理(无法进行交互式登录),请使用客户端凭据授权(Client Credentials Grant)而不是 Kiro 的流程:
curl -X POST http://localhost:8080/realms/personal-finance/protocol/openid-connect/token \
-d "grant_type=client_credentials&client_id=mcp-personal-finance-agent&client_secret=$AGENT_CLIENT_SECRET" \
| jq -r .access_token使用该 access_token 作为 Bearer 令牌调用 POST /mcp。代理还需要
在其环境中配置 UPSTREAM_API_KEY——一个由真实用户预先生成的 Personal Finance
API 密钥(在 personal-finance-service 中执行 POST /api-keys),
因为其令牌不代表该 API 的任何真实用户。
更多详情
参见 AGENTS.md——设计决策、已知差距,以及为什么认证透传
有效(以及何时会失效)。
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Agentic rails for complex workflows with receipts, fees, and MCP tool access.
Paid MCP tools behind one endpoint. Agents pay per call in USDC on Base via x402.
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceEnables AI tools to interact with Firefly III personal finance management instances through a cloud-deployed MCP server. Supports financial operations like account management, transactions, budgeting, and reporting with configurable tool presets.17 npm-
- AlicenseNot gradedqualityFmaintenanceEnables AI agents to manage personal expenses through natural language conversations. Supports adding, searching, and analyzing transactions with automatic categorization and financial insights.3MIT
- AlicenseBqualityBmaintenanceEnables agent-friendly access to Monarch Money finances, including accounts, transactions, budgets, cash flow, and mutations through structured MCP tools.33MIT
- FlicenseCqualityCmaintenanceEnables users to add expenses, retrieve expenses by date range, and get spending summaries by category through MCP tools.4-