Skip to main content
Glama
AyyoSalli MCP Server

AyyoSalli MCP Server

by XTECLK

AyyoSalli

අයියෝ සල්ලි 💸 SMS-powered expense tracker: bank alerts are forwarded to a Cloudflare Worker, parsed into transactions, and shown in a PWA.

How it works

One Cloudflare Worker serves both the API (TypeScript + Hono, D1 database) and the web app (React PWA in web/, served as static assets).

  1. MacroDroid on your phone forwards each SMS to your private webhook URL.

  2. An AI model (Workers AI by default; Claude optional) classifies it as debit | credit | otp | declined | promotional | other. For debits it extracts amount, currency, merchant, category, bank, card type (credit/debit/account/wallet) and card number.

  3. A server-side check records an expense only for a debit with a positive amount, and blocks OTP-looking messages unless the model is ≥ 85% sure. This catches messages like "OTP for LKR 5,000 at DARAZ is 482913".

  4. Every SMS is kept in the message log with the decision and the reason. Expenses link back to their SMS.

Web app: Dashboard (category donut, by bank, by card type, totals), Expenses (by day, filterable, each with a link to its SMS and an editable category), Messages (every SMS with an expense / not-expense indicator), Settings (webhook URLs, MacroDroid guide, sign out). Sign-in is with Google.

Related MCP server: Finance MCP Server

Setup

npm install
npx wrangler d1 create ayyosalli          # paste database_id into wrangler.toml
npm run db:migrate:local

In wrangler.toml set:

  • GOOGLE_CLIENT_ID: Google Cloud Console → APIs & Services → Credentials → Create OAuth client ID → Web application. Add your site URL and http://localhost:8787 under Authorized JavaScript origins.

  • OPERATOR_NAME, CONTACT_EMAIL (and optionally CONTACT_WHATSAPP, PRO_PRICE): shown on the legal pages and on "Request Pro".

Anyone with a Google account can sign up, on the Free plan (no AI, so no cost to you). Give someone Pro, or block them, in the subscriptions table. After creating the database, make yourself Pro:

INSERT INTO subscriptions (email, plan) VALUES ('you@gmail.com', 'pro')
ON CONFLICT(email) DO UPDATE SET plan = 'pro', expires_at = NULL;
  • AI_PROVIDER / WORKERS_AI_MODEL: the Workers AI model (default), or "claude" plus the ANTHROPIC_API_KEY secret.

Run locally (Workers AI always runs on Cloudflare, even in dev, so you need wrangler login):

npm run build:web && npm run dev          # app + API on http://localhost:8787
# or, for hot reload of the UI: `npm run dev` in one terminal and `npm run dev:web` in another (http://localhost:5173)

Deploy:

npm run db:migrate:remote
npm run deploy                            # builds the web app, then deploys the Worker

Gemini (MCP)

The Worker is also a remote MCP server. In the app, go to Settings → Gemini → Connect Gemini and follow the steps. They create a private connector URL (https://<your-domain>/mcp/<key>, shown once) to add in Gemini as a custom connector with Authentication: None. The last step turns green when Gemini first uses it.

The key is part of the URL, so treat it like a password. It only works for the MCP tools, only sees its owner's data, and can be reset or disconnected in Settings. Any MCP client that accepts a URL works the same way.

Tool

What it does

get_spending_summary

Totals by category, bank, card type and day (per currency) for a month or date range

list_expenses

Filter by period, category, bank, card type, text, or added_since; includes the original SMS

get_expense

One expense with its SMS and the AI's confidence

list_messages

SMS the AI read and what it decided (recorded=false shows ignored ones). Filtered SMS are never shown

list_categories / add_category

Categories

add_expense

Cash or anything the SMS missed

update_expense

Correct any field: amount, currency, date, category, merchant, bank, card type, card/account, note

get_sms_filter / set_sms_filter

Read the filter, switch "only with an amount" / "only tracked senders"

track_sender / untrack_sender

Manage tracked sender patterns (untracking keeps recorded data)

preview_backfill / run_backfill

Counts of earlier filtered SMS that now match; process them only after the user agrees

There's no delete tool on purpose. Deleting is done in the app.

API

Public:

Method

Path

Notes

GET

/auth/config

Google client ID for the sign-in button

POST

/auth/google

{ "credential": "<Google ID token>" } → { token, expires_at, user }

POST

/hooks/sms/<secret>?sender=COMBANK

Webhook for SMS forwarders. Body: the raw SMS text (text/plain), or JSON / form with body, sender, received_at. → 201 new, 200 duplicate, 502 AI failure (resend to retry)

Everything under /api/* needs Authorization: Bearer <session token> and is scoped to the signed-in user:

Method

Path

Notes

GET

/api/me

Current user

POST

/api/auth/logout

Revokes the current session

GET/POST/DELETE

/api/tokens[/:id]

Keys: ?type=device (webhook secret) or ?type=mcp (Claude API key). Create with { "name", "type" }; the key is returned once

POST

/api/sms

Same as the webhook, with a bearer token

GET

/api/sms?kind=otp&expense=yes|no&before=<id>

Message log with the decision and linked expense

GET

/api/sms/:id

One message

GET

/api/expenses?from=&to=&category=&bank=&card_type=

Expenses, with linked SMS sender

GET

/api/expenses/summary?from=&to= (or ?month=YYYY-MM)

Totals plus breakdowns by category, bank, card type and day (per currency)

GET/PATCH/DELETE

/api/expenses/:id

PATCH { category, bank, card_type, amount, merchant, ... }

POST

/api/expenses

Manual expense

GET/POST

/api/categories

Built-in plus your own categories

Tests

  • npm test: offline API and unit tests against an in-memory D1 (Google and the AI are faked).

  • npm run eval: scores real Workers AI models on 18 sample SMS (evals/sms-cases.ts). Uses your Cloudflare account. Pick models with MODELS="@cf/a,@cf/b"; if you have several accounts, set CLOUDFLARE_ACCOUNT_ID.

Demo data

scripts/demo-data.mjs creates a realistic month of expenses, messages (OTPs, refunds, a failed one, filtered ones) and filter rules for one user, who must have signed in once:

node scripts/demo-data.mjs you@gmail.com > demo.sql && npx wrangler d1 execute ayyosalli --remote --file demo.sql
node scripts/demo-data.mjs you@gmail.com --cleanup > clean.sql && npx wrangler d1 execute ayyosalli --remote --file clean.sql   # remove it again

CI/CD

GitHub Actions (.github/workflows/ci.yml):

  • Every push and pull request: npm ci, typecheck, tests, web build.

  • Push to main: after the checks pass, applies D1 migrations, deploys the Worker and web app, then runs a quick smoke test. Deployments run one at a time.

It needs one repository secret, CLOUDFLARE_API_TOKEN: a Cloudflare API token from the Edit Cloudflare Workers template, plus D1: Edit, for the XTECLK account and the xtec.lk zone.

Plans: Free and Pro

  • Free: forwarded SMS still go through the sender filter, then wait in Messages → To review with a "tap to add" push notification. The user adds the expense with the same form used for editing (pre-filled with simple patterns, no AI).

  • Pro: the AI reads SMS that pass the filter and records expenses automatically, and the Gemini connector works.

There's no admin panel: manage the subscriptions and invoices tables with SQL in the Cloudflare D1 console. Ready-to-use statements are at the top of migrations/0004_plans.sql. People without a subscriptions row are on Free. Users see their plan, expiry date and invoices on the Profile tab.

Privacy policy and terms

The Worker serves public /privacy and /terms pages, linked from the sign-in screen and usable as the links on Google's OAuth consent screen. Set OPERATOR_NAME and CONTACT_EMAIL in wrangler.toml so they name who runs your server and where to send data requests. The texts are a sensible starting point, not legal advice.

License

MIT

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    • Log, query, and edit expenses, budgets, and accounts in Manilo from any MCP-compatible AI assistant.

      https://api.manilo.app/mcp
    • Log, query, and edit expenses, budgets, and accounts in Manilo (formerly Ledgy) from any MCP-compatible AI assistant.

      https://api.ledgy.app/mcp
    • Read-only Lunch Money accounts, transactions, categories and budgets. Unofficial connector.

      https://mcp.lunchmoney.sh/mcp
    • Review accounting data and available financial records within your authorized workspace. This listing retains the complete 18-tool Accounting service and its existing full endpoint. For new tasks, start with Samuelz® Accounting · Evidence checks. Choose from Evidence checks, Individual reminder, Cost allocation, Existing reminder run at https://platform.samuelz.com/integrations?lang=en#accounting. Each task view is a subset, not a replacement for the full service. Existing URLs and conversations keep working. Changing views grants no additional rights and does not migrate a running conversation. Prepared operations keep their identity and approval requirements; read their status before any recovery. Setup: In a remote MCP client that supports Streamable HTTP and OAuth, add https://platform.samuelz.com/api/v1/mcp/operator?toolset=accounting. Sign in to Samuelz and select your authorized workspace. Active workspace membership and the relevant module permissions are required. Review requested permissions before authorizing. Existing human approvals and separate cost permissions continue to apply.

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Exposes personal-finance tools like accounts, transactions, spending analysis, budgets, bills, reminders, portfolio, and goals via MCP, enabling any MCP client to query financial data.
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables managing and analyzing personal expenses through MCP tools, including adding expense records, listing expenses within date ranges, and summarizing spending by category, with expense categories exposed as an MCP resource.
      -
    • F
      license
      B
      quality
      D
      maintenance
      Enables users to manage personal expenses by adding entries, listing them by date range, and summarizing spending by category through MCP tools, while exposing category data as a resource.
      3
      -