Expense Tracker MCP Server
Enables logging and tracking personal expenses in a local SQLite database with category/subcategory validation, offering tools to add, view, summarize, and delete expenses.
README
Expense Tracker MCP Server
An asynchronous Model Context Protocol (MCP) server built with Python and FastMCP to log and track personal expenses inside a local SQLite database with strict category/subcategory checks.
Features
- SQLite Database Backend: Logs expenses locally in
expenses.dbusingaiosqlite. - Asynchronous Execution: Fully utilizes
asyncioand async database connections. - Categorization: Validates categories and subcategories against a custom JSON hierarchy (
categories.json). - Exposed Tools:
add_expense: Add a new transaction (validates amount, category, and dates).get_expenses: View matching logs with optional category, subcategory, start date, and end date filters.get_expense_summary: View spent totals, item count, and percentages grouped by category.delete_expense: Remove transaction logs by database ID.
- Exposed Resources:
expense://categories: Returns the JSON representation of categories and their subcategories.expense://categories/{category}/subcategories: Returns subcategories for a given category in JSON format.
Files Structure
- [main.py](file:///d:/coding/expense-tracker-mcp-server/main.py): Server entrypoint containing initialization, SQLite queries, MCP tools, and MCP resource declarations.
- [categories.json](file:///d:/coding/expense-tracker-mcp-server/categories.json): Configuration file specifying categories and subcategories.
- [pyproject.toml](file:///d:/coding/expense-tracker-mcp-server/pyproject.toml): Package configuration with metadata and dependency requirements (
fastmcpandaiosqlite). - [.gitignore](file:///d:/coding/expense-tracker-mcp-server/.gitignore): Configured to ignore virtual environments, cache directories, and local database files.
Installation
Ensure you have uv installed.
To sync dependencies:
uv sync
Running the Server
To start the MCP server locally:
uv run python main.py
Development and Testing
A test suite is available under the artifacts directory. To run the async test suite:
uv run python C:\Users\User\.gemini\antigravity-ide\brain\7f833c64-f9e4-404b-a691-0d0df923616c\scratch\test_server.py
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.