
Splitwise MCP Server โ Control Splitwise With Plain English
"Add a โฉ45,000 dinner, I paid, split equally." Done. No app. No tapping. No math.
Why I Built This
I was about to head on a trip with friends and already dreading the expense tracking.
You know how it goes โ someone pays for dinner, someone else grabs the cab, another person covers the hotel deposit. By day two, you've lost track. So you open Splitwise, tap through four screens, type the amount, select the people, pick who paid, hit save. Then do it again for the next thing. And the next.
I thought: I'm already using Claude for everything else. What if I could just tell it what happened, and it handles Splitwise for me?
So I built this over a weekend. It's a small Python server that connects Claude AI directly to your Splitwise account. You talk to Claude like a human, and it does the Splitwise work for you โ adding expenses, checking balances, recording settlements, fixing mistakes.
No switching apps. No manual entry. Just say what happened.
What It Feels Like to Use
You: "We had a group dinner for โฉ65,000. I paid. Split equally."
Claude: Done! Added "Group dinner" for โฉ65,000.00 (KRW), split equally
among 4 members. Each person owes โฉ16,250.
You: "What does everyone owe in the trip group?"
Claude: Here are the current balances:
โข Raj owes you โฉ32,500
โข Priya owes you โฉ16,250
โข Sam is owed โฉ8,000 by the group
You: "Record that Raj paid me back โฉ30,000."
Claude: Payment of โฉ30,000 recorded. Raj's balance updated.
You: "Wait, that dinner was actually โฉ72,000. Can you fix it?"
Claude: Updated! "Group dinner" changed to โฉ72,000. Shares recalculated.Works with any currency Splitwise supports โ USD, EUR, INR, KRW, JPY, and more.
How It Works (The Simple Version)
You talk to Claude
โ
Claude understands what you want
โ
Claude calls this MCP server
โ
This server calls the Splitwise API
โ
Your Splitwise account updates instantly
โ
Everyone's app reflects the changeMCP (Model Context Protocol) is a standard way to give Claude access to external tools. This project is the "Splitwise tool" โ a bridge between Claude and your Splitwise account.
See architecture.md for a detailed diagram of how everything connects.
What You Can Do
| Ask Claude | What Happens |
|---|---|
| "List my groups" | Shows all your Splitwise groups with members |
| "Who owes what in the [group]?" | Shows all balances |
| "Add a $52 lunch, I paid, split equally" | Creates the expense |
| "Add $240 hotel โ I paid $120, Alex $80, Sam $40" | Exact split |
| "Split the $35 cab 50/30/20" | Percentage split |
| "Record that Alex paid me back $20" | Settlement payment |
| "Delete that last expense" | Removes it |
| "Change the dinner to $60" | Updates and recalculates |
All Available Tools
| Tool | What It Does |
|---|---|
get_current_user | Your Splitwise profile |
list_currencies | All currencies Splitwise supports |
list_groups | All your groups with member IDs |
get_group | Group details โ members, balances, debts |
list_expenses | Recent expenses in a group |
get_expense | Full details of one expense |
create_expense | Add expense (equal, exact, or percentage split) |
update_expense | Edit description, cost, currency, or date |
delete_expense | Remove an expense |
create_payment | Record a settlement between two people |
Project Structure
splitwise-mcp/
โโโ splitwise_server.py โ The entire server (~500 lines, one file)
โโโ .env โ Your API key (never committed to git)
โโโ requirements.txt โ Python dependencies
โโโ architecture.md โ How everything connects
โโโ DEPLOY.md โ How to host on a VPS
โโโ README.md โ This fileBuilt With
- FastMCP โ Python MCP framework
- Splitwise REST API v3
- httpx โ HTTP client
- Hosted on Hostinger VPS (Ubuntu)
Built by a first-time Python developer who just wanted to stop manually logging trip expenses. If I can build it, you can use it.
git clone https://github.com/yourusername/splitwise-mcp.git
cd splitwise-mcp
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtSetup
What You'll Need
- Python 3.10+ (
python3 --versionto check) - A Splitwise account + API key from secure.splitwise.com/apps
- Claude Desktop or Claude Code
Step 1: Clone and install
git clone https://github.com/yourusername/splitwise-mcp.git
cd splitwise-mcp
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtStep 2: Add your API key
Create a file called .env in the project folder:
SPLITWISE_API_KEY=paste_your_key_hereWhere to get your key:
- Go to secure.splitwise.com/apps
- Click "Register your application"
- Fill in any name (e.g., "My MCP Server")
- Copy the API Key into your
.envfile
Step 3: Connect to Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"splitwise": {
"command": "/full/path/to/venv/bin/python3",
"args": ["/full/path/to/splitwise_server.py"]
}
}
}Restart Claude Desktop. You'll see a hammer icon โ that means tools are connected.
Step 4 (Optional): Host on a Server for 24/7 Access
Want it running even when your laptop is off? Deploy to any VPS (I use Hostinger).
See DEPLOY.md for the full step-by-step guide.
Once hosted, connect Claude Desktop via:
{
"mcpServers": {
"splitwise": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://YOUR_SERVER_IP:8000/mcp", "--allow-http"]
}
}
}Troubleshooting
| Problem | Fix |
|---|---|
| Claude doesn't see Splitwise tools | Restart Claude Desktop after editing the config |
| 401 Unauthorized error | Check your API key in .env is correct |
| "No module named mcp" | Activate your venv: source venv/bin/activate |
| Server disconnected | Check server is running: sudo systemctl status splitwise-mcp |
| Wrong paths in config | Use full absolute paths, not relative ones |
Licensed under MITโ you can use, modify, and redistribute it under that license's terms.
License
MIT โ use it however you like.