raajshekhar19/Local-MCP-server-basics
If you are the rightful owner of Local-MCP-server-basics 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.
This is a simple expense tracker server built using FastMCP, designed to manage and track expenses efficiently.
Expense Tracker MCP Server
This is a simple expense tracker server built using FastMCP. It allows you to add, list, and summarize expenses, as well as manage expense categories.
Features
- Add new expenses with details like date, amount, category, subcategory, and notes.
- List expenses within a specific date range.
- Summarize expenses by category.
- Manage categories via a JSON resource.
Setup Instructions
-
Clone the repository:
git clone https://github.com/raajshekhar19/Local-MCP-server-basics.git cd expense-tracker-mcp-server -
Create and activate a virtual environment:
python -m venv .venv .venv/Scripts/activate -
Install dependencies:
pip install -r requirements.txt -
Run the server:
python main.py
Usage
Add an Expense
Use the add_expense tool to add a new expense:
{
"date": "2023-10-01",
"amount": 50.0,
"category": "Food",
"subcategory": "Groceries",
"note": "Weekly shopping"
}
List Expenses
Use the list_expenses tool to retrieve expenses within a date range:
{
"start_date": "2023-10-01",
"end_date": "2023-10-31"
}
Summarize Expenses
Use the summarize tool to get a summary of expenses by category:
{
"start_date": "2023-10-01",
"end_date": "2023-10-31",
"category": "Food"
}
Manage Categories
Access the expense://categories resource to view or edit categories.
Notes
- The database file (
expenses.db) and categories file (categories.json) are stored in the project directory. - Ensure the
categories.jsonfile exists and is properly formatted before running the server.
run the command:-> .venv/Scripts/activate