费用跟踪MCP服务器
一 MCP服务器 使用 FastMCP,与 Supabase(PostgreSQL) 和 SQLAlchemy ORM,旨在与无缝协作 克劳德桌面 使用资源和工具原语。
______________________________________________________________________
🚀 特性
- 托管于 MCP云
- 已连接 Supabase PostgreSQL 数据库
- 用途 SQLAlchemy ORM 和 派丹蒂克 模型
- 与顺利集成 克劳德桌面 (MCP客户端)
______________________________________________________________________
🧩 依赖项
fastmcp>=2.13.0.2
psycopg2>=2.9.11
psycopg2-binary>=2.9.11
pydantic-settings>=2.11.0
sqlalchemy>=2.0.44安装依赖项(建议使用 uv):
uv sync______________________________________________________________________
🏗️ 项目结构
expense-tracker-mcp/
│
├── .env # Environment variables (Supabase URL, DB config, etc.)
├── .gitignore
├── .python-version
├── categories.json # Category mappings or static data
├── fastmcp.json # FastMCP configuration file
├── main.py # Entry point for MCP server
├── pyproject.toml # Project metadata and dependencies
├── uv.lock # uv dependency lock file
├── README.md # Project documentation
│
├── database/ # Database-related modules
│ ├── __pycache__/
│ ├── crud.py # CRUD operations for records
│ ├── database.py # DB connection setup
│ ├── models.py # SQLAlchemy models
│ └── schemas.py # Pydantic schemas
│
└── __pycache__/ # Compiled Python cache files______________________________________________________________________
⚙️ 用法
1.运行MCP检查器
uv run fastmcp dev main.py2.在Claude Desktop中安装MCP服务器
uv run fastmcp install claude-desktop main.py安装后,更新您的 claude_desktop_config.json:
"args": [
"--directory",
"D:\\Practice-Projects\\expense-tracker-mcp",
"run",
"fastmcp",
"run",
"main.py"
]______________________________________________________________________
🧠 备注
- 确保您的 Supabase连接字符串 已在中正确配置
.env. - 服务器通过以下方式进行通信 MCP云 并使用 克劳德桌面 作为客户。
______________________________________________________________________
🪪 许可证
该项目根据 MIT许可证.
MIT License
Copyright (c) 2025 Umar Ehtisham
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.