Expense-Tracker-MCP-Server-MongoDB-

lakshayknows/Expense-Tracker-MCP-Server-MongoDB-

3.2

If you are the rightful owner of Expense-Tracker-MCP-Server-MongoDB- 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.

Expense Tracker – MCP Server is a lightweight, extensible server designed to track expenses using Python and MongoDB, offering a modular and automation-friendly solution.

Tools
3
Resources
0
Prompts
0

🚀 Expense Tracker – MCP Server (MongoDB)

License: MIT Python MongoDB Maintained Contributions Welcome Built With Love

A lightweight, extensible MCP Server that tracks expenses using Python + MongoDB. Designed to be modular, hackable, and friendly to automations and AI agents.


✨ Features

  • Add new expenses
  • Retrieve all expenses (latest-first)
  • Supports custom categories
  • MongoDB-backed persistent storage
  • MCP tools for programmable interfaces
  • Clean, minimal, contributor-friendly codebase

🗂️ Project Structure

Expense-Tracker-MCP-Server-MongoDB/
│
├── main.py               # MCP server (entrypoint)
├── categories.json       # Predefined categories
├── pyproject.toml        # Project metadata + deps
├── uv.lock               # Environment lockfile
├── .python-version       # Python version pin
├── .gitignore
└── README.md

🛠️ Installation

1. Clone the repository

git clone https://github.com/lakshayknows/Expense-Tracker-MCP-Server-MongoDB-.git
cd Expense-Tracker-MCP-Server-MongoDB-

2. Install dependencies

Using uv:

uv sync

Using pip:

pip install -r requirements.txt

3. Ensure MongoDB is running

Default connection:

mongodb://localhost:27017/

▶️ Running the Server

python main.py

Tools exposed:

  • add_expense
  • get_expenses
  • get_categories

Plug into any MCP-compatible client.


🌍 Environment Variables

VariableDescriptionDefault
MONGO_URIMongoDB connection stringmongodb://localhost:27017/
DB_NAMEDatabase nameexpense_tracker

🤝 Contributing

Contributions are welcome! Whether it's bug fixes, features, or docs, feel free to jump in.

Steps:

  1. Fork the repo
  2. Create a new branch
  3. Make your changes
  4. Open a pull request

⭐ Support

If this project helps you, consider giving it a star on GitHub.


📜 License

Licensed under the MIT License.