AiFinPay MCP Server
Payment infrastructure for AI agents: wallet, passport, owner-enabled Polygon and Base payments.
AiFinPay scores 73 (Good), licensed MIT and written in TypeScript. It can be reached as a remote MCP endpoint. It declares 13 tools. Filed under Finance. GitHub shows 3 stars. Package registries report about 1,016 downloads a week. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.
Good trust
73 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: mit.
License, quality and maintenance
Quality: Grade A
93/100 for listing completeness. Lost points: 1 of 13 tools barely described, short summary.
How quality is graded
Where the 73 comes from
22 + 20 + 7 + 10 + 4 + 10 = 73. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 20 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 7 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 10 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "aifinpay-sdk": { "command": "npx", "args": [ "-y", "@aifinpay/mcp@2.20.0" ], "env": { "SEED_HASH": "YOUR_SEED_HASH", "AIFINPAY_AGENT_SECRET": "YOUR_AIFINPAY_AGENT_SECRET", "AIFINPAY_WALLET_PASSPHRASE": "YOUR_AIFINPAY_WALLET_PASSPHRASE", "AIFINPAY_PAYMENTS_ENABLED": "", "AIFINPAY_MAX_USD": "", "AIFINPAY_DAILY_USD": "", "AIFINPAY_GATEWAY_ORIGINS": "", "AIFINPAY_PAY_CHAIN": "", "AIFINPAY_MAX_GAS": "", "AIFINPAY_RPC_URL": "", "AIFINPAY_MAX_GAS_POL": "", "AIFINPAY_BASE_URL": "" } } }}
Environment variables
| Name | Required | Notes |
|---|---|---|
SEED_HASHSecret | Optional | 32-byte hex seed (64 hex characters), the highest-priority wallet source. Solana, EVM and Casper addresses derive from it. |
AIFINPAY_AGENT_SECRETSecret | Optional | Legacy base58 Ed25519 secret for a persistent agent identity; Solana, EVM and Casper addresses derive from it. Without any wallet source the server uses an unfunded ephemeral identity. |
AIFINPAY_WALLET_PASSPHRASESecret | Optional | Passphrase for an encrypted ~/.aifinpay/agent.json keystore created by `npx @aifinpay/mcp init`. |
AIFINPAY_PAYMENTS_ENABLED | Optional | Payments (payable_fetch, AIFP-1 v1.4 on the owner's pay chain) are on unless this is 0. Only a persistent wallet signs, within the built-in ceiling of $5 per payment and $20 per 24 hours; an unfunded wallet spends nothing. |
AIFINPAY_MAX_USD | Optional | Lowers the built-in $5 per-payment ceiling of payable_fetch (default 5; a higher value is refused). The working limits are the dashboard Controls. A tool argument can lower it for one call, never raise it. |
AIFINPAY_DAILY_USD | Optional | Lowers the built-in $20 rolling 24-hour ceiling (default 20; a higher value is refused). |
AIFINPAY_GATEWAY_ORIGINS | Optional | Optional allowlist: comma-separated exact HTTPS origins the agent may pay. Unset, any https site; who is paid is decided by the AiFinPay-signed quote, never by the 402. |
AIFINPAY_PAY_CHAIN | Optional | Payment chain, polygon by default. Other supported networks only by explicit owner selection; a quote for any other chain is refused. |
AIFINPAY_MAX_GAS | Optional | Gas cap per payment in the pay chain's native currency. Required with payments unless AIFINPAY_MAX_GAS_POL is set on Polygon. |
AIFINPAY_RPC_URL | Optional | Optional HTTPS RPC for the payment chain. |
AIFINPAY_MAX_GAS_POL | Optional | Gas cap per payment in POL, e.g. 0.3. Polygon only; on other chains use AIFINPAY_MAX_GAS. |
AIFINPAY_BASE_URL | Optional | Override the AiFinPay backend. Unset, read-only tools use https://aifinpay.io and payable_fetch quotes and receipts use https://api.aifinpay.io. |
Tools13Tool docs quality grade C
All capabilitiesagent_addresstoolRead the current EVM, Solana and Casper public addresses.
agent_claim_selftoolLink the agent to its owner's dashboard with a one-time URL from dash.aifinpay.io. Signs only an AiFinPay claim challenge for the agent's own address; moves no funds.
agent_historytoolRead indexed AiFinPay payment history or retained receipt history.
Resolve a public Agent Passport identity and verified wallet bindings.
agent_quotatoolRead the agent's quota.
agent_reloadtoolReload configured local wallet files without starting a new conversation.
deployment_infotoolRead deployment addresses, program IDs and settlement status across supported ecosystems.
payable_fetchtoolFetch a GET resource from an AIFP-1 merchant, buying a prepaid batch on splitter v1.4 within the owner's limits. Polygon is the default; another chain needs explicit owner selection. Signs only with a persistent wallet.
Report what a payment still needs: wallet (persistent or ephemeral), ceiling and limit sources, balance, funding, dashboard Controls and nextstep. Signs nothing.
Build and validate a non-signing Casper settlement invoice.
Build and validate a non-signing EVM settlement invoice.
Read currently runtime-verified AIFP-1 / AIFP-2 settlement routes.
About
AiFinPay — payment infrastructure for AI agents
AiFinPay provides payment and monetization infrastructure for autonomous AI agents.
- Agent side: identity, wallet discovery, payment history, route discovery, quotas and settlement preparation.
- Merchant side: HTTP 402 paywalls and per-request monetization for AI traffic.
- Non-custodial design: private keys remain with the agent/operator. Public MCP tools do not expose seeds or private keys.
Canonical domain: https://aifinpay.io
Package versions and evidence
Source versions are defined in each package's package.json or pyproject.toml;
installed dependency versions and integrity hashes are in its lockfile. Check
npm/PyPI for published versions and CI artifacts for the exact source/pack inputs
that were exercised. Neither a source version nor this README proves publication
or production readiness.
| Package | Install |
|---|---|
aifinpay-agent (Python) | pip install aifinpay-agent |
aifinpay-gate (Python merchant gate) | pip install aifinpay-gate |
@aifinpay/agent (Node / TypeScript) | npm install @aifinpay/agent |
@aifinpay/mcp | npx -y @aifinpay/mcp@latest |
@aifinpay/mcp-http | Streamable HTTP wrapper |
@aifinpay/skill | npx skills add AiFinPay/skill |
@aifinpay/gate | npm install @aifinpay/gate |
@aifinpay/wallet | npm install @aifinpay/wallet |
@aifinpay/analytics | SDK telemetry, on by default |
@aifinpay/deployments | deployment registry package |
Solana paid access
The fetchPaid / fetch_paid Solana adapters provide conditional execution for
native SOL and classic SPL USDC/USDT. Owners select Solana and its cluster/mode
explicitly, supply a fee plus rent budget and keep the keys locally. The same
local wallet ledger covers EVM and Solana unresolved purchases. Quote, signed
transaction, receipt and public history bind the exact network/program; base58
addresses retain their case.
High-level payment checks the selected registry record before quote signing or HTTP. Read availability and its recorded reason from the Solana registry; do not infer them from this document. Source tests using synthetic records do not activate a network or establish deployed-program/funded acceptance. See node payment instructions, Python instructions, and Solana decision and acceptance.
Install
# MCP
npx @aifinpay/mcp
# Node / TypeScript SDK
npm install @aifinpay/agent
# Python SDK
pip install aifinpay-agent
# Merchant paywall
npm install @aifinpay/gate
# Agent skills
npm install @aifinpay/skill
MCP: current tool surface
The current @aifinpay/mcp source registers these tools:
| Tool | Purpose |
|---|---|
agent_address | Read the current EVM, Solana and Casper public addresses. |
agent_reload | Reload configured local wallet files without starting a new conversation. |
agent_claim_self | Link the agent to its owner's dashboard with a one-time URL from dash.aifinpay.io. Signs only an AiFinPay claim challenge for the agent's own address; moves no funds. |
payable_fetch | Fetch a GET resource from an AIFP-1 merchant, buying a prepaid batch on splitter v1.4 within the owner's limits. Polygon is the default; another chain needs explicit owner selection. Signs only with a persistent wallet. |
payment_setup_status | Report what a payment still needs: wallet (persistent or ephemeral), ceiling and limit sources, balance, funding, dashboard Controls and next_step. Signs nothing. |
agent_quota | Read the agent's quota. |
agent_history | Read indexed AiFinPay payment history or retained receipt history. |
agent_passport_resolve | Resolve a public Agent Passport identity and verified wallet bindings. |
settlement_routes | Read currently runtime-verified AIFP-1 / AIFP-2 settlement routes. |
settlement_invoice | Build and validate a non-signing EVM settlement invoice. |
settlement_solana | Build and validate a non-signing Solana settlement invoice. |
settlement_casper | Build and validate a non-signing Casper settlement invoice. |
deployment_info | Read deployment addresses, program IDs and settlement status across supported ecosystems. |
With AIFINPAY_MODE=dev, an additional dev_payment_quote tool is available for dev-only quote inspection.
Since MCP 2.12.1 payments are on by default. A persistent wallet created with init can pay with no payment env at all, within a built-in ceiling of $5 per payment and $20 per 24 hours, and only to merchants whose site AiFinPay reports as verified (the payee comes from the backend-signed quote, never from the 402). An ephemeral wallet signs nothing, and an unfunded one has nothing to spend. The working limits are the owner's dashboard Controls. First payment: init → fund → link (agent_claim_self) → pay (payable_fetch); payment_setup_status names the next missing step.
Env values are optional and only narrow the defaults: AIFINPAY_MAX_USD / AIFINPAY_DAILY_USD can only lower the ceiling (a higher value refuses startup), AIFINPAY_GATEWAY_ORIGINS limits payable sites to exact HTTPS origins, AIFINPAY_MAX_GAS_POL (Polygon, default 0.3) or AIFINPAY_MAX_GAS (other chains) caps gas, and AIFINPAY_PAYMENTS_ENABLED=0 turns payments off. A quote or settlement invoice alone is not a completed payment. See mcp/README.md.
Legacy tools such as agent_call, agent_quote, pay_with_split and quote_split are not registered by the current MCP server.
MCP client configuration
{
"mcpServers": {
"aifinpay": {
"command": "npx",
"args": ["-y", "@aifinpay/mcp"]
}
}
}
For a persistent local identity, initialize the keystore once. init creates an encrypted keystore and refuses to create one without a passphrase unless you ask for a plaintext test wallet:
AIFINPAY_WALLET_PASSPHRASE='<a long passphrase>' npx @aifinpay/mcp init
# disposable test wallet only:
npx @aifinpay/mcp init --plaintext
Then use agent_reload and agent_address to verify the selected public wallet. Do not paste seeds or private keys into chat, issues, logs or shared configuration.
Full client setup: MCP_CONFIG.md
SDK payment execution
The SDK surfaces have different configuration boundaries. Do not treat them as interchangeable.
Node / TypeScript
@aifinpay/agent includes the AIFP-1 fetchPaid path. Read supported EVM descriptors from paymentChains.ts. Every non-Polygon rail requires explicit owner selection. Paid execution validates the selected chain, deployment/runtime/signer/profile, pinned token and RPC before signing; native payments require a fresh independent price. Durable bound reservations prevent unresolved payments from resetting the daily cap or buying the same access on another rail. Legacy Polygon v1.3 still requires its separately reviewed settlement pin. Source support does not activate a production route or publish a package.
See node/README.md and node/PAYMENT_RECEIPTS.md.
Python
Python uses AiFinPayAgent.fetch_paid with the descriptors in payment_chains.py, pinned native/stable assets and exact token amounts. Every non-Polygon EVM chain requires an explicit native gas budget in wei. Shared local-file reservations serialize concurrent processes, survive unknown broadcasts and reconcile recovered receipts once. Use the documented paid-access API, not legacy call() settlement. MCP consumes the Node SDK with explicit owner chain/asset configuration and private durable recovery.
See python/README.md.
Economics
Current protocol economics documented in the v2 line:
- AIFP-1: payer pays the quoted gross amount. A protocol fee is included in the quoted price. Each quote and the on-chain transaction show the exact split between the merchant and the protocol. The fee is set per merchant; creator/referral receives 0%.
- AIFP-2 / x402: provider receives 100%; AiFinPay protocol fee is currently 0%.
Older examples with a fixed three-way split (merchant / treasury / creator) belong to a retired fee model and must not be used as current economics.
Merchant monetization
For a site or API that wants to monetize AI-agent traffic:
npm install @aifinpay/gate
The merchant package can return HTTP 402 challenges, expose discovery metadata and meter paid access. See gate/README.md. Python servers (FastAPI, Starlette, Flask, Django) use pip install aifinpay-gate, the same gate as ASGI/WSGI middleware — see python-gate/README.md and the aifinpay-merchant skill in the AiFinPay/skill repository.
Deployment and payment evidence
Read addresses, program IDs, runtime hashes, provenance and settlement flags from
the deployment registry, or inspect
the installed SDK's metadata through MCP deployment_info. Registry metadata
is necessary but does not replace fresh executor checks, backend
/api/payment-capabilities, merchant authorization and a matching signed quote.
For a payment claim, verify the original transaction on the selected network, its settlement event and the verified receipt for that purchase. A copied historical transaction hash or a passing offline test is not current readiness evidence.
Repository layout
sdk/
├── node/ @aifinpay/agent
├── python/ aifinpay-agent
├── mcp/ @aifinpay/mcp
├── mcp-http/ Streamable HTTP wrapper
├── skill/ pointer only — @aifinpay/skill moved to github.com/AiFinPay/skill
├── gate/ merchant HTTP 402 paywall (Node)
├── python-gate/ aifinpay-gate, merchant HTTP 402 paywall (Python)
├── wallet/ lightweight agent wallet / keystore
├── deployments/ deployment registry
└── examples/ integrations and reference examples
Security rules
- Never print, log or publish a seed, private key, keystore JSON or signing secret.
- Public addresses and transaction hashes are safe to display.
- Do not infer production readiness from a contract address, program ID, quote or invoice alone.
- Retain the original quote, transaction reference and idempotency context when recovering from a settlement error to avoid accidental duplicate payment attempts.
Links
- Website: https://aifinpay.io
- Documentation: https://aifinpay.io/docs
- Quick start: QUICKSTART.md
- MCP configuration: MCP_CONFIG.md
- Issues: https://github.com/AiFinPay/sdk/issues
- MCP specification: https://modelcontextprotocol.io
- x402: https://www.x402.org
License
MIT — see LICENSE.
Frequently asked questions
What is AiFinPay MCP Server?
Payment infrastructure for AI agents: wallet, passport, owner-enabled Polygon and Base payments.
How do I install AiFinPay MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. AiFinPay MCP Server runs locally from the npm package @aifinpay/mcp with the command npx -y @aifinpay/mcp@2.20.0.
Is AiFinPay MCP Server free and open source?
Yes. AiFinPay MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does AiFinPay MCP Server support remote (HTTP) connections?
Yes. AiFinPay MCP Server offers a hosted endpoint over Streamable HTTP, so HTTP-capable clients can connect to it without running anything locally.
What tools does AiFinPay MCP Server provide?
AiFinPay MCP Server provides 13 tools, including agent_address, agent_claim_self, agent_history, and agent_passport_resolve. See the full tool list for descriptions and parameters.
How is AiFinPay MCP Server's trust score calculated?
AiFinPay MCP Server scores 73 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.