# AiFinPay [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/AiFinPay/sdk  
**GitHub Stars:** 3  
**npm Downloads (last month):** 2917  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/aifinpay

## Description
Pay for any HTTP API in stablecoins on Polygon and Solana with one MCP call.

## Tools
Capabilities this server exposes over MCP:

- **agent_address** — Return the agent's currently derived on-chain addresses. This tool is read-only and never authorizes or signs a payment. Production value movement is available only through the verified SDK v2 settlement executor after trusted deployment pins are released.
- **agent_claim_self** — Link this agent to its owner's AiFinPay dashboard, so the owner sees the agent's balance, payments and receipts. Offer this after creating a wallet. The owner generates a one-time URL at https://dash.aifinpay.io → My Agents → Link an agent → Claim via MCP and gives it to you; pass it here. Do not open the URL in a browser tool: that links nothing. The tool signs only an AiFinPay claim challenge for this agent's own address and moves no funds.
- **agent_reload** — Reload the configured local wallet files after init or a file update, without starting a new conversation. Returns public addresses only. With payments on (the default) it also opens the payment journal for the loaded wallet, so a server that started with an ephemeral wallet can pay right after init, without a restart. Env changes (owner overrides, AIFINPAY_PAYMENTS_ENABLED=0) take effect only after the client restarts the aifinpay MCP server; agent_reload does not read them.
- **payment_setup_status** — Read-only checklist for paying with payable_fetch: wallet (persistent or ephemeral), whether payments are on, the ceiling and each limit with its source (built-in default or the owner's env), the wallet's native balance on the pay chain when readable, the owner's dashboard Controls in `dashboard`, and next_step — exactly one instruction for the first unmet item. First payment in five steps: (1) GET the resource and read its 402 (merchant, price, smallest batch); (2) call payment_setup_status; (3) no persistent wallet: run `npx @aifinpay/mcp init` without a terminal, put its printed env into the MCP client config, then call agent_reload (no restart: payments are on by default); (4) tell the owner the address and the amount in `funding` (the smallest batch at today's rate plus the gas cap; if no rate could be read, ask for the batch price in the native currency at today's rate plus the gas cap and name no number), and offer the dashboard link so the owner can claim the agent (agent_claim_self) and set the working limits in Controls; (5) payable_fetch the URL. Payments are on by default within a built-in ceiling of $5 per payment and $20 per 24 hours, only through a persistent wallet, only to merchants registered with AiFinPay via a quote signed by its backend; an unfunded wallet spends nothing. AIFINPAY_MAX_USD and AIFINPAY_DAILY_USD can only lower that ceiling; AIFINPAY_PAYMENTS_ENABLED=0 turns payments off; AIFINPAY_GATEWAY_ORIGINS, when set, is the only list of payable sites. Moves nothing and signs no payment: for a persistent wallet it signs one short AiFinPay read statement to fetch the owner's Controls. Never asks the owner's limits from the model.
- **payable_fetch** — Fetch a GET resource from an AiFinPay merchant, paying its AIFP-1 402 when needed. Always listed: until a persistent wallet exists (npx @aifinpay/mcp init, then agent_reload) it signs nothing and returns the payment_setup_status checklist with the one next step. Payments are on by default within a built-in ceiling of $5 per payment and $20 per 24 hours (the owner can only lower it in env; the working limits are the dashboard Controls after agent_claim_self) and only ever reach a merchant registered with AiFinPay, through a quote signed by the AiFinPay backend; a 402 never chooses who is paid. Without AIFINPAY_GATEWAY_ORIGINS it pays only a merchant whose site AiFinPay reports as DNS-verified, on that very site (or through the AiFinPay hosted gateway); with it, only the origins the owner listed; AIFINPAY_PAYMENTS_ENABLED=0 turns payments off.  Buys a prepaid batch through verified v1.4 on the chain the owner set in AIFINPAY_PAY_CHAIN (Polygon by default; other supported networks require explicit owner selection) — in its native currency (POL, SOL, ETH, AVAX, BNB or XRP), or in the stablecoin the owner set in AIFINPAY_PAY_ASSET (e.g. USDC; gas is still native) — within owner limits, then reuses its receipt. With scope "merchant" one batch covers every path on the site. Pending payments are recovered without sending another transaction. Other payment protocols are unsupported.
- **agent_quota** — Read this agent's prepaid quota, per service. Lists the agent's active quota batches (merchant, resource, used, remaining, expiry). Read-only; never spends, pays, or signs anything. Ask it things like: how much prepaid quota do I have left at mrch_x?
- **agent_history** — Read an agent's indexed AiFinPay payment history by wallet address, public passport identifier, or both. Defaults to the configured payment chain and its local wallet. Solana history requires the owner-selected cluster; arbitrary wallet transfers are excluded. Receipts include retained prepaid batches and test payments. Never pass a seed, private key or API secret as a passport.
- **agent_passport_resolve** — Resolve an AiFinPay Agent Passport by @username, permanent AIFP number, or immutable agent id. Returns verified public wallet bindings only. Resolution never authorizes a payment.
- **settlement_routes** — Where an agent can pay today. Lists the splitter v1.4 AIFP-1 routes payable_fetch uses first — one per chain the backend serves (read from the issuer's /api/health and /.well-known/x402.json, pinned against the SDK's deployment registry) with chain_id, assets, quote_endpoint and pay_endpoint — then the legacy splitter v1.3 routes from GET /v1/settlement/routes under legacy_v13. "live": true means payable now through payable_fetch on that chain; a v1.3 entry being disabled says nothing about v1.4. AIFP-1 is merchant monetisation (99% merchant / 1% AiFinPay / 0% creator). AIFP-2/x402 is 100% provider / 0% AiFinPay / 0% creator.
- **settlement_invoice** — Build and validate a NON-SIGNING v1.3 settlement invoice for EVM chains. This tool never moves funds. Use the published @aifinpay/agent v2 settlement executor to verify bytecode/profile and sign it.
- **settlement_solana** — Build and validate a NON-SIGNING Solana settlement invoice. This tool never moves funds. Uses the AiFinPay Solana B2B split program (Anchor). Use the published @aifinpay/agent v2 settlement executor to sign and submit.
- **settlement_casper** — Build and validate a NON-SIGNING Casper settlement invoice. This tool never moves funds. Casper uses Wasm smart contracts and deploys (not EVM transactions). Use the published @aifinpay/agent v2 settlement executor to sign and submit.
- **deployment_info** — Get AiFinPay deployment details across EVM, Solana, and Casper — addresses, stablecoins, program IDs, and settlement status. Filter by ecosystem (evm/solana/casper), environment (prod/dev), or network name.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "aifinpay": {
    "command": "npx",
    "args": ["-y","@aifinpay/mcp"]
  }
}
```

## Documentation

## What AiFinPay does

The AiFinPay MCP server gives an AI agent an MCP interface for payment infrastructure and related account data. It covers public wallet addresses, owner linking, quotas, payment history, Agent Passport resolution, settlement routes, invoices, and deployment status. The package is relevant to the 💰 Finance & Fintech category because it connects agent workflows with API payments and blockchain settlement records.

The server also includes a merchant-facing model elsewhere in the repository: HTTP 402 paywalls and per-request monetization are supported through the gate packages. The MCP surface described here is primarily agent-facing. It does not expose private keys or seed phrases through public tools.

## How it works

The MCP process runs locally and uses configured wallet files and owner settings. In its default state, it is read-only: address and account data can be inspected, but quote creation or invoice construction does not itself complete a payment. Settlement invoice tools produce and validate non-signing EVM, Solana, or Casper invoices.

Payment execution is conditional. The owner must enable payments and set spending limits and approved gateway origins before `payable_fetch` can sign and broadcast a locally controlled purchase. That tool performs a GET request against an owner-approved AIFP-1 merchant and buys a prepaid batch on the explicitly configured EVM v1.4 chain, with Polygon as the default.

The Solana flow supports native SOL and classic SPL USDC or USDT in the candidate implementation. It requires an explicitly selected Solana cluster or mode, a fee and rent budget, and keys kept by the operator. The same local wallet ledger can cover EVM and Solana unresolved purchases.

## Setup and configuration

Run the MCP package with `npx @aifinpay/mcp`. Node and Python SDKs are available separately through `@aifinpay/agent` and `aifinpay-agent`. The repository also provides packages for merchant gating and agent skills.

A basic installation does not require payment activation. To expose an operational paid-fetch path, the owner sets `AIFINPAY_PAYMENTS_ENABLED=1`, `AIFINPAY_MAX_USD`, `AIFINPAY_DAILY_USD`, and `AIFINPAY_GATEWAY_ORIGINS`, along with a native gas cap. The documented development mode, `AIFINPAY_MODE=dev`, adds a development-only quote inspection tool.

## Tools and capabilities

The AiFinPay MCP server currently registers tools for:

- Reading EVM, Solana, and Casper public addresses, and reloading local wallet files.
- Linking an agent to its owner dashboard with a one-time claim URL.
- Reading quotas, indexed or retained payment history, and runtime-verified settlement routes.
- Resolving public Agent Passport identities and verified wallet bindings.
- Fetching an approved paid resource when owner payment controls are active.
- Building non-signing settlement invoices for EVM, Solana, and Casper.
- Reading deployment addresses, program IDs, and settlement status across supported ecosystems.

## Limitations and notes

Payment tools are intentionally restricted by owner configuration. Without that configuration, the MCP server signs no payment. The owner claim operation signs only an AiFinPay claim challenge for the agent’s own address and does not move funds.

Solana records remain disabled in the canonical registry. The source tests use injected synthetic approved records, so they do not prove that a deployed program is active or that a funded network accepts payments. High-level payment execution refuses before signing or making an HTTP request when the selected registry record is unavailable. Treat the Solana implementation as a candidate flow rather than an enabled production route.

The package versions in the repository are local source versions and do not establish publication or registry status. Release, dependency-lock, and deployment verification are separate concerns.

_Full upstream README: https://allmcps.com/mcp/aifinpay/readme_

