Rahul4112002/Expense-Tracker-MCP-Server-Remote
If you are the rightful owner of Expense-Tracker-MCP-Server-Remote and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Remote Expense Tracker MCP Server is a network-accessible server for managing personal expenses using the Model Context Protocol and SQLite storage.
Remote Expense Tracker MCP Server
A FastMCP-based remote HTTP server that exposes Model Context Protocol tools over the network for managing personal expenses with SQLite storage. Supports adding, listing, and summarizing expenses by category and date range, accessible remotely via HTTP transport on port 8000.
Features
- Remote Access: HTTP-based MCP server accessible over the network
- Expense Management: Add, list, and track expenses with categories and subcategories
- SQLite Storage: Persistent storage using SQLite database with WAL mode
- Category Management: Pre-defined expense categories with custom category support
- Date Range Queries: List and summarize expenses within specific date ranges
- Async Operations: Built with async/await for efficient database operations
Installation
- Clone the repository:
git clone <repository-url>
cd expense-tracker-remote-mcp-server
- Install dependencies:
uv sync
Usage
Start the server:
uv run main.py
The server will start on http://0.0.0.0:8000/mcp and create an expenses.db file in your system's temp directory.
MCP Tools
1. add_expense
Add a new expense entry to the database.
Parameters:
date(string): Date of the expense (YYYY-MM-DD format)amount(float): Amount spentcategory(string): Expense categorysubcategory(string, optional): Subcategory for the expensenote(string, optional): Additional notes
Returns: Status object with success/error message and expense ID
2. list_expenses
List expense entries within an inclusive date range.
Parameters:
start_date(string): Start date (YYYY-MM-DD format)end_date(string): End date (YYYY-MM-DD format)
Returns: Array of expense objects with id, date, amount, category, subcategory, and note
3. summarize
Summarize expenses by category within an inclusive date range.
Parameters:
start_date(string): Start date (YYYY-MM-DD format)end_date(string): End date (YYYY-MM-DD format)category(string, optional): Filter by specific category
Returns: Array of summary objects with category, total_amount, and count
MCP Resources
expense:///categories
Returns available expense categories in JSON format.
Default Categories:
- Food & Dining
- Transportation
- Shopping
- Entertainment
- Bills & Utilities
- Healthcare
- Travel
- Education
- Business
- Other
Database Schema
CREATE TABLE expenses(
id INTEGER PRIMARY KEY AUTOINCREMENT,
date TEXT NOT NULL,
amount REAL NOT NULL,
category TEXT NOT NULL,
subcategory TEXT DEFAULT '',
note TEXT DEFAULT ''
)
Configuration
- Host:
0.0.0.0(accessible from all network interfaces) - Port:
8000 - Database Path: System temp directory (
expenses.db) - Categories File:
categories.jsonin project directory
Technologies Used
- FastMCP: Model Context Protocol server framework
- aiosqlite: Async SQLite database operations
- SQLite: Database engine with WAL mode for concurrent access
License
[Add your license here]