// Avoid
```
***
## Database changes
Use Drizzle migrations:
```bash theme={null}
# Generate migration
pnpm --filter @zero-finance/web db:generate
# Apply migration
pnpm --filter @zero-finance/web db:migrate
```
***
## Testing the CLI locally
Build and link the CLI:
```bash theme={null}
cd packages/cli
pnpm build
pnpm link --global
```
Point to your local server:
```bash theme={null}
zero auth login --api-key sk_test_xxx --base-url http://localhost:3050
```
***
## Useful scripts
| Script | Description |
| ----------------- | ---------------------------- |
| `pnpm dev` | Start all dev servers |
| `pnpm dev:lite` | Start with lite Docker stack |
| `pnpm build` | Build all packages |
| `pnpm lint` | Run ESLint |
| `pnpm typecheck` | Run TypeScript checks |
| `pnpm format` | Check Prettier formatting |
| `pnpm format:fix` | Fix formatting issues |
***
## Getting help
* Check existing issues on [GitHub](https://github.com/different-ai/zero-finance/issues)
* Ask in the team Slack/Discord
* Review the codebase — most patterns are self-documenting
# Introduction
Source: https://docs.0.finance/index
Manage your finances from the command line with the 0 Finance CLI
## What is 0 Finance?
0 Finance is a bank account built for the AI era:
* **Get paid easily** — Create invoices in seconds and receive payments to your personal IBAN or ACH account.
* **Spend anywhere** — Use a debit card worldwide with 0% conversion fees.
* **Optimize yield** — AI automatically allocates idle funds to the highest-yielding opportunities.
Everything is programmable through the **`zero` CLI** (alias: `zero-bank`) — check balances, send invoices, propose transfers, and manage savings from your terminal.
***
## Quick start
```bash theme={null}
# Install the CLI
curl -fsSL https://zerofinance.ai/install | bash
# Or: bun add -g agent-bank
# Connect the CLI (opens a browser)
zero auth connect
# Or: zero auth login --api-key sk_live_xxx
# Debug request URLs:
# zero --debug auth whoami
# Check your balance
zero balance
# Create and send an invoice
zero invoices create \
--recipient-email client@example.com \
--amount 1000 \
--currency USD \
--description "Consulting services"
zero invoices send --invoice-id inv_xxx
```
Get up and running with the `zero` CLI in under a minute.
Complete command reference with examples.
Let AI agents manage your finances with human approval.
Direct HTTP API access for custom integrations.
***
## What you can do
### Check your balance
```bash theme={null}
zero balance
```
```json theme={null}
{
"idle_balance": "3200.00",
"earning_balance": "4220.50",
"spendable_balance": "7420.50",
"safe_address": "0x954A329e1e59101DF529CC54A54666A0b36Cae22",
"chain": "base"
}
```
### Create and send invoices
```bash theme={null}
# Create an invoice
zero invoices create \
--recipient-email client@acme.com \
--recipient-name "Acme Corp" \
--amount 2500 \
--currency USD \
--description "Q1 consulting"
# Send it
zero invoices send --invoice-id inv_xxx
```
### Propose a bank transfer
```bash theme={null}
# List your saved bank accounts
zero bank accounts list
# Propose a transfer (requires dashboard approval)
zero bank transfers propose \
--amount 1000 \
--currency usd \
--bank-account-id ba_xxx \
--reason "Contractor payment"
```
### Manage savings
```bash theme={null}
# View available vaults
zero vaults list
# Deposit into a yield vault
zero savings deposits propose \
--vault-address 0x... \
--amount 500 \
--reason "Earning yield on idle funds"
# Check your positions
zero savings positions
```
***
## How it works
1. **Authenticate** — Use `zero auth connect` (or `zero auth login` with an API key).
2. **Execute commands** — Read operations happen instantly. Transfers and withdrawals create proposals.
3. **Approve in dashboard** — Proposals require human approval before executing. This keeps you in control.
The CLI never moves money without your explicit approval in the 0 Finance
dashboard.
***
## For AI agents
Connect your AI assistant to 0 Finance using the MCP server. Your agent can check balances, create invoices, and propose transfers — but all outbound payments still require your approval.
```json theme={null}
{
"mcpServers": {
"zero-finance": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://0.finance/api/mcp"],
"env": {
"API_KEY": "sk_live_xxx"
}
}
}
}
```
MCP currently supports bank transfers, invoices, attachments, and payment
details. For crypto transfers and savings, use the CLI or HTTP API.
See [MCP setup](/mcp/overview) for detailed instructions.
***
## Documentation map
| Section | What's inside |
| ----------------- | ------------------------------------------------ |
| **CLI** | Installation, authentication, command reference |
| **MCP** | AI agent setup for Cursor, Claude Code, Windsurf |
| **API Reference** | HTTP endpoints for custom integrations |
# Claude Code
Source: https://docs.0.finance/mcp/claude-code
Connect Claude Code to the 0 Finance MCP server
## Prerequisites
* [Claude Code](https://claude.ai/code) or Claude Desktop installed
* 0 Finance API key from [Settings → API Keys](https://0.finance/settings)
***
## Step 1: Create the config file
Create or edit `~/.claude/claude_desktop_config.json`:
```json theme={null}
{
"mcpServers": {
"zero-finance": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://0.finance/api/mcp"],
"env": {
"API_KEY": "sk_live_your_api_key_here"
}
}
}
}
```
***
## Step 2: Restart Claude
Quit and reopen Claude to load the new MCP server.
***
## Step 3: Verify
Ask Claude to check your balance:
```
Check my 0 Finance balance
```
Claude should call `get_balance` and display your USDC balance.
***
## Add to CLAUDE.md
For project-specific context, add this to your `CLAUDE.md`:
```markdown theme={null}
## 0 Finance Integration
This project uses 0 Finance for payments. When working with finances:
- Use `get_balance` before proposing transfers
- Transfers require dashboard approval—never claim funds moved
- Use `create_invoice` for billing clients
- Use `get_payment_details` to share receiving info
```
***
## Available tools
Once connected, Claude has access to all 0 Finance tools:
| Tool | Description |
| -------------------------- | ------------------------------ |
| `get_balance` | Get spendable USDC balance |
| `list_saved_bank_accounts` | List saved bank accounts |
| `propose_bank_transfer` | Propose an outbound transfer |
| `create_invoice` | Create a new invoice |
| `send_invoice` | Send invoice to recipient |
| `list_invoices` | List invoices |
| `get_payment_details` | Get IBAN/ACH receiving details |
| `share_payment_details` | Email payment details |
See the [full tool list](/mcp/overview#available-tools) for all available tools.
***
## Troubleshooting
### "MCP server not found"
1. Check that `~/.claude/claude_desktop_config.json` exists
2. Verify the JSON is valid (no trailing commas)
3. Restart Claude completely (quit and reopen)
### "Tool execution failed"
1. Verify your API key is valid
2. Check the Claude output for specific error messages
3. Ensure you have network connectivity
### Slow responses
The MCP server connects over HTTPS. If responses are slow:
1. Check your internet connection
2. Try a different network
3. The first request may be slower due to npx package download
# Cursor
Source: https://docs.0.finance/mcp/cursor
Connect Cursor to the 0 Finance MCP server
## Prerequisites
* [Cursor](https://cursor.sh) installed
* 0 Finance API key from [Settings → API Keys](https://0.finance/settings)
***
## Step 1: Create the config file
Create or edit `~/.cursor/mcp.json`:
```json theme={null}
{
"mcpServers": {
"zero-finance": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://0.finance/api/mcp"],
"env": {
"API_KEY": "sk_live_your_api_key_here"
}
}
}
}
```
***
## Step 2: Restart Cursor
Quit and reopen Cursor to load the new MCP server.
***
## Step 3: Verify
In a new chat, ask Cursor to check your balance:
```
Check my 0 Finance balance
```
Cursor should call `get_balance` and show your USDC balance.
***
## Add the starter prompt
For best results, add this to your Cursor rules (`.cursorrules` or project settings):
```text theme={null}
When using 0 Finance tools:
- Always call get_balance before proposing transfers
- Never claim funds have moved—transfers require dashboard approval
- Confirm amounts and recipients before creating proposals
```
***
## Available tools
Once connected, Cursor has access to these tools:
| Tool | Description |
| -------------------------- | ------------------------------ |
| `get_balance` | Get spendable USDC balance |
| `list_saved_bank_accounts` | List saved bank accounts |
| `propose_bank_transfer` | Propose an outbound transfer |
| `create_invoice` | Create a new invoice |
| `send_invoice` | Send invoice to recipient |
| `list_invoices` | List invoices |
| `get_payment_details` | Get IBAN/ACH receiving details |
| `share_payment_details` | Email payment details |
See the [full tool list](/mcp/overview#available-tools) for all available tools.
***
## Troubleshooting
### "MCP server not found"
1. Check that `~/.cursor/mcp.json` exists and is valid JSON
2. Verify `npx` is available in your PATH
3. Restart Cursor
### "Authentication failed"
1. Verify your API key is correct
2. Check the key hasn't expired in [Settings → API Keys](https://0.finance/settings)
3. Ensure there are no extra spaces in the key
### "Tool call failed"
Check the Cursor output panel for error messages. Common issues:
* Rate limiting (wait and retry)
* Invalid parameters (check the tool documentation)
* Network issues (verify internet connection)
# MCP for AI Agents
Source: https://docs.0.finance/mcp/overview
Let AI agents manage your finances with human approval
## What is MCP?
The Model Context Protocol (MCP) lets AI assistants connect to external tools and services. The 0 Finance MCP server gives your AI agent access to:
* Check balances and transaction history
* Manage invoices (create, update, send)
* Propose bank transfers for approval
* Attach receipts and share payment details
All transfers require human approval in the dashboard. Your AI agent can
propose actions, but you stay in control.
***
## Quick setup
Add this to your MCP client configuration:
Add to `~/.cursor/mcp.json`:
```json theme={null}
{
"mcpServers": {
"zero-finance": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://0.finance/api/mcp"],
"env": {
"API_KEY": "sk_live_xxx"
}
}
}
}
```
Add to `~/.claude/claude_desktop_config.json`:
```json theme={null}
{
"mcpServers": {
"zero-finance": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://0.finance/api/mcp"],
"env": {
"API_KEY": "sk_live_xxx"
}
}
}
}
```
Add to `~/.codeium/windsurf/mcp_config.json`:
```json theme={null}
{
"mcpServers": {
"zero-finance": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://0.finance/api/mcp"],
"env": {
"API_KEY": "sk_live_xxx"
}
}
}
}
```
Replace `sk_live_xxx` with your API key from [Settings → API Keys](https://0.finance/settings).
***
## Available tools
| Tool | Description |
| -------------------------- | ------------------------------ |
| `list_saved_bank_accounts` | List saved bank accounts |
| `get_balance` | Get spendable USDC balance |
| `propose_bank_transfer` | Propose an outbound transfer |
| `list_proposals` | List transfer proposals |
| `dismiss_proposal` | Dismiss a proposal |
| `create_bank_account` | Save a new bank account |
| `create_invoice` | Create a new invoice |
| `update_invoice` | Update an invoice |
| `list_invoices` | List invoices |
| `get_invoice` | Get invoice details |
| `send_invoice` | Send invoice to recipient |
| `list_transactions` | List transaction history |
| `get_transaction` | Get transaction details |
| `attach_document` | Attach a file to a transaction |
| `list_attachments` | List attachments |
| `remove_attachment` | Remove an attachment |
| `get_payment_details` | Get IBAN/ACH receiving details |
| `share_payment_details` | Email payment details |
MCP currently focuses on bank transfers and invoices. For crypto transfers and
savings actions, use the CLI or HTTP API.
***
## Starter prompt
Add this to your AI client's system prompt for best results:
```text theme={null}
You are an assistant connected to the 0 Finance MCP server.
## Before proposing transfers
1. Call `get_balance` to check available USDC.
2. Call `list_saved_bank_accounts` to see destination options.
## Transfers
- Use `propose_bank_transfer` to create a transfer proposal.
- Never claim funds have moved—transfers require user approval in the dashboard.
- Use `attach_document` to link invoices or receipts to proposals.
## Invoices
- Use `create_invoice` to draft an invoice.
- Use `send_invoice` to email it to the recipient.
- Use `list_invoices` and `get_invoice` to check status.
## Receiving payments
- Use `get_payment_details` to retrieve the user's IBAN/ACH info.
- Use `share_payment_details` to email those details to a third party.
## Style
- Summarize results clearly.
- Ask before taking destructive or high-value actions.
- Always confirm amounts and recipients before proposing transfers.
```
***
## Example conversation
**You:** Check my balance and pending invoices
**Agent:**
> I'll check your balance and invoices.
>
> **Balance:** 5,420.50 USDC spendable
>
> **Pending invoices:**
>
> * INV-001: \$2,500 from Acme Corp (due Jan 20)
> * INV-002: \$1,000 from Beta Inc (overdue)
**You:** Send a reminder to Beta Inc
**Agent:**
> I've sent a reminder email to Beta Inc for invoice INV-002 (\$1,000).
**You:** Once that's paid, move \$3,000 to my EUR account
**Agent:**
> I'll propose a transfer of \$3,000 to your EUR account (ending in ...4521).
>
> ⚠️ This transfer requires your approval in the dashboard before it executes. Would you like me to create the proposal?
***
## Security model
1. **Read operations** — Balance, invoices, transactions execute immediately
2. **Transfer proposals** — Bank transfers require dashboard approval
3. **Immediate actions** — Invoice creation and sending happen instantly
4. **Audit trail** — Every action is logged with the API key used
Never share your API key. It provides full read access and can create
proposals on your behalf.
***
## Client-specific guides
Detailed Cursor setup
Claude Desktop setup
Windsurf setup
# Windsurf
Source: https://docs.0.finance/mcp/windsurf
Connect Windsurf to the 0 Finance MCP server
## Prerequisites
* [Windsurf](https://codeium.com/windsurf) installed
* 0 Finance API key from [Settings → API Keys](https://0.finance/settings)
***
## Step 1: Create the config file
Create or edit `~/.codeium/windsurf/mcp_config.json`:
```json theme={null}
{
"mcpServers": {
"zero-finance": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://0.finance/api/mcp"],
"env": {
"API_KEY": "sk_live_your_api_key_here"
}
}
}
}
```
***
## Step 2: Restart Windsurf
Quit and reopen Windsurf to load the new MCP server.
***
## Step 3: Verify
In Cascade, ask Windsurf to check your balance:
```
Check my 0 Finance balance
```
Windsurf should call `get_balance` and display your USDC balance.
***
## Available tools
Once connected, Windsurf has access to all 0 Finance tools:
| Tool | Description |
| -------------------------- | ------------------------------ |
| `get_balance` | Get spendable USDC balance |
| `list_saved_bank_accounts` | List saved bank accounts |
| `propose_bank_transfer` | Propose an outbound transfer |
| `create_invoice` | Create a new invoice |
| `send_invoice` | Send invoice to recipient |
| `list_invoices` | List invoices |
| `get_payment_details` | Get IBAN/ACH receiving details |
| `share_payment_details` | Email payment details |
See the [full tool list](/mcp/overview#available-tools) for all available tools.
***
## Troubleshooting
### "MCP server not found"
1. Check that `~/.codeium/windsurf/mcp_config.json` exists
2. Verify the JSON is valid
3. Restart Windsurf
### "Authentication error"
1. Verify your API key in the config
2. Check the key is active in [Settings → API Keys](https://0.finance/settings)
### Cascade not finding tools
1. Make sure you're using Cascade (the AI assistant)
2. Try explicitly asking "Use the 0 Finance tools to check my balance"
3. Restart Windsurf if tools aren't appearing
# Development Setup
Source: https://docs.0.finance/quickstart
Run 0 Finance locally for development
This guide is for developers contributing to 0 Finance. If you just want to
use the CLI, see [Installation](/cli/installation).
## Prerequisites
* Node.js v22.11+
* pnpm
* Docker (for local database)
***
## Clone and bootstrap
```bash theme={null}
git clone https://github.com/different-ai/zero-finance.git
cd zero-finance
./scripts/bootstrap.sh
```
The bootstrap script:
1. Installs Node.js and pnpm if missing
2. Runs `pnpm install`
3. Sets up required tooling
***
## Environment setup
Copy the example environment file:
```bash theme={null}
cp packages/web/.env.example packages/web/.env.local
```
Ask the team for the required secrets:
* `DATABASE_URL` — Postgres connection string
* `PRIVY_APP_ID` and `PRIVY_APP_SECRET` — Auth provider
* `BRIDGE_API_KEY` — Payment rails
* Other service credentials
***
## Start the dev server
```bash theme={null}
pnpm dev
```
The web app runs on [http://localhost:3050](http://localhost:3050).
***
## Verify the setup
```bash theme={null}
curl http://localhost:3050/api/health
```
Expected response:
```json theme={null}
{
"status": "ok",
"timestamp": "2026-01-12T00:00:00.000Z",
"message": "Server is running"
}
```
***
## Alternative: Lite stack
For a minimal Docker-based setup:
```bash theme={null}
pnpm dev:lite
```
This uses `docker-compose.lite.yml` with local Postgres and mock services.
***
## Quality checks
```bash theme={null}
# Type checking
pnpm typecheck
# Linting
pnpm lint
# Tests
pnpm --filter @zero-finance/web test
# Build
pnpm --filter @zero-finance/web build
```
***
## Next steps
Test the CLI against your local server.
Understand the HTTP API.