Skip to main content
Glama
Sudhanvaha

Expense Tracker MCP Server

by Sudhanvaha

add_expense

Record a new expense by entering the date, amount, and category to track spending in the Expense Tracker MCP Server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateYes
amountYes
categoryYes
subcategoryNo
noteNo

Implementation Reference

  • main.py:39-46 (handler)
    The 'add_expense' tool handler. Decorated with @mcp.tool() for registration and execution. Inserts expense into SQLite DB and returns ID.
    @mcp.tool() def add_expense(date, amount, category, subcategory="", note=""): with sqlite3.connect(DB_PATH) as c: cur = c.execute( "INSERT INTO expenses(date, amount, category, subcategory, note) VALUES (?, ?, ?, ?, ?)", (date, amount, category, subcategory, note) ) return {"status": "ok", "id": cur.lastrowid}

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