Skip to main content
Glama
FoxRick

paygentic

by FoxRick
README.md
# PayGent SDK

Financial infrastructure for AI agents. Give your agents native tools to earn, send, and manage money.

- **SDK**: `npm install paygentic-sdk` — typed REST client for Node.js & browsers
- **MCP Server**: `npx paygentic-sdk` — Model Context Protocol server with 13 tools

## Quick Start

### SDK (code)

```ts
import { PayGent } from 'paygentic-sdk';

const paygent = new PayGent({ apiKey: 'pg_live_...' });

// Check balance
const wallet = await paygent.getWallet('wallet-id');
console.log(wallet.balance);

// Send money
await paygent.sendMoney({
  fromWalletId: 'wallet-a',
  toWalletId: 'wallet-b',
  amount: 3.50,
  description: 'API cost reimbursement'
});

// Create invoice
const invoice = await paygent.createInvoice({
  walletId: 'wallet-a',
  amount: 15.00,
  title: 'Data export task'
});
console.log(invoice.paymentUrl);

// Sign up (no API key needed)
const account = await paygent.signup({
  email: 'bot@example.com',
  password: 'secure-password-123',
  agentName: 'my-first-agent'
});
console.log(account.apiKey);
```

### MCP Server (agent tools)

Add to your MCP client config:

```json
{
  "mcpServers": {
    "paygentic": {
      "command": "npx",
      "args": ["-y", "paygentic-sdk"],
      "env": {
        "PAYGENTIC_API_KEY": "pg_live_xxxxxxxxxxxx",
        "PAYGENTIC_BASE_URL": "https://paygentic-one.vercel.app"
      }
    }
  }
}
```

Then ask your agent:

- "Sign me up for PayGent"
- "What's my wallet balance?"
- "Send $3.50 to my transcription agent"
- "Create an invoice for $15 for the data export task"
- "Set a daily spending cap of $50 on my research agent"
- "Show me the audit log for the last 7 days"

## MCP Tools

| Tool | Description | Auth |
|------|-------------|------|
| `paygentic_signup` | Create account + wallet + API key | None |
| `paygentic_check_balance` | Get wallet balance and status | API key |
| `paygentic_list_wallets` | List all your wallets | API key |
| `paygentic_create_wallet` | Create a new wallet | API key |
| `paygentic_send_money` | Send money between wallets (previews first) | API key |
| `paygentic_create_invoice` | Create a public invoice anyone can pay | API key |
| `paygentic_list_invoices` | List invoices | API key |
| `paygentic_request_payment` | Agent-initiated spend (policy-checked) | API key |
| `paygentic_set_policy` | Add spending limits to a wallet | API key |
| `paygentic_list_policies` | List spending policies | API key |
| `paygentic_get_audit_log` | Read the immutable audit trail | API key |
| `paygentic_get_transactions` | Get transaction history | API key |
| `paygentic_get_dashboard` | Dashboard overview | API key |

## Configuration

| Env Variable | Default | Description |
|-------------|---------|-------------|
| `PAYGENTIC_API_KEY` | — | Your agent API key (`pg_live_...`) |
| `PAYGENTIC_BASE_URL` | `http://localhost:3000` | PayGent API base URL |

## License

MIT — UNCONSTRAINED.CAPITAL LTD

TDQS

A3.5/5.0

Scored across 13 tools

Disambiguation5/5

Each tool has a well-defined and distinct purpose, covering wallet management, invoices, policies, transactions, and account setup. Even similar actions like sending money and requesting payment are clearly differentiated by their descriptions.

Naming Consistency5/5

All tools follow a consistent `verb_noun` pattern with the `paygentic_` prefix. The verbs are clear and the nouns are specific, making the tool names predictable and easy to interpret.

Tool Count5/5

With 13 tools, the server covers a comprehensive set of operations for a payment/wallet system without being overwhelming. The count is well within the typical 3-15 range for a focused service.

Completeness4/5

The server covers core operations like creating wallets, handling invoices, setting policies, and sending money. Minor gaps exist, such as missing update/delete for wallets and invoices, but these are not critical for basic functionality.

Maintenance

ActivityStale
ResponsivenessNo issues