khata
Ingests and parses Google Pay UPI statement PDFs into a local transaction ledger, enabling AI agents to search, summarize, and run read-only SQL queries over Google Pay payment history.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
khata
Your UPI payment history as a local ledger that AI agents can query through MCP.
khata reads the statements and activity exports that UPI apps already give you, turns every payment into one clean transaction table on your machine, and lets Claude Code, Codex, or any MCP client answer questions like "how much did I spend in June, and on whom?" from it.
khata never signs in to a payment app, never acts inside a payment-app session, and never asks for a UPI PIN or OTP.
Status
Early development.
UPI app | Status |
Google Pay | Statement PDF and Google Takeout supported |
PhonePe | Planned |
Paytm | Planned |
Related MCP server: mbank-parser-mcp
Install
The plugin gives Claude Code or Codex the khata MCP server plus skills for setting it up and answering from it.
claude plugin marketplace add Karan-Palan/khata
claude plugin install khata@khatacodex plugin marketplace add Karan-Palan/khata
codex plugin add khata@khataThen ask your agent to "set up khata with my Google Pay history".
For any other MCP client, run the server as npx -y khata mcp. The command line is the same program: npx -y khata <command>, or npm install -g khata for a khata command. khata needs Node.js 18 or later to install, and runs on macOS and Linux (glibc) on arm64 and x64, and on Windows on x64.
Add your history
Two Google Pay sources, best used together:
Statement PDF for a verified period: in the Google Pay app, See transaction history, then More, then Get statement. A statement whose totals do not add up is rejected whole.
Google Takeout for years of history: at takeout.google.com, Deselect all, select Google Pay and My Activity (only Google Pay, JSON format), and export. Ingest the zip, the unzipped
Takeoutfolder, orMyActivity.json. Only completed payments count.
khata ingest ~/Downloads/gpay_statement.pdf ~/Downloads/Takeout
khata statusWithin a statement's period only the statement counts; Takeout fills every other day. Ingesting the same file twice changes nothing, and the result is the same whatever order files arrive in. After upgrading khata, khata reparse rebuilds every transaction with the newest parsers.
Keep it current
khata sources add-folder ~/Downloads # pick up statements and Takeout exports you download
khata auth google --client-file client.json # read-only Gmail attachments and Takeout zips in Drive
khata sync # collect anything new from every source
khata schedule enable # run sync every 6 hours on this MacFiles that are not statements are checked once and remembered, so later syncs skip them. Choosing Takeout's Add to Drive, every 2 months, makes new history arrive with no clicks. See docs/integrations/google-sign-in.md for creating the Google client. Ledger files are readable only by you.
The ledger lives in ~/.khata/khata.db. Set KHATA_HOME to keep it elsewhere.
Postgres and hosting
khata database connect moves the ledger to Postgres, for example Neon, reading the connection URL from stdin and keeping it in your Keychain. khata ingest ~/.khata/khata.db then copies your existing ledger across. khata serve runs the read-only MCP tools over HTTP behind a bearer token, ready to deploy on Fly.io with the Dockerfile and fly.toml here. See docs/hosting.md.
MCP tools
Tool | What it does |
| Where the ledger is, how many statements and transactions it holds, and the dates it covers |
| Individual payments filtered by date, direction, counterparty, or amount, 50 per page |
| Money sent and received grouped by month, counterparty, funding account, or UPI app |
| One read-only SQL query, up to 200 rows |
| Add statement PDFs and Google Takeout exports |
| Collect and ingest anything new from watched folders, Gmail, and Drive |
Development
Requires Bun 1.3 or later.
bun install
bun run khata status # the CLI from source
bun run check:ci # lint, types, comment check, and tests
bun run --cwd apps/cli build:npm # compile the npm packages into apps/cli/dist/npmSee AGENTS.md for how this repository is built, CONTEXT.md for its vocabulary, and docs/releasing.md for releases.
License
This server cannot be deployed
Maintenance
Related MCP Connectors
Personal finance ledger for AI agents — query spending, track bills, forecast cash flow.
Read-only finance MCP server. Connects your banks, cards, payment apps, books and payroll into one ledger for your AI. Can't move money. Open source (AGPL-3.0), free during beta.
Personal finance for AI agents — onboard, import statements, categorize & budget over MCP.
Chat with your bank data: balances, transactions, budgets, bills. Reads only, never moves money.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceParse and query investment statements from multiple institutions (Questrade, Interactive Brokers, Scotia) using natural language or structured queries. Supports semantic search for dividends, holdings, transactions, and account balances with hybrid SQLite and vector database storage.-
- AlicenseAqualityBmaintenanceEnables parsing and filtering of mBank CSV operation exports locally. Supports data aggregation and querying through natural language, running entirely offline with no network calls.31MIT

bankstatementlyofficial
AlicenseAqualityAmaintenanceParse and query bank statements — turn PDF statements into structured transactions, accounts, and balances, with balance-reconciliation checks. A deterministic financial memory for AI agents, served as a hosted streamable-HTTP endpoint (API key or OAuth).181MIT- AlicenseNot gradedqualityBmaintenanceEnables querying your own local bank and credit card statement files (CSV or PDF) in plain language, so you can discover forgotten recurring subscriptions, compare spending across months and quarters, and look up transactions without any bank logins or network calls.MIT