Skip to main content
Glama
deepakbishnoi717

Expense Tracker MCP Server

测试远程 MCP 服务器 - 费用追踪器

一个基于 FastMCP 的远程服务器,用于管理带有类别支持和详细追踪功能的费用。

概述

本项目为费用追踪服务提供了模型上下文协议 (MCP) 实现。它使用 FastMCP 来公开费用管理工具,这些工具可以与 Claude Desktop 或其他兼容 MCP 的客户端集成。

Related MCP server: Expense Tracker MCP Server

功能

  • 添加费用:记录带有日期、金额、类别和备注的新费用条目

  • 类别支持:按类别和子类别组织费用

  • 数据库持久化:使用 SQLite 数据库进行可靠的数据存储

  • 异步操作:使用 async/await 构建,以实现高效的并发操作

  • 代理服务器:包含用于远程访问的代理服务器配置

项目结构

test-remote-mcp-server/
├── main.py              # Main FastMCP server with expense tracking tools
├── proxy.py             # Proxy configuration for remote server access
├── categories.json      # Category definitions for expenses
├── pyproject.toml       # Project configuration and dependencies
└── README.md            # This file

安装

先决条件

  • Python 3.11 或更高版本

  • pip 或 Poetry 包管理器

设置

  1. 克隆仓库:

git clone https://github.com/deepakbishnoi717/test-remote-mcp-server.git
cd test-remote-mcp-server
  1. 创建虚拟环境:

python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. 安装依赖:

pip install -e .

或者使用 Poetry:

poetry install

使用方法

运行本地服务器

启动本地 FastMCP 服务器:

python main.py

使用代理服务器

运行连接到远程 FastMCP Cloud 实例的代理服务器:

python proxy.py

可用工具

add_expense

向数据库添加新的费用条目。

参数:

  • date (string): 费用日期 (例如: "2024-01-15")

  • amount (float): 花费金额

  • category (string): 主要费用类别

  • subcategory (string, 可选): 费用子类别

  • note (string, 可选): 关于费用的额外备注

示例:

await add_expense("2024-01-15", 25.50, "Food", "Groceries", "Weekly shopping")

数据库

本项目使用 SQLite 进行数据持久化。数据库在首次运行时自动初始化,并包含:

  • 自动创建表

  • WAL (预写日志) 以实现更好的并发性

  • 用于费用组织的类别表映射

数据库文件位置:系统临时目录 (expenses.db)

技术栈

  • FastMCP: 模型上下文协议框架

  • aiosqlite: 异步 SQLite 驱动程序

  • Python 3.11+: 具有异步支持的现代 Python

配置

类别

费用类别定义在 categories.json 中。自定义此文件以添加或修改适合您用例的费用类别。

与 Claude Desktop 集成

要在 Claude Desktop 中使用此服务器:

  1. 按照上述安装步骤设置服务器

  2. 配置 Claude Desktop 以连接到此 MCP 服务器

  3. 使用自然语言查询来管理您的费用

许可证

本项目是开源的,并根据相应的许可证提供。

贡献

欢迎贡献!请随时提交拉取请求或开启一个 issue。

支持

如有问题或疑问,请在 GitHub 上开启一个 issue: https://github.com/deepakbishnoi717/test-remote-mcp-server/issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables users to track and manage daily expenses through SQLite storage, supporting operations like adding, updating, deleting expenses, calculating totals by category, and filtering expenses by date range or category.
    -
  • F
    license
    C
    quality
    D
    maintenance
    Enables personal expense management with SQLite storage, allowing users to add, update, delete, list, and summarize expenses by category through natural language interactions.
    5
    -
  • F
    license
    A
    quality
    D
    maintenance
    Enables tracking and managing personal expenses through a local SQLite database. Supports adding, editing, deleting, listing, and summarizing expenses by category, as well as managing credit accounts.
    6
    -
  • F
    license
    B
    quality
    D
    maintenance
    Tracks and manages personal expenses with tools to add, view, filter by category, and summarize spending over date ranges using SQLite storage.
    4
    -