Client for reading records from a granted local database without modifying it; plans and receipts come from the Pauhu demo backend.
Reading this repository is free. Using the Pauhu demo backend needs a free Pauhu developer key. Get a free Pauhu developer key by signing in with GitHub at https://api.pauhu.dev/v1/dev/github/start (terms: https://pauhu.dev/developer-terms/) (valid 90 days, 50 requests a day reset 00:00 UTC, at most 5 a minute). Requests go to the Pauhu demo backend; without a key it returns no result.
- AI assistants: read AGENTS.md.
- MCP clients: server.json (remote, header
Authorization: Bearer <key>).
Status: version 0.1.0, a command line client (pauhu-db). Licence: Apache-2.0.
Copyright © 2026 Pauhu Ltd. Written and maintained by Pauhu Ltd.
- Get a free Pauhu developer key by signing in with GitHub at https://api.pauhu.dev/v1/dev/github/start (terms: https://pauhu.dev/developer-terms/)
- Set it in your own shell:
export PAUHU_DEV_KEY=...(never commit it). - Run one of
bash examples/quickstart.sh,node examples/quickstart.mjsorpython3 examples/quickstart.py. Each lists the tools the backend offers you. - Connect your AI coding tool with examples/mcp-config.json or server.json.
Without a key the examples stop with a message and the backend returns no answers.
For developers and analysts working with SQL databases. The client provides a way to ask questions about database contents. The intended scope is limited to tables you grant access to. Pauhu provides the knowledge engine behind the answers.
ask: Questions about data.
How can I calculate monthly revenue from an orders table without changing its contents?
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ask",
"arguments": {
"question": "How can I calculate monthly revenue from an orders table without changing its contents?"
}
}
}Arguments are illustrative; run quickstart to see each tool's schema.
- Free developer key: 50 requests a day.
- The local database is opened read-only; only tables you list are read, at most 200 rows each.
- The backend does not run SQL on your database; it receives the rows the client sends.
This repository is one item on the Pauhu Menu, which lists every Pauhu repository and the developer key terms in one place.
Fork this base pack and add your own tools; see EXTENDING.md. Keep the LICENSE and NOTICE files.
Needs Python 3.9+ and nothing else (standard library only).
pip install .
read -rs PAUHU_DEV_KEY && export PAUHU_DEV_KEY # paste your Pauhu developer key, never commit it
printf 'orders\ncustomers\n' > allow.txt
pauhu-db tables --allow allow.txt
pauhu-db tools # lists the backend tools
pauhu-db ask --tool ask --db shop.sqlite --allow allow.txt "Which customers ordered twice?"
pauhu-db ask --tool ask --db shop.sqlite --allow allow.txt --table orders --limit 100 "Summarise these orders"The database is opened read-only. Only tables listed in allow.txt are read, and only ordinary tables: views, virtual tables (such as FTS5) and their shadow tables are refused, and table kinds are checked in the same read transaction as the reads (needs SQLite 3.37 or newer). At most 200 rows per table are read with a plain SELECT. BLOB values are sent as {"$blob_base64": "..."}; non-finite numbers stop the run. The question and the selected rows are sent to the Pauhu backend; the rest of the database is not.
The client does initialize, initialized, tools/call (MCP JSON-RPC, protocol 2025-06-18) and prints the reply. Without PAUHU_DEV_KEY it exits with code 2. It does not follow redirects, stops on a reply over 8 MiB or a request over 120 s, and treats a reply as an error unless it is JSON-RPC 2.0 with one result or error for the request id. The client replaces your key with [key] in the reply text it prints and prints fixed messages for its own errors; a key with characters that are not allowed in an HTTP header is refused before any request. This is not a guarantee that the key can never appear anywhere. These checks are covered by the tests in tests/; they are not an audit or a security guarantee. Run the tests with python3 -m pytest -q.