expenses-mcp-server
Enables LLM clients to manage a financial ledger by adding, listing, and summarizing expenses via a remote MCP server using SSE transport.
README
📊 Remote MCP Expense Tracker Server
An autonomous, production-ready Model Context Protocol (MCP) server built with FastMCP and SQLite3. This server exposes local financial ledger capabilities—adding, listing, and summarizing expenses—to any LLM client (like Claude or LangChain agents) over a remote network connection via Server-Sent Events (SSE).
🚀 Features
Persistent Ledger
Automatically initializes and manages a local expenses.db SQLite instance.
Intelligent Tool Suite
- add_expense: Records transactions with dates, categories, subcategories, and metadata.
- list_expense: Queries transactional history between specific date boundaries.
- summarize: Generates category-wise financial summaries.
Static Resource Routing
Exposes a dedicated expense://categories URI providing JSON schemas of valid budgeting categories.
Remote-Ready Architecture
Switches from traditional Standard I/O (stdio) to a distributed network layer (sse), listening globally on port 8000.
🛠️ Tech Stack
| Component | Technology |
|---|---|
| Language | Python 3.11+ |
| Core Framework | FastMCP (Model Context Protocol SDK) |
| Database | SQLite3 (Embedded) |
| Transport Layer | SSE (Server-Sent Events) over HTTP |
📦 Installation & Setup
This repository uses uv for lightning-fast Python package and environment management.
1. Clone the Repository
git clone https://github.com/DebarghaNath/remote-mcp-server.git
cd remote-mcp-server
2. Install Dependencies
uv sync
Alternatively:
uv add fastmcp
3. Initialize Configuration Files
Ensure you have a categories.json file in the root folder, or let the server automatically generate a default configuration on its first run.
[
"Food",
"Utilities",
"Entertainment",
"Housing",
"Transportation"
]
🏃♂️ Running the Server
To launch the remote server and open it up to network traffic, run:
uv run main.py
Upon startup, the terminal will indicate that the SSE server is actively listening:
🚀 Launching Remote Expense Tracker Server on port 8000...
INFO: Started server process [PID]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
🔌 Connecting Your Client
To wire this server into an LLM Agent framework (such as LangChain's MultiServerMCPClient or an Anthropic Claude Desktop setup), configure your client transport block using the network endpoint.
LangChain Client Example (client.py)
SERVERS = {
"expense_tracker": {
"transport": "sse",
"url": "http://<SERVER_IP_ADDRESS>:8000/sse"
}
}
Claude Desktop Configuration (mcp.json)
{
"mcpServers": {
"expense-tracker": {
"command": "uv",
"args": [
"run",
"python",
"-m",
"mcp.client.sse",
"http://localhost:8000/sse"
]
}
}
}
🔒 Security Note
[!WARNING] Because
host="0.0.0.0"binds the server to all network interfaces, anyone who can reach your machine's IP address on port8000can read or write to your expense database.If exposing this outside a home Wi-Fi network, consider placing it behind a reverse proxy (such as Nginx) or a secure VPN tunnel (such as Tailscale).
📄 License
This project is open-source and available under the MIT License.
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.