Expense_Tracker_MCP

Expense_Tracker_MCP

An AI-powered expense management server that enables adding, searching, and analyzing expenses using natural language through the Model Context Protocol.

Category
Visit Server

README

๐Ÿ’ฐ Expense Tracker MCP

๐Ÿค– AI-Powered Expense Management using Model Context Protocol

<p align="center"> </p> <p align="center"> <img src="https://img.shields.io/badge/Python-3.13-blue?style=for-the-badge&logo=python"/> <img src="https://img.shields.io/badge/FastMCP-3.4.4-purple?style=for-the-badge"/> <img src="https://img.shields.io/badge/MongoDB-Database-green?style=for-the-badge&logo=mongodb"/> <img src="https://img.shields.io/badge/FastAPI-Backend-009688?style=for-the-badge&logo=fastapi"/> </p>


๐Ÿ“Œ Overview

Expense Tracker MCP is an AI-powered financial management system built usingModel Context Protocol (MCP ).

The system allows Large Language Models to interact with expense data throughMCP tools, enabling users to:

  • Add expenses

  • Search expenses

  • Analyze spending patterns

  • Generate financial insights

  • Communicate with expense data using natural language


๐Ÿง  MCP Architecture

flowchart TB


USER["๐Ÿ‘ค User"]

CLIENT["๐Ÿ”Œ MCP Client"]

SERVER["โšก FastMCP Server"]

TOOLS["๐Ÿ›  MCP Tools"]

FASTAPI["๐Ÿš€ FastAPI Application"]

MONGO["๐Ÿƒ MongoDB Database"]



USER --> CLIENT

CLIENT --> SERVER

SERVER --> TOOLS

TOOLS --> FASTAPI

FASTAPI --> MONGO

๐Ÿš€ Key Features

๐Ÿ’ธ Expense Managementโœ… Create expensesโœ… Update expensesโœ… Delete expensesโœ… Retrieve expense recordsโœ… Store financial history

๐Ÿ”Œ Model Context Protocol

This project implements MCP architecture:

User|MCP Client|FastMCP Server|Expense Tools|MongoDB

๐Ÿ› ๏ธ Technology Stack

###๐Ÿ Core Development

<p align="center"> <img src="https://skillicons.dev/icons?i=python"/> </p> Python >= 3.13 Setuptools Wheel

โšก MCP Framework

<img src="https://img.shields.io/badge/FastMCP-3.4.4-purple?style=flat-square"> MCP Server implementation Tool registration LLM communication layer

๐Ÿš€ Backend

<p align="center"> <img src="https://skillicons.dev/icons?i=fastapi"/> </p> FastAPI Uvicorn REST APIs

๐Ÿƒ Database

<p align="center"> <img src="https://skillicons.dev/icons?i=mongodb"/> </p> MongoDB PyMongo Motor Async Driver

๐Ÿ“ฆ Validation & Configuration

Pydantic v2Pydantic SettingsEnvironment Variablespython-dotenv

๐Ÿ“‚ Project Structure

Expense_Tracker/
โ”‚
โ”œโ”€โ”€ app/
โ”‚   โ””โ”€โ”€ db/
โ”‚       โ”œโ”€โ”€ database.py       # MongoDB connection configurations & client initialization
โ”‚       โ””โ”€โ”€ application.py    # Core FastAPI application routing and logic
โ”‚
โ”œโ”€โ”€ mcp/
โ”‚   โ”œโ”€โ”€ mcp_client.py         # MCP Client implementation for context bridging
โ”‚   โ””โ”€โ”€ mcp_server.py         # FastMCP Server registering the operational tools
โ”‚
โ”œโ”€โ”€ .env                      # Local environment variable configuration
โ”œโ”€โ”€ .gitignore                # Specified version control exclusions (e.g., venv, __pycache__ )
โ”œโ”€โ”€ .python-version           # Explicit python version pinning
โ”œโ”€โ”€ pyproject.toml            # Project metadata, dependencies, and editable tool configurations
โ””โ”€โ”€ README.md                 # System documentation## โš™๏ธ Installation

Clone repository:

git clone https://github.com/YOUR_USERNAME/Expense-Tracker-MCP.git

cd Expense-Tracker-MCP

Install dependencies:

pip install -e .

๐Ÿ” Environment Configuration


Create .env


MONGODB_URI=your_mongodb_connection_string

DATABASE_NAME=expense_tracker

โ–ถ๏ธ Running Application

Start MCP Server

-expense-server

or

python mcp_server.py

๐ŸŒ Remote MCP Server

This project also provides a remote MCP server that users can connect to:https://expense-tracker-01.fastmcp.app/mcp

API Documentation:

http://localhost:8000/docs

๐Ÿ”ฎ Future Improvements

-Expense prediction using ML-Budget recommendation engine-Voice-based expense entry-Multi-user authentication-React dashboard-Cloud deployment-Mobile application

๐Ÿ‘จโ€๐Ÿ’ป Developer

Sarim Abbas

AI Engineer | Backend Developer | Agentic AI Developer

<p align="center"> <img src="https://skillicons.dev/icons?i=python,fastapi,mongodb,docker,aws"/> </p>

โญ Star this repository if you find it useful!

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured