Spendify MCP server

Spendify lets people share and split expenses with friends using a link, with no account. This page explains how an AI agent can create groups, add people and record expenses through the Spendify MCP server.

This page is documentation. The MCP endpoint is https://sobrecodigo-api.azurewebsites.net/mcp, not https://spendify.link/mcp. Send JSON-RPC requests to the endpoint.

Quick start

Add the server to Claude Code:

claude mcp add --transport http spendify https://sobrecodigo-api.azurewebsites.net/mcp

Or call it directly, without an MCP client:

curl -X POST https://sobrecodigo-api.azurewebsites.net/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

The web app at spendify.link needs JavaScript, so fetching its pages as text only returns the landing copy. Don't scrape it; use the MCP server.

Connection

Endpoint https://sobrecodigo-api.azurewebsites.net/mcp
Transport HTTP POST with JSON-RPC 2.0. Responses are plain application/json, never a stream.
Requests One request per call. Batches are rejected.
Authentication None. There's no session; each request stands alone.
Protocol version 2024-11-05
Methods initialize, ping, tools/list, tools/call
GET on the endpoint Returns a one-line text description with the tool names.

Links and the group hash

Each group is identified by its hash, a UUID. Spendify links carry it in the hash query parameter, in any of these forms:

When a user pastes a Spendify link, take the hash value and pass it to the tools. Anyone with the hash can read and edit the group, so treat it as a secret and don't post it publicly.

Tools

Tool names and argument names are exact. Field names are in Spanish. tools/list returns the same schemas as JSON.

Creates a new group.

ArgumentTypeRequiredDescription
nombrestringNo Group name.
tipoHashintegerNo 1 = monthly household expenses, 2 = trip (default), 3 = event.

Returns hash, nombre and link. Give the link to the user.

Renames a group.

ArgumentTypeRequiredDescription
hashstringYesGroup hash.
nombrestringYesNew name.

add_person

Adds a person to the group. Returns the updated list of people.

ArgumentTypeRequiredDescription
hashstringYesGroup hash.
nombrestringYesPerson's name.

list_people

Lists the people in the group. Returns data, an array of { id, nombre, cvu }.

ArgumentTypeRequiredDescription
hashstringYesGroup hash.

list_expense_types

Lists the group's expense categories. Returns an array of { id, descripcion }. New groups have: Vivienda, Transporte, Alimentación, Salud, Inversión, Educación, Deudas y Finanzas, Entretenimiento, Vestimenta y Cuidado Personal, Familia y Mascotas, Emergencias e Imprevistos, Donaciones y Regalos, Otros, Ahorros.

ArgumentTypeRequiredDescription
hashstringYesGroup hash.

create_expense

Adds an expense, with who paid and who shares it.

ArgumentTypeRequiredDescription
hashstringYesGroup hash.
descripcionstringYesWhat the expense was.
gastonumberYesTotal amount.
pagadoresarrayYes, at least 1 Who paid. Each item is {"id": <person id>, "monto": <amount>} or {"nombre": "<person name>", "monto": <amount>}. If monto is omitted, it defaults to the full gasto.
participantesarrayYes, at least 1 Who shares the expense: person IDs ([4084, 4085]) or names (["Ana", "Beto"]). Payers are added to the split automatically if they aren't listed.
tipoPagostringNo Payment method: Efectivo (cash), Tarjeta (card) or Mercado Pago.
tipoGastoDescripcionstringNo Category, exactly as returned by list_expense_types, accents included.
fileBase64, fileNamestringNo Receipt image, base64-encoded, and its file name.

list_expenses

Lists the group's expenses. Returns data, an array of expenses with id, gasto, descripcion, created, tipoGasto, tipoPago and usuariosQueParticipanYPagan. In that last list, tipoParticipacion 1 is a payer with their monto, and 2 is a person in the split.

ArgumentTypeRequiredDescription
hashstringYesGroup hash.

Results and errors

Full example

Add a 15000 dinner paid by Ana and split between Ana and Beto:

POST https://sobrecodigo-api.azurewebsites.net/mcp
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_expense",
    "arguments": {
      "hash": "<hash>",
      "descripcion": "Cena",
      "gasto": 15000,
      "tipoPago": "Efectivo",
      "tipoGastoDescripcion": "Alimentación",
      "pagadores": [{ "nombre": "Ana", "monto": 15000 }],
      "participantes": ["Ana", "Beto"]
    }
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"ok\": true, \"hash\": \"<hash>\", \"link\": \"https://www.spendify.link/expenses?hash=<hash>\", \"descripcion\": \"Cena\", \"gasto\": 15000.0, \"pagadores\": [{\"id\": 4089, \"monto\": 15000.0}], \"participantes\": [4089, 4090]}"
      }
    ]
  }
}

Typical flow for a pasted link

  1. Take hash from the link.
  2. Call list_people, list_expenses and list_expense_types to see the group as it is now.
  3. Add missing people with add_person.
  4. Add each expense with create_expense, using people from list_people and a category from list_expense_types. If the user doesn't say who paid or who shares the expense, ask before creating it.
  5. Call list_expenses to confirm, then send the user the link to review in the app.

To start from scratch, call create_expense_link first and give the user the returned link.

Things to watch for

Machine-readable files

Back to Spendify