# Splitwise MCP

> Splitwise connects your shared expense accounts directly to your AI agent. It lets you track who owes whom across multiple groups, calculate receipts on the fly, and log bills accurately—all without opening a web browser. Use it for group trips, roommates, or just complicated dinner tabs.

## Overview
- **Category:** productivity
- **Price:** Free
- **Tags:** expense-tracking, bill-splitting, debt-management, group-finance, personal-finance, reimbursement

## Description

**Splitwise MCP Server - Track Expenses & Manage Splits**

Listen up. This server connects your AI agent right into Splitwise, so you don't have to juggle receipts and spreadsheets anymore. You can keep tabs on who owes what for group trips, roommates, or even just complicated dinner tabs—all without ever opening a browser.

*   **Record Shared Bills:** When you input cost details and how the money was split among users, the agent uses `create_expense` to log the new expense record instantly. You can tell it what the total bill was and specify exactly who is responsible for which portion of that spending. 
*   **Audit Past Spending:** To review financial records or find specific transactions, you use `get_expenses`, which pulls a list of multiple recorded expenses allowing you to see your group's historical spending patterns.

**Getting the Details You Need**

You need to know who's in the loop and what they spent. The agent uses `get_friends` to pull a complete list of every person visible in your Splitwise network, letting you keep track of everyone connected to your account. If you need specific background info on one of those people, `get_friend` pulls detailed profile information for an individual friend.

When the group gets bigger, the agent handles that too. You can use `get_groups` to list every single group you're part of. For a deep dive into a specific trip or shared living situation, `get_group` pulls the full details and member roster for one specific group. Need data on just one person in that group? The agent uses `get_user`, requiring a specific ID or name to get detailed user data for any connected member.

To figure out where you all stand right now, the system checks real-time balances owed among members of specified groups, letting your AI client report current debts instantly. You can also use `get_current_user` to pull basic profile information about the person linked to the API key, confirming who's running the show.

**Checking Individual Transactions**

Sometimes you just need to check one thing. If you want all data points associated with a single expense ID, calling `get_expense` fetches that specific transaction. You can also use `get_user` to pull detailed information on any specified member ID or name within Splitwise.

If something's wrong and needs cleaning up, the agent handles it. If you need to remove an existing record completely, you call `delete_expense`, which removes that specific expense entry from your account.

**How It All Works Together**

Your AI client pulls group structures and member lists by calling tools like `get_friends` or `get_groups`. When you tell it to log a bill—say, 'We spent $200 on groceries, split four ways'—the agent doesn't just write the text; it calls `create_expense`, handling all that complicated backend math and logging automatically. It also allows you to pull detailed member data via `get_user` or list groups using `get_groups`, ensuring your AI client always knows exactly who needs to pay for what.

## Tools

### create_expense
Logs a new expense record, requiring cost details and how the money was split among users.

### delete_expense
Removes an existing expense record from your Splitwise account.

### get_current_user
Retrieves basic profile information for the user linked to the API key.

### get_expense
Fetches all data points associated with a specific, single expense ID.

### get_expenses
Lists multiple recorded expenses, allowing you to see recent or historical spending patterns.

### get_friend
Retrieves specific profile details for an individual friend connected to your account.

### get_friends
Lists all friends currently linked or visible in your Splitwise network.

### get_group
Pulls the full details and member list for one specific group of people.

### get_groups
Lists every single group you are currently participating in on Splitwise.

### get_user
Gets detailed user data for any specified member ID or name within Splitwise.

## Prompt Examples

**Prompt:** 
```
Check how much I currently owe in the 'Paris Trip' group.
```

**Response:** 
```
Scanning the Paris Trip group balances... According to Splitwise, you currently owe $45 in total (mostly for dinner last night).
```

**Prompt:** 
```
Add a new $100 expense for Uber rides to Splitwise and split it equally with Jane.
```

**Response:** 
```
Okay. I've created the $100 expense 'Uber rides' and split it equally. You are owed $50 from Jane.
```

**Prompt:** 
```
List all my friends connected on Splitwise.
```

**Response:** 
```
Here is the list of your friends on Splitwise: 1. John (id: 412), 2. Sarah (id: 331).
```

## Capabilities

### Calculate current debts
The agent checks and reports real-time balances owed among members of specific groups.

### Record shared bills
You input cost, description, and split parameters; the tool logs a new expense record into Splitwise.

### Manage user data
The agent retrieves details for individual users or lists all members of connected groups.

### Audit past spending
It fetches a list of existing expenses, allowing you to review financial records and find specific transactions.

### Modify expenses
You can delete an expense record or retrieve details for a single, specific transaction.

## Use Cases

### The Trip Debrief
After a week-long group trip, Mark gets overwhelmed by the tabs. Instead of logging into Splitwise and clicking through 15 transactions, he asks his agent: 'What's the total owed in the Ski Trip group?' The agent runs `get_groups` and then queries balances to give him one clear number.

### The Apartment Move
Sarah is setting up a new shared utility tracker. She tells her agent, 'Log $600 for the security deposit paid by me, split equally among four people.' The agent uses `create_expense` immediately, recording the bill and distributing the debt.

### The Weekend Dinner Tab
You just got a receipt for dinner. Instead of opening Splitwise, you tell your agent: 'Add this $300 expense, split by two people, me paying 150 and John paying 150.' The agent uses `create_expense` to log it correctly.

### Checking Past Debt
You can't remember if you settled the gas bill. You ask your agent to 'List all expenses for my friend John.' The agent calls `get_expenses` and filters by name, giving you a clear history.

## Benefits

- **Calculate Balances on Demand:** Instead of clicking through multiple groups to find out who owes whom, the agent checks current balances using `get_groups` and reports the total debt immediately. This saves time when you just need a quick answer.
- **Log Receipts with Zero Effort:** Forget manually logging bills. Use your AI client to give the agent the details—cost, split method, users—and call `create_expense`. The record goes straight into Splitwise.
- **Comprehensive Audit Trail:** You don't have to guess where money went. Calling `get_expenses` gives you a list of recent transactions and past spending records, helping you track down that missing dinner tab.
- **Know Your Network:** Quickly check group membership or individual contacts using tools like `get_friends`. Need to know who was at the concert? The agent confirms it by calling `get_group` details.
- **Full Data Control:** If you only need to review one specific bill from three weeks ago, you can call `get_expense` and pull all relevant data points for that single transaction.

## How It Works

The bottom line is: it lets your AI agent act as a hands-on proxy for all your shared financial activities in Splitwise.

1. Log into your Splitwise account and generate a personal API token from the Developer Applications settings.
2. Insert that unique Splitwise API Key directly into Vinkius vault for secure access by your AI client.
3. Your agent can now call tools like `get_groups` or `create_expense`, performing actions as if you typed them into the native Splitwise app.

## Frequently Asked Questions

**How do I check my current debt using get_expenses on Splitwise?**
You don't need to call `get_expenses` just to see the balance. You simply ask your agent, 'What is the total owed in the Paris Trip group?' The agent runs the necessary queries and gives you the summarized balance.

**Can I delete an expense using the delete_expense tool?**
Yes, if you need to remove a mistake or correct a record, you can ask your agent to use `delete_expense` by providing the specific ID of the transaction.

**What is the difference between get_friend and get_user?**
Use `get_friends` first to list all contacts. Then, if you need detailed info on a specific person, use `get_user` with their ID. It's more granular.

**Does create_expense handle complex splits?**
Yes. You can specify custom shares (e.g., 20% for one person, $5 fixed amount for another) directly in the prompt, and the agent uses `create_expense` to log it.

**What should I check if my calls to get_friends fail because of authentication issues?**
First, verify your API token within Vinkius. You must use the personal developer API key generated directly in your Splitwise account settings. The agent cannot connect using general or secondary keys.

**What happens when I try to use get_expense for a record that has already been deleted?**
The tool returns an explicit 'Not Found' status code. Your AI client should detect this error and prompt the user to check the expense ID or run get_expenses instead.

**Does get_group provide the full list of member IDs for a shared circle?**
Yes, it returns the complete roster of members linked to that group. These detailed records include unique user IDs and their roles, which is necessary for accurate cost assignment.

**What specific fields does the tool return when I use get_friends to list all contacts?**
It returns a comprehensive list of connections, including unique user identifiers (IDs) and names. These IDs are crucial if you need your agent to create an expense for someone not in your current primary groups.

**Can the agent distribute the bill unequally?**
Yes! When creating an expense, the AI agent can pass detailed users configuration in JSON to specify exact dollar amounts for each involved party.

**How far back does the expense log go?**
The agent typically limits the reading to the 20 most recent expenses to keep memory manageable, but can be instructed to pull earlier ones.

**Can the bot settle debts?**
Currently, the agent interacts with expenses. To log a debt settlement, the agent submits a specific 'payment = true' expense wrapper via the splitwise schema.