icost-app-mcp-server
MCP server for iCost iOS app that enables smart expense tracking, category management, and account operations through natural language, supporting multiple account types and currencies.
README
iCost App MCP Server
基于 FastMCP 2.0 框架构建的模型上下文协议(MCP)服务,专为 iCost iOS 记账应用提供智能记账功能集成(⚠️当前只支持 MacOS 平台)。
📖 使用示例


✨ 功能特性
- 🏦 多账户支持: 支持支付宝、微信、银行卡等多种账户类型
- 💱 多币种支持: 支持人民币及其他主要货币
- 📊 智能分类: 提供完整的收入和支出分类系统
- 📱 无缝集成: 通过 URL Scheme 与 iCost 应用深度集成
- 🚀 高性能: 基于 FastMCP 2.0 和现代 Python async/await 模式
- 🛡️ 类型安全: 完整的类型提示和数据验证
- 📝 详细记录: 支持备注、标签、位置等详细信息记录
- 🎯 统一接口: 🆕 新增统一记账工具,减少40%参数冗余,提升使用效率
- ⏰ 智能时间: 🆕 自动时间处理,未指定时间时默认使用当前时间
🔧 核心功能
🎯 统一记账工具 (推荐)
- 统一记账接口 (
icost_add_record): 🆕 新增统一工具,一个工具支持所有记账操作- 支持支出、收入、转账三种记录类型
- 智能参数处理,减少40%的参数冗余
- 简化工具选择,提升使用效率
应用控制
- 打开应用页面 (
icost_open_app): 快速跳转到 iCost 应用的特定功能页面asset_main: 资产首页chart_main: 统计首页quick_record: 记账页面
智能分类
- 获取支持分类 (
icost_categories): 提供完整的收入和支出分类列表
时间工具
- 当前时间 (
current_time): 获取当前时间用于记账 - 时间快捷方式:
am(),pm(),default_time()等便捷时间设置
🚀 快速开始
环境要求
- Python 3.10+
- macOS (用于 URL Scheme 集成)
⚙️ 配置选项
服务器支持以下配置参数:
| 参数 | 默认值 | 说明 |
|---|---|---|
--transport |
stdio, http | 通信协议,默认stdio |
--host |
localhost | 服务器绑定主机 |
--port |
9000 | 服务器端口 |
--debug |
False | 调试模式 |
--log-level |
INFO | 日志级别 |
一键安装运行配置
最简单的一键命令(推荐)
直接在 MCP Client 配置中使用安装并运行的命令:
Claude Desktop/Cherry Studio...:
// uvx
{
"mcpServers": {
"icost-app-mcp-server": {
"command": "uvx",
"args": [
"icost-app-mcp-server"
]
}
}
}
// bash
{
"mcpServers": {
"icost-app-mcp-server": {
"command": "sh",
"args": ["-c", "pip install --quiet icost-app-mcp-server && icost-app-mcp-server"]
}
}
}
// -- 方式2:本地已经install过
{
"mcpServers": {
"icost-app-mcp-server": {
"command": "icost-app-mcp-server"
}
}
}
// -- 方式3
// bash
python icost-app-mcp-server --transport http --host localhost --port 9000
// mcp server config
{
"mcpServers": {
"icost-app-mcp-server": {
"url": "http://localhost:9000"
}
}
}
方式二:从 PyPI 安装
# 安装最新版本
pip install icost-app-mcp-server
# 验证安装
icost-app-mcp-server --help
# 使用默认配置启动
icost-app-mcp-server
# 自定义主机和端口
icost-app-mcp-server --host 0.0.0.0 --port 8080
# 启用调试模式
icost-app-mcp-server --debug --log-level DEBUG
验证集成
集成成功后,您应该能在 MCP Client 中看到以下工具:
icost_add_record- 🆕 统一记账工具,支持支出/收入/转账icost_open_app- 打开 iCost 应用页面icost_categories- 获取支持的分类current_time- 获取当前时间
📋 支持的分类
支出分类
餐饮、购物、交通、日用、通讯、住房、医疗、医疗健康、服饰、数码电器、汽车、学习、办公、运动、社交、人情、育儿、母婴亲子、旅行、烟酒、扫二维码付款、充值缴费、生活服务、文化休闲、理财、水果、其他
收入分类
工资、奖金、福利、退款、红包、副业、退税、投资、其他
🤝 贡献指南
我们欢迎各种形式的贡献!如有问题或建议,请通过 GitHub Issues 提交。
📄 许可证
本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。
🔗 相关链接
- PyPI 包页面: https://pypi.org/project/icost-app-mcp-server/
- 项目主页: https://github.com/TooLife/icost-app-mcp-server
- 问题反馈: https://github.com/TooLife/icost-app-mcp-server/issues
- FastMCP 框架: https://github.com/jlowin/fastmcp
- MCP 协议规范: https://modelcontextprotocol.io/
📞 支持
- 📧 邮箱: json.tang.dev@gmail.com
- 🐛 问题: GitHub Issues
🙏 致谢
- 感谢 FastMCP 框架提供的强大基础
- 感谢 iCost 应用团队的 URL Scheme 支持
- 基于现代 Python 开发最佳实践构建
- 该项目不设计商用,仅用于个人学习和个人使用
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.