Expense Tracker MCP Server
MCP-сервер для отслеживания расходов
MCP-сервер (Model Context Protocol), который позволяет ИИ-ассистентам, таким как Claude, управлять личными расходами — добавлять, классифицировать, суммировать и планировать бюджет — с использованием локальной базы данных SQLite.
Обзор
Этот сервер предоставляет набор инструментов MCP, которые Claude (или любой другой MCP-совместимый клиент) может вызывать для отслеживания ваших трат. Все данные хранятся локально в файле SQLite — никакого облака или учетных записей не требуется.
Related MCP server: ExpenseTracker MCP Server
Возможности
Добавление и управление расходами с указанием категорий, сумм, дат и описаний
Фильтрация и просмотр списка расходов по диапазону дат или категории
Суммирование расходов по категориям или месяцам
Установка бюджетов для каждой категории и проверка остатка средств
Экспорт расходов в CSV
Полная локальность — данные остаются на вашем компьютере
Инструменты MCP
Инструмент | Описание | Ключевые параметры |
| Записать новый расход |
|
| Список расходов с дополнительными фильтрами |
|
| Агрегированные итоги, сгруппированные по категории или месяцу |
|
| Редактировать существующий расход по ID |
|
| Удалить расход по ID |
|
| Установить ежемесячный лимит бюджета для категории |
|
| Сравнение лимитов бюджета с фактическими тратами |
|
| Экспорт расходов в виде CSV-строки |
|
Структура проекта
expense-tracker-mcp-server/
├── main.py # MCP server entry point (all tools)
├── expenses.db # SQLite database (auto-created on first run)
├── pyproject.toml # Project metadata and dependencies
├── .venv/ # Virtual environment (created by uv)
└── readme.mdПредварительные требования
Python 3.11+
uv (рекомендуется) или
pipClaude Desktop (для подключения MCP-сервера)
Установка
# Clone the repo
git clone https://github.com/your-username/expense-tracker-mcp-server.git
cd expense-tracker-mcp-server
# Initialize the project and install dependencies
uv init
uv add fastmcpЭто автоматически создаст папку .venv внутри директории проекта.
Запуск сервера
fastmcp run main.pyСервер запускается и ожидает MCP-соединения через stdio. База данных SQLite (expenses.db) создается автоматически при первом запуске.
Подключение к Claude Desktop
Добавьте следующее в ваш файл конфигурации Claude Desktop:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"expense-tracker": {
"command": "uv",
"args": [
"--directory",
"C:\\Learning\\Expense-Tracker-MCP-Server",
"run",
"fastmcp",
"run",
"main.py"
]
}
}
}Полностью закройте Claude Desktop (системный трей → Quit) и откройте его снова. Вы должны увидеть инструменты отслеживания расходов на панели инструментов.
Примеры запросов
После подключения к Claude вы можете сказать:
"Добавь расход $45 на продукты в Whole Foods сегодня"
"Покажи мне все расходы на еду за этот месяц"
"На что я потратил больше всего в прошлом месяце?"
"Установи ежемесячный бюджет $300 на рестораны"
"Сколько осталось от моего бюджета на развлечения?"
"Экспортируй все мои расходы за март в CSV"
Разработка
# Run with MCP inspector for debugging
fastmcp dev inspector main.pyЛицензия
MIT
Available Tools
8 toolsadd_expenseB
Add a new expense. Date format: YYYY-MM-DD (defaults to today).
Inputs: amount (required), category (required), description, date, +1 more. Returns: object
delete_expenseB
Delete an expense by ID.
Inputs: id (required). Returns: object
export_expensesC
Export expenses as a CSV string.
Inputs: start_date, end_date, category. Returns: result
get_budget_statusB
Compare budget limits vs actual spend. Month format: YYYY-MM (defaults to current month).
Inputs: month. Returns: result
get_expense_summaryB
Summarize total spending grouped by 'category' or 'month'.
Inputs: group_by, start_date, end_date. Returns: result
list_expensesB
List expenses with optional filters. Date format: YYYY-MM-DD.
Inputs: category, start_date, end_date, limit. Returns: result
set_budgetC
Set or update the monthly budget limit for a category.
Inputs: category (required), monthly_limit (required), currency. Returns: object
update_expenseC
Update fields of an existing expense by ID.
Inputs: id (required), amount, category, description, +1 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool has a clearly distinct purpose with no overlap: adding, deleting, updating, listing, summarizing, exporting expenses, and managing budgets. The descriptions specify unique actions (e.g., add vs. update) and resources (expenses vs. budget), eliminating ambiguity.
All tools follow a consistent verb_noun pattern (e.g., add_expense, delete_expense, get_budget_status). The naming is uniform across all eight tools, using snake_case and clear action verbs aligned with their functions.
With 8 tools, the server is well-scoped for an expense tracker, covering core operations like CRUD for expenses, budget management, summarization, and export. Each tool earns its place without being excessive or sparse.
The tool set provides complete coverage for the expense tracking domain: full CRUD for expenses (add, delete, update, list), budget management (set and status), summarization, and export. There are no obvious gaps, enabling agents to handle typical workflows end-to-end.
Maintenance
Related MCP Connectors
Track expenses from your AI chat: log, categorize, monthly CSV reports. All data is local.
Expense ledger for AI assistants: record receipts line by line, ask what you spent, export anytime.
Track expenses from receipt photos, then search, summarize and update them from your AI assistant.
Track budgets from your AI chat: envelopes, monthly limits, variance reports. All data is local.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage personal expenses through natural conversation, supporting expense tracking, categorization, filtering, and financial summaries. Uses SQLite database to store expense records with full CRUD operations for comprehensive personal finance management.2-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage personal expenses by adding, querying, and summarizing expense data through a SQLite database and configurable categories.1GPL 3.0
- FlicenseNot gradedqualityDmaintenanceEnables natural language management of personal expenses, including adding, listing, and summarizing expenses with local SQLite storage.-
- FlicenseAqualityDmaintenanceEnables AI assistants to track, query, summarize, and delete personal expenses stored in a local SQLite database via natural language.4-