Skip to main content
Glama
Sudhanvaha

Expense Tracker MCP Server

by Sudhanvaha

summarize

Generate expense summaries by date range and category to analyze spending patterns and track financial data from the Expense Tracker MCP Server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
start_dateYes
end_dateYes
categoryNo

Implementation Reference

  • main.py:61-80 (handler)
    The handler function for the 'summarize' MCP tool. It is registered via the @mcp.tool() decorator and computes the total expenses grouped by category within a given date range, optionally filtered by a specific category.
    @mcp.tool() def summarize(start_date, end_date, category=""): with sqlite3.connect(DB_PATH) as c: query = """ select category, sum(amount) as total_amount from expenses where date between ? and ? """ params = [start_date, end_date] if category: query += " AND category=?" params.append(category) query += " group by category order by total_amount asc" cur = c.execute(query, params) cols = [d[0] for d in cur.description] return [dict(zip(cols, r)) for r in cur.fetchall()]

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Sudhanvaha/expense-tracker-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server