lakshayknows/Expense-Tracker-MCP-Server-MongoDB-
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.
🚀 Expense Tracker – MCP Server (MongoDB)
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_expenseget_expensesget_categories
Plug into any MCP-compatible client.
🌍 Environment Variables
| Variable | Description | Default |
|---|---|---|
| MONGO_URI | MongoDB connection string | mongodb://localhost:27017/ |
| DB_NAME | Database name | expense_tracker |
🤝 Contributing
Contributions are welcome! Whether it's bug fixes, features, or docs, feel free to jump in.
Steps:
- Fork the repo
- Create a new branch
- Make your changes
- Open a pull request
⭐ Support
If this project helps you, consider giving it a star on GitHub.
📜 License
Licensed under the MIT License.