Skip to main content
Glama
splitsmart-mcp

splitsmart-mcp

by AswaniSahoo

SplitSmart πŸ’Έ

Split group expenses fairly β€” from a web page, a REST API, or straight from your AI agent via MCP. Record who paid, see who owes whom, and get the fewest transfers needed to settle up. All money math is done in integer paise/cents, and the core rules are proven with property-based tests.

Built with Kiro for the Kiro University Challenge (#KiroUniversity #BuildWithKiro).

Quick start

git clone https://github.com/AswaniSahoo/splitsmart && cd splitsmart
uv sync
uv run splitsmart          # web UI + API at http://127.0.0.1:8000
uv run pytest -q           # 22 tests incl. 7 property-based tests
uv run splitsmart-mcp      # MCP server (stdio) β€” normally started by Kiro via .kiro/settings/mcp.json

Use it from Kiro CLI with the custom agent:

kiro-cli chat --agent splitsmart-accountant
> Create a group Goa Trip with Asha, Ravi and Meera. Asha paid β‚Ή1200 for the hotel for all three. Who owes whom?

⚠️ SplitSmart has no authentication and binds to 127.0.0.1 by default. Don't expose it to the internet.

Related MCP server: splitwise-mcp

How each Kiro lesson is used

#

Lesson

Where

What it does in this project

1

Spec-driven development

.kiro/specs/expense-splitter/

EARS requirements β†’ design (architecture, API, data model) β†’ task plan that drove the build

2

Steering

.kiro/steering/

product.md, tech.md, structure.md (always) + money-handling.md (fileMatch on Python files) enforcing integer-cents money

3

Hooks

.kiro/hooks/

PostFileSave ruff + re-run PBTs when ledger.py changes, PostTaskExec full test run, Stop (agent stop) money-safety self-check, PreToolUse guard blocking rm -rf / DB deletion

4

Property-based testing

design.md β†’ Correctness Properties, tests/test_ledger_properties.py

7 properties (money conserved, balances sum to 0, order independence, delete = undo, settle-up clears debts, ≀ nβˆ’1 transfers, format round-trip) run with Hypothesis, 200–500 cases each

5

Powers

Kiro Powers panel

Installed the Context7 power from the Kiro registry and used it to check tests/test_ledger_properties.py against the current Hypothesis @settings / max_examples docs; also installed our own SplitSmart power (Bonus 2)

6

MCP

src/splitsmart/mcp_server.py, .kiro/settings/mcp.json

Our own MCP server exposing 8 tools (create_group, add_expense, get_balances, settle_up, …) + fetch server; read-only tools auto-approved

7

Custom agents

.kiro/agents/

splitsmart-accountant (MCP-only, no shell/writes, asks before mutating data) and splitsmart-dev (scoped shell/write permissions, steering + spec as resources, own hooks)

β˜…1

Kiro Web, cloud sessions, cloud configuration

PR #1, .github/workflows/ci.yml

Uploaded local ~/.kiro/powers (SplitSmart + Context7) via Kiro Web Configuration Sync; started a cloud session from the IDE (Agent Focus) on this repo, which followed the cloned .kiro/steering, ran ruff + all tests in the sandbox and opened PR #1 adding GitHub Actions CI

β˜…2

Package a Kiro power

power-splitsmart/

plugin.json manifest + mcp.json (runs SplitSmart MCP from GitHub via uvx) + 2 skills (split-expenses, run-splitsmart)

Install the power in Kiro: Powers panel β†’ Add Custom Power β†’ Import power from GitHub β†’ https://github.com/AswaniSahoo/splitsmart (power folder: power-splitsmart), then say "split the dinner bill".

Architecture

Web UI ──fetch──▢ api.py (FastAPI) ─┐
                                     β”œβ”€β–Ά store.py (SQLite) + ledger.py (pure money logic)
Kiro agent ─MCP─▢ mcp_server.py β”€β”€β”€β”€β”€β”˜

API

Method

Path

Body

POST

/api/groups

{name, members[]}

GET

/api/groups, /api/groups/{id}

POST

/api/groups/{id}/members

{name}

POST

/api/groups/{id}/expenses

{description, amount_cents, payer, participants[]}

DELETE

/api/groups/{id}/expenses/{expense_id}

GET

/api/groups/{id}/balances, /api/groups/{id}/settle

License

MIT

Available Tools

8 tools
add_expenseA

Record an expense paid by payer, split equally among participants. amount_cents is a positive integer.

Inputs: payer (required), group_id (required), description (required), amount_cents (required), +1 more. Returns: object

add_memberC

Add a new member to an existing group.

Inputs: name (required), group_id (required). Returns: object

create_groupA

Create a group with a name and a list of unique member names.

Inputs: name (required), members (required). Returns: object

delete_expenseC

Delete an expense from a group.

Inputs: group_id (required), expense_id (required). Returns: result

get_balancesB

Net balance per member in cents: positive = is owed money, negative = owes money.

Inputs: group_id (required). Returns: result

get_groupB

Get a group with its members and expenses.

Inputs: group_id (required). Returns: object

list_groupsA

List all groups (id and name).

Inputs: no named parameters. Returns: result

settle_upA

Minimal list of transfers (from, to, amount_cents) that settles every debt in the group.

Inputs: group_id (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool targets a distinct operation: group lifecycle (create/list/get), member addition, expense add/delete, and balance/settlement. No overlap or ambiguity between tools.

    Naming Consistency5/5

    All tools follow a consistent lowercase snake_case verb_noun pattern (e.g., add_expense, get_balances). Even settle_up, a phrasal verb, fits the style without deviation.

    Tool Count5/5

    With 8 tools, the server is well-scoped for an expense-splitting domain. Each tool is necessary for core workflows, and the count is neither sparse nor bloated.

    Completeness4/5

    The tool surface covers the full cycle: create/list/get groups, add members, add/delete expenses, and compute balances/settlements. Minor gaps exist (e.g., no update/delete for groups or member removal), but they are not essential for the core purpose and agents can work around them.

    Maintenance

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that helps AI assistants manage expense-sharing for social events, enabling the creation of gatherings, tracking of expenses, and calculation of fair reimbursements among participants.
      Apache 2.0
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server for Splitwise that enables users to manage shared expenses, friends, and groups directly through AI assistants. It allows for creating, deleting, and listing expenses while providing tools to track net balances and group debts.
      8
      895 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol (MCP) server for managing shared expenses between groups, with tools for group management, expense tracking, and debt simplification.
      5 npm
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      A remote, multi-user MCP server for splitting group expenses, enabling users to register, create groups, add members, log expenses, and view balances through MCP clients.
      -