agentpay-mcp 4.1.1 → 4.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dockerfile +15 -0
- package/README.md +263 -2
- package/dist/index.js +21 -2
- package/dist/index.js.map +1 -1
- package/dist/tools/otel-budget.d.ts +265 -0
- package/dist/tools/otel-budget.d.ts.map +1 -0
- package/dist/tools/otel-budget.js +399 -0
- package/dist/tools/otel-budget.js.map +1 -0
- package/dist/tools/session.d.ts.map +1 -1
- package/dist/tools/session.js +2 -0
- package/dist/tools/session.js.map +1 -1
- package/dist/tools/x402.d.ts.map +1 -1
- package/dist/tools/x402.js +58 -0
- package/dist/tools/x402.js.map +1 -1
- package/dist/utils/client.d.ts.map +1 -1
- package/dist/utils/client.js +8 -1
- package/dist/utils/client.js.map +1 -1
- package/dist/utils/x402-networks.d.ts +12 -0
- package/dist/utils/x402-networks.d.ts.map +1 -0
- package/dist/utils/x402-networks.js +30 -0
- package/dist/utils/x402-networks.js.map +1 -0
- package/docs/channel-agent-affiliate-controls.md +142 -0
- package/docs/directory-introspection-readiness.md +77 -0
- package/docs/hitl-reference-architecture.md +140 -0
- package/docs/security-posture.md +74 -0
- package/docs/trust-architecture.md +127 -0
- package/docs/vercel-deployment-hardening.md +115 -0
- package/docs/whatsapp-smb-agent-controls.md +130 -0
- package/docs/x402-batch-settlement-channels.md +199 -0
- package/docs/x402-bazaar-observability.md +209 -0
- package/docs/x402-chain-drift-compatibility.md +63 -0
- package/docs/x402-mcp-funding-ux-benchmark.md +36 -0
- package/docs/x402-multi-sdk-batch-settlement-parity.md +167 -0
- package/docs/x402-scanner-readiness.md +110 -0
- package/docs/x402-tvm-readiness.md +53 -0
- package/glama.json +4 -0
- package/package.json +11 -6
- package/smithery.yaml +37 -0
package/Dockerfile
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
FROM node:20-slim AS builder
|
|
2
|
+
WORKDIR /app
|
|
3
|
+
COPY package*.json ./
|
|
4
|
+
RUN npm ci
|
|
5
|
+
COPY tsconfig.json ./
|
|
6
|
+
COPY src/ ./src/
|
|
7
|
+
RUN npm run build
|
|
8
|
+
|
|
9
|
+
FROM node:20-slim
|
|
10
|
+
WORKDIR /app
|
|
11
|
+
COPY --from=builder /app/dist ./dist
|
|
12
|
+
COPY --from=builder /app/node_modules ./node_modules
|
|
13
|
+
COPY package*.json ./
|
|
14
|
+
ENV NODE_ENV=production
|
|
15
|
+
ENTRYPOINT ["node", "dist/index.js"]
|
package/README.md
CHANGED
|
@@ -5,11 +5,31 @@
|
|
|
5
5
|
[](tests/)
|
|
6
6
|
[](https://uspto.gov)
|
|
7
7
|
|
|
8
|
-
**
|
|
8
|
+
**Compatible with x402 V1/V2 + Stripe MPP — protocol-agnostic spend controls.**
|
|
9
|
+
|
|
10
|
+
**agentpay-mcp is the human-first trust and policy layer above commodity execution rails (x402, ACP, UCP).** OWS-compatible trust layer -- works on top of [MoonPay Open Wallet Standard](https://github.com/nicholashudson2/open-wallet-standard). Protocol-agnostic trust layer -- works with x402 AND Stripe MPP. While x402 settles $600M annualized — with AI agents driving 40% of protocol activity (March 2026) — the missing piece isn't payment execution. It's governance: who approved it, how much can be spent, and what happens when the agent tries to exceed its budget. That's what agentpay-mcp provides.
|
|
11
|
+
|
|
12
|
+
> **ACP handles what agents SELL. agentpay-mcp handles what agents BUY.** ACP (Agent Commerce Protocol) enables agents to list services, negotiate, and receive payments. agentpay-mcp is the complementary layer — controlling what agents *spend* when consuming paid APIs, tools, and services. Different problems, compatible solutions.
|
|
9
13
|
|
|
10
14
|
When your agent hits HTTP 402 Payment Required, it needs to pay and retry — with your approval, within limits you set. AgentPay MCP is a Model Context Protocol server that gives Claude, Cursor, and any MCP-compatible agent a payment wallet with hard spend caps, human-approval mode, and a full on-chain audit trail.
|
|
11
15
|
|
|
12
|
-
|
|
16
|
+
The MCP ecosystem now has 97M+ monthly downloads and 10,000+ active servers — agentpay-mcp is the only MCP-native full payment execution layer.
|
|
17
|
+
|
|
18
|
+
✅ Integrated into **[NVIDIA/NeMo-Agent-Toolkit-Examples](https://github.com/NVIDIA/NeMo-Agent-Toolkit-Examples/pull/17)** (PR #17 merged) — payment infrastructure for NVIDIA's official agent toolkit.
|
|
19
|
+
|
|
20
|
+
## Who Uses agentpay-mcp?
|
|
21
|
+
|
|
22
|
+
agentpay-mcp is built for three buyer personas who all share the same problem: autonomous agents spending money without controls.
|
|
23
|
+
|
|
24
|
+
| Persona | Problem | What They Use agentpay-mcp For |
|
|
25
|
+
|---------|---------|--------------------------------|
|
|
26
|
+
| **FinOps Practitioners** (Fortune 500 AI spend owners) | 98% of FinOps teams now manage AI spend (FinOps Foundation 2026) — but no governance layer exists for autonomous agents | Cost center attribution, per-agent budget caps, CFO-ready spend dashboards, policy-as-code enforcement |
|
|
27
|
+
| **Platform Engineers** (MCP / agent framework builders) | Agents call paid APIs at runtime with no native spend controls in x402, Stripe MPP, or MCP protocol | Drop-in spend governance middleware: daily caps, kill switches, per-task limits, audit trails |
|
|
28
|
+
| **Enterprise Compliance Teams** (EU AI Act, SOC 2, internal audit) | EU AI Act Article 14 (enforced Aug 2, 2026) requires runtime human oversight and decision-time enforcement for autonomous agents | Human-approval queues, runtime kill switches, full on-chain audit trail for compliance evidence |
|
|
29
|
+
|
|
30
|
+
> **FinOps teams:** agentpay-mcp is the first governance layer designed for your workflows — not just for developers. Budget caps, approval thresholds, and cost attribution that slot into your existing FinOps tooling.
|
|
31
|
+
|
|
32
|
+
---
|
|
13
33
|
|
|
14
34
|
## Why Trust Matters
|
|
15
35
|
|
|
@@ -63,11 +83,51 @@ AgentPay MCP is built for enterprise MCP deployments where supply chain security
|
|
|
63
83
|
- **Auditable, minimal dependency tree.** The server runs on `viem`, `@modelcontextprotocol/sdk`, and a small set of auditable npm packages. No PyPI. No Python runtime required.
|
|
64
84
|
- **Enterprise trust signal.** Integrated into [NVIDIA's official NeMo Agent Toolkit Examples](https://github.com/NVIDIA/NeMo-Agent-Toolkit-Examples/pull/17) (PR #17, merged). NVIDIA's review process validated the security posture before merge.
|
|
65
85
|
- **Non-custodial architecture.** Private keys never leave the local machine. On-chain spend caps enforce limits even if the agent or its key is compromised.
|
|
86
|
+
- **Vercel deployment hardening.** If you deploy AI agents on Vercel, review the [Vercel deployment hardening checklist](docs/vercel-deployment-hardening.md) before reconnecting paid tools after any OAuth, dashboard, CI, or environment-variable exposure.
|
|
87
|
+
- **x402 scanner readiness.** For paid API demos that need scanner-readable x402 support, use the [x402 scanner-readiness recipe](docs/x402-scanner-readiness.md).
|
|
88
|
+
- **x402 Bazaar observability.** For paid MCP tools entering searchable Bazaar catalogs, use the [x402 Bazaar observability recipe](docs/x402-bazaar-observability.md) to cover WithBazaar search metadata, unified auth, and `EXTENSION-RESPONSES` readback.
|
|
89
|
+
- **x402 batch-settlement channels.** For repeat paid MCP calls that use deposit, voucher, refund, and claim flows, use the [x402 batch-settlement channel recipe](docs/x402-batch-settlement-channels.md) to keep channel storage, voucher caps, recovery, and off-chain settlement audit trails production-safe.
|
|
90
|
+
- **x402 multi-SDK batch-settlement parity.** For providers testing x402 TypeScript and Go batch-settlement clients, use the [multi-SDK batch-settlement parity recipe](docs/x402-multi-sdk-batch-settlement-parity.md) to prove shared channel state, phased e2e results, signer separation, refund/recovery visibility, and proof bundle shape.
|
|
91
|
+
- **x402 TVM readiness.** For TVM/TON exact-payment offers from emerging x402 examples, use the [x402 TVM readiness note](docs/x402-tvm-readiness.md) to confirm unsupported TVM requirements fail closed until deliberate signing, gas, jetton, and settlement support exists.
|
|
92
|
+
- **x402 MCP funding UX.** For hosted fund-link and managed-wallet comparisons, use the [x402 MCP funding UX benchmark](docs/x402-mcp-funding-ux-benchmark.md) to keep onboarding speed separate from approval gates, daily caps, auditability, and non-custodial controls.
|
|
93
|
+
- **Directory introspection readiness.** For Glama, Smithery, and other MCP catalogs, use the [directory introspection readiness note](docs/directory-introspection-readiness.md) for verified `npx`, Docker, MCP name, and non-custodial metadata paths.
|
|
94
|
+
- **WhatsApp and SMB agent controls.** For channel-native paid agents, use the [WhatsApp and SMB paid-agent controls recipe](docs/whatsapp-smb-agent-controls.md).
|
|
95
|
+
- **Channel-agent affiliate payout controls.** For Axon-style affiliate and referral revenue shares, use the [channel-agent affiliate controls spec](docs/channel-agent-affiliate-controls.md) to keep payout caps, per-contact approval, audit rows, and optional x402 settlement separate from paid tool spend approval.
|
|
96
|
+
- **x402 chain drift.** AgentPay MCP tracks the x402 Foundation paywall-template baseline with `viem` `^2.47.12` or newer, and fails closed for unmapped chains. For PaymentWrapper and paywall template changes, follow the [x402 chain-drift compatibility note](docs/x402-chain-drift-compatibility.md).
|
|
66
97
|
|
|
67
98
|
If your security team is auditing MCP server dependencies after the LiteLLM incident, `npm ls` on agentpay-mcp gives you a short, reviewable tree with zero Python supply chain exposure.
|
|
68
99
|
|
|
69
100
|
---
|
|
70
101
|
|
|
102
|
+
## Trust & Governance — A2A Protocol Alignment
|
|
103
|
+
|
|
104
|
+
Google's [Agent2Agent (A2A) protocol](https://github.com/a2aproject/A2A) (v1.0.0) establishes how agents discover, authenticate, and collaborate across organizational boundaries. The spec is built around Agent Cards, security schemes, and human-in-the-loop task management — but it deliberately does not define *spending governance* at the protocol level.
|
|
105
|
+
|
|
106
|
+
agentpay-mcp fills that gap as a complementary governance layer. Here's how our controls map to A2A's architecture:
|
|
107
|
+
|
|
108
|
+
| A2A Concept | What the Spec Defines | What agentpay-mcp Adds |
|
|
109
|
+
|---|---|---|
|
|
110
|
+
| **Agent Cards** (`capabilities`, `securitySchemes`) | Agents declare what they can do and how to authenticate | agentpay-mcp adds *spend policy* as a discoverable capability — daily caps, per-tx limits, approval thresholds |
|
|
111
|
+
| **Human-in-the-loop** (`input-required` task state) | Tasks can pause for human input mid-execution | agentpay-mcp enforces this for payments: transactions above a configurable threshold queue for explicit human approval before executing |
|
|
112
|
+
| **Security schemes** (OAuth, API keys, mTLS) | Authentication between agents | agentpay-mcp provides the *authorization* complement — not just "is this agent allowed to connect?" but "is this agent allowed to spend $X?" |
|
|
113
|
+
| **Extensions** (spec §4.6) | Agents can expose additional structured data beyond core A2A | Spend caps, approval history, and transaction receipts can be surfaced as extension data in A2A task metadata |
|
|
114
|
+
| **Opaque execution** (guiding principle) | Agents collaborate without exposing internals | agentpay-mcp preserves opacity — the paying agent's private key and internal budget logic never leave the local machine |
|
|
115
|
+
|
|
116
|
+
### What This Means in Practice
|
|
117
|
+
|
|
118
|
+
When two A2A-compliant agents collaborate on a task that involves paid API calls:
|
|
119
|
+
|
|
120
|
+
1. **Discovery** — The calling agent reads the remote agent's Agent Card (A2A spec)
|
|
121
|
+
2. **Authentication** — Mutual authentication via declared security schemes (A2A spec)
|
|
122
|
+
3. **Spend governance** — agentpay-mcp enforces budget caps, logs transactions, and gates high-value payments on human approval (agentpay-mcp layer)
|
|
123
|
+
4. **Audit** — Full on-chain transaction trail provides compliance evidence independent of either agent's internal state
|
|
124
|
+
|
|
125
|
+
This positions agentpay-mcp as the **spend governance layer** for A2A-compliant agent ecosystems — complementing the protocol's identity and task management with the financial controls enterprises require before deploying autonomous agents.
|
|
126
|
+
|
|
127
|
+
> **Note:** The A2A v1.0.0 spec does not define a trust scoring or trust signals mechanism at the protocol level. agentpay-mcp's governance controls (spend caps, human approval, on-chain audit trails) are designed to be compatible with future trust-related extensions as the A2A ecosystem evolves.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
71
131
|
## AI Agent Discovery
|
|
72
132
|
|
|
73
133
|
AgentPay MCP is designed to be discovered and used by AI agents. Compatible with:
|
|
@@ -122,6 +182,35 @@ Agent gets the data. Full tx on basescan.org.
|
|
|
122
182
|
|
|
123
183
|
---
|
|
124
184
|
|
|
185
|
+
## agentpay-mcp vs x402-mcp — What's the Difference?
|
|
186
|
+
|
|
187
|
+
Both projects enable agent payments. They solve different problems at different layers.
|
|
188
|
+
|
|
189
|
+
| Capability | **agentpay-mcp** | **x402-mcp** (Coinbase) |
|
|
190
|
+
|---|---|---|
|
|
191
|
+
| **Payment execution** | ✅ x402 + Stripe MPP | ✅ x402 only |
|
|
192
|
+
| **On-chain spend caps** | ✅ Smart contract enforced | ❌ No caps |
|
|
193
|
+
| **Per-session budget limits** | ✅ Hard session ceiling | ❌ Unlimited per session |
|
|
194
|
+
| **Daily aggregate limits** | ✅ Configurable daily max | ❌ No daily limits |
|
|
195
|
+
| **Human-in-the-loop approval** | ✅ Threshold-based queue | ❌ Fully autonomous only |
|
|
196
|
+
| **Transaction simulation** | ✅ Dry-run before commit | ❌ Execute or nothing |
|
|
197
|
+
| **Multi-protocol support** | ✅ x402 V1/V2 + Stripe MPP | ⚠️ x402 only |
|
|
198
|
+
| **OWS wallet compatibility** | ✅ MoonPay Open Wallet Standard | ❌ Coinbase wallet only |
|
|
199
|
+
| **Audit trail** | ✅ Full tx history with merchant, amount, status | ⚠️ Basic tx log |
|
|
200
|
+
| **FinOps integration** | ✅ Cost attribution per session/agent | ❌ Not available |
|
|
201
|
+
| **Fail-closed policy engine** | ✅ Errors → rejection, never approval | ❌ No policy engine |
|
|
202
|
+
| **Non-custodial** | ✅ Keys never leave local machine | ✅ Keys never leave local machine |
|
|
203
|
+
| **Enterprise trust signal** | ✅ [NVIDIA NeMo Toolkit PR #17](https://github.com/NVIDIA/NeMo-Agent-Toolkit-Examples/pull/17) merged | — |
|
|
204
|
+
|
|
205
|
+
**When to use x402-mcp:** You want the simplest possible x402 payment integration with no governance requirements. Your agent operates with unlimited budget authority.
|
|
206
|
+
|
|
207
|
+
**When to use agentpay-mcp:** You need spend controls, budget enforcement, human approval workflows, or multi-protocol support. Your agents operate against real enterprise budgets where runaway spending is a deployment blocker.
|
|
208
|
+
|
|
209
|
+
> x402-mcp adds payments to your agent. agentpay-mcp adds *governed* payments — spend caps, session limits, human approval, and audit trails that enterprises require before deploying agents against production budgets.
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
|
|
125
214
|
## Quick Start
|
|
126
215
|
|
|
127
216
|
### 1. Install
|
|
@@ -330,6 +419,65 @@ Agent: "Enrich this list of 50 leads and add to CRM"
|
|
|
330
419
|
|
|
331
420
|
---
|
|
332
421
|
|
|
422
|
+
## Enterprise FinOps — Budget Cap Templates
|
|
423
|
+
|
|
424
|
+
Production agent deployments need spending governance that satisfies enterprise FinOps requirements. These templates show common patterns for controlling agent spend at the infrastructure layer.
|
|
425
|
+
|
|
426
|
+
### Per-Agent Department Budgets
|
|
427
|
+
|
|
428
|
+
```json
|
|
429
|
+
// Marketing agent — $50/day cap, restricted to approved data vendors
|
|
430
|
+
{
|
|
431
|
+
"tool": "set_spend_policy",
|
|
432
|
+
"arguments": {
|
|
433
|
+
"perTxCapEth": "0.02",
|
|
434
|
+
"dailyLimitEth": "0.02",
|
|
435
|
+
"allowedRecipients": ["0xmarketingVendor1...", "0xmarketingVendor2..."]
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
// Engineering agent — $200/day cap, broader vendor access
|
|
440
|
+
{
|
|
441
|
+
"tool": "set_spend_policy",
|
|
442
|
+
"arguments": {
|
|
443
|
+
"perTxCapEth": "0.04",
|
|
444
|
+
"dailyLimitEth": "0.08",
|
|
445
|
+
"allowedRecipients": ["0xcloudProvider...", "0xapiVendor...", "0xdataSource..."]
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
### Tiered Approval Thresholds
|
|
451
|
+
|
|
452
|
+
Map your org's approval matrix to agent spending tiers:
|
|
453
|
+
|
|
454
|
+
```
|
|
455
|
+
$0 - $1 -> auto-approved (routine API calls)
|
|
456
|
+
$1 - $25 -> auto-approved with logging (standard tool usage)
|
|
457
|
+
$25 - $100 -> queued for team lead approval via queue_approval
|
|
458
|
+
$100+ -> queued for finance team approval
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
Set the auto-approve ceiling with `set_spend_policy`, and transactions above the per-tx cap automatically queue for human review. No code changes needed — the smart contract enforces it.
|
|
462
|
+
|
|
463
|
+
### Budget Monitoring for FinOps Dashboards
|
|
464
|
+
|
|
465
|
+
Pull real-time spend data for your FinOps tooling:
|
|
466
|
+
|
|
467
|
+
```json
|
|
468
|
+
// Check remaining budget before starting expensive workflows
|
|
469
|
+
{ "tool": "check_budget", "arguments": {} }
|
|
470
|
+
// Returns: { "remaining": "142.50 USDC", "spent": "57.50 USDC", "limit": "200.00 USDC" }
|
|
471
|
+
|
|
472
|
+
// Pull transaction history for cost attribution
|
|
473
|
+
{ "tool": "get_transaction_history", "arguments": { "limit": 100 } }
|
|
474
|
+
// Each entry includes: merchant, amount, timestamp, tool context — ready for FinOps import
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
These patterns work with any FinOps platform (CloudHealth, Kubecost, Apptio) — export transaction history via the MCP tool and feed it into your existing cost attribution pipeline.
|
|
478
|
+
|
|
479
|
+
---
|
|
480
|
+
|
|
333
481
|
## Environment Variables
|
|
334
482
|
|
|
335
483
|
```bash
|
|
@@ -499,6 +647,86 @@ AgentPay MCP has **zero LiteLLM dependency**. The entire server runs on `viem` (
|
|
|
499
647
|
|
|
500
648
|
---
|
|
501
649
|
|
|
650
|
+
## agentpay-mcp Already Supports Multiple Payment Rails
|
|
651
|
+
|
|
652
|
+
The agent payment landscape just split: Coinbase's x402 (open, permissionless, on-chain) vs Stripe's MPP (permissioned, Tempo-based, USDC). Developers building production agents face a choice — or they use agentpay-mcp, which already sits above both.
|
|
653
|
+
|
|
654
|
+
agentpay-mcp is **protocol-agnostic by design:**
|
|
655
|
+
|
|
656
|
+
| Payment Rail | Status | How agentpay-mcp Works With It |
|
|
657
|
+
|---|---|---|
|
|
658
|
+
| **x402 (Coinbase)** | ✅ Supported | Native x402 V1/V2 payment execution with on-chain spend caps |
|
|
659
|
+
| **Stripe MPP** | ✅ Compatible | MPP-compatible settlement layer separation — agentpay-mcp governs spend policy above MPP's settlement |
|
|
660
|
+
| **Future rails** | ✅ Ready | Neutral governance architecture — new rails plug in without code changes |
|
|
661
|
+
|
|
662
|
+
**Why this matters:** Neither x402 nor MPP ships spend governance. x402 wallets are unlimited by default. MPP offers human-set dashboard limits but no programmatic per-session or per-task enforcement. agentpay-mcp provides the budget circuit-breaker, approval workflows, and audit trail above both — regardless of which rail settles the transaction.
|
|
663
|
+
|
|
664
|
+
This isn't a wrapper around one protocol. It's a governance layer with a deliberate separation between **policy** (who approved it, what's the budget, should a human review this) and **settlement** (which blockchain or payment network moves the money). That separation is what makes agentpay-mcp rail-neutral — and what positions it as the governance standard as the protocol war plays out.
|
|
665
|
+
|
|
666
|
+
---
|
|
667
|
+
|
|
668
|
+
## Works with AWS AgentCore
|
|
669
|
+
|
|
670
|
+
AWS AgentCore provides enterprise-grade agent hosting with Cedar-based policy enforcement for access control. Cedar policies answer: "Is this agent allowed to call this API?" and "Can this agent access this resource?"
|
|
671
|
+
|
|
672
|
+
What Cedar does NOT provide: **spend limits.** There is no Cedar primitive for "this agent can spend at most $50 per session" or "halt the agent if cumulative spend exceeds $200 today." Access control and budget governance are different problems.
|
|
673
|
+
|
|
674
|
+
agentpay-mcp adds the budget circuit-breaker on top of AgentCore:
|
|
675
|
+
|
|
676
|
+
| Layer | Who Handles It | What It Controls |
|
|
677
|
+
|---|---|---|
|
|
678
|
+
| **Access Control** | AWS AgentCore (Cedar) | Which APIs the agent can call, which resources it can access |
|
|
679
|
+
| **Budget Governance** | agentpay-mcp | How much the agent can spend per transaction, per session, and per day |
|
|
680
|
+
| **Human Oversight** | agentpay-mcp | When autonomous operation pauses for human approval |
|
|
681
|
+
| **Audit Trail** | Both (complementary) | Cedar logs access decisions; agentpay-mcp logs spend decisions with on-chain receipts |
|
|
682
|
+
|
|
683
|
+
**Deployment pattern:** AgentCore runs the agent with Cedar policies controlling tool access. agentpay-mcp runs as an MCP server within the agent's tool set, enforcing spend caps on every payment action. Cedar says "you may call this paid API." agentpay-mcp says "you may spend up to $5 on this call."
|
|
684
|
+
|
|
685
|
+
```json
|
|
686
|
+
{
|
|
687
|
+
"mcpServers": {
|
|
688
|
+
"agentpay": {
|
|
689
|
+
"command": "npx",
|
|
690
|
+
"args": ["agentpay-mcp"],
|
|
691
|
+
"env": {
|
|
692
|
+
"AGENT_PRIVATE_KEY": "0x...",
|
|
693
|
+
"AGENT_WALLET_ADDRESS": "0x...",
|
|
694
|
+
"MAX_TRANSACTION_USDC": "5.00",
|
|
695
|
+
"DAILY_LIMIT_USDC": "50.00"
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
```
|
|
701
|
+
|
|
702
|
+
For enterprises running agents on AgentCore: Cedar handles the "can it?" question. agentpay-mcp handles the "should it spend this much?" question. Together, they provide the access + budget governance stack that production agent deployments require.
|
|
703
|
+
|
|
704
|
+
---
|
|
705
|
+
|
|
706
|
+
## Competitive Positioning
|
|
707
|
+
|
|
708
|
+
**The simplest way to think about it: ACP (Stripe) handles what agents SELL, agentpay-mcp handles what agents BUY.**
|
|
709
|
+
|
|
710
|
+
### Stripe MCP vs agentpay-mcp
|
|
711
|
+
|
|
712
|
+
Developers often ask: "Doesn't Stripe MCP already handle agent payments?" The answer is that **they solve different problems at different layers:**
|
|
713
|
+
|
|
714
|
+
| | Stripe MCP | agentpay-mcp |
|
|
715
|
+
|---|---|---|
|
|
716
|
+
| **Direction of money** | User pays merchant (through agent) | Agent pays API provider |
|
|
717
|
+
| **Use case** | Checkout, subscriptions, invoicing | API access, tool payments, agent-to-agent commerce |
|
|
718
|
+
| **Settlement** | Traditional card rails | On-chain (Base, EVM) or Stripe MPP |
|
|
719
|
+
| **Spend controls** | Customer-side (cart + checkout) | Agent-side (on-chain caps, human approval, session limits) |
|
|
720
|
+
| **Protocol** | ACP (Agent Commerce Protocol) | x402 (HTTP 402 Payment Required) |
|
|
721
|
+
|
|
722
|
+
**Stripe MCP** is a *merchant tool* — it helps businesses charge customers through agent interfaces. Think "buy this product" or "subscribe to that plan."
|
|
723
|
+
|
|
724
|
+
**agentpay-mcp** is an *agent procurement tool* — it lets agents pay for the APIs and tools they need to do their work. Think "access this premium data endpoint" or "use this compute resource."
|
|
725
|
+
|
|
726
|
+
Most production agents will need both layers: Stripe MCP for user-facing commerce, agentpay-mcp for the agent's own tool costs. They're complementary, not competing.
|
|
727
|
+
|
|
728
|
+
---
|
|
729
|
+
|
|
502
730
|
## MCP 2026 Compliance
|
|
503
731
|
|
|
504
732
|
AgentPay MCP aligns with the emerging MCP security standards for 2026, including CoSAI (Coalition for Secure AI) threat categories and OAuth 2.1 requirements.
|
|
@@ -565,6 +793,33 @@ We support the open x402 standard. Our filing is defensive — to prevent hostil
|
|
|
565
793
|
|
|
566
794
|
---
|
|
567
795
|
|
|
796
|
+
## Vercel x402-mcp Interop
|
|
797
|
+
|
|
798
|
+
agentpay-mcp is fully compatible with Vercel's [`x402-mcp`](https://www.npmjs.com/package/x402-mcp) package. If you're using Vercel's `paidTool()` to monetize MCP tools, agentpay-mcp works as the client-side payment layer — your agent pays x402 invoices from `paidTool()` endpoints automatically via `x402_pay`.
|
|
799
|
+
|
|
800
|
+
**What agentpay-mcp adds on top of x402-mcp:**
|
|
801
|
+
- **Multi-rail payments** — route through x402 (USDC on-chain) or Stripe Machine Payments Protocol (fiat) depending on the merchant
|
|
802
|
+
- **Spend governance** — per-tx caps, daily limits, and human-approval queues that `paidTool()` endpoints don't enforce client-side
|
|
803
|
+
- **Multi-chain x402 v2** — pay on Base, Solana, or Polygon (x402 v2 supports all three networks natively)
|
|
804
|
+
|
|
805
|
+
Use Vercel x402-mcp on the server side to monetize your tools. Use agentpay-mcp on the client side to pay for tools safely.
|
|
806
|
+
|
|
807
|
+
---
|
|
808
|
+
|
|
809
|
+
## Circle Nanopayments — Zero-Gas Settlement
|
|
810
|
+
|
|
811
|
+
agentpay-mcp supports [Circle Nanopayments](https://www.circle.com/nanopayments) as a settlement option for x402 v2 payments. Nanopayments enable gas-free sub-cent USDC transfers by batching small payments into single on-chain settlements.
|
|
812
|
+
|
|
813
|
+
**How it works with agentpay-mcp:**
|
|
814
|
+
- Agent makes an x402 payment via `x402_pay` as normal
|
|
815
|
+
- If the x402 v2 server supports Circle Nanopayments, settlement happens gas-free
|
|
816
|
+
- Sub-cent payments ($0.001, $0.0001) become economically viable for per-call API pricing
|
|
817
|
+
- Cross-chain support via Circle's Gateway — works on any EVM chain
|
|
818
|
+
|
|
819
|
+
This is especially useful for high-frequency agent workflows where gas costs would otherwise exceed the payment amount. See [Circle's announcement](https://www.mexc.com/news/971904) for protocol details.
|
|
820
|
+
|
|
821
|
+
---
|
|
822
|
+
|
|
568
823
|
## x402 Ecosystem — 75M+ Transactions, Cloudflare Native Support
|
|
569
824
|
|
|
570
825
|
agentpay-mcp is built on the [x402 HTTP payment standard](https://x402.org), which has now processed **75M+ transactions on Base mainnet** — primarily through Coinbase Agentic Wallets and developer integrations.
|
|
@@ -621,6 +876,12 @@ Add this MCP server to any OpenAI Agents SDK workflow via MCP bridge. The agent
|
|
|
621
876
|
|
|
622
877
|
---
|
|
623
878
|
|
|
879
|
+
## Google AP2 Compatibility
|
|
880
|
+
|
|
881
|
+
agentpay-mcp complements Google's Agent2Agent Payment (AP2) protocol. AP2 — backed by 60+ organizations including Visa, Mastercard, and PayPal — handles agent payment *authorization*: verifying that a payment request is legitimate. agentpay-mcp operates at the governance layer above AP2, adding per-agent budget caps, daily spend limits, and human-approval thresholds that AP2 deliberately scopes as out-of-band. For enterprises deploying agents across multiple payment rails, agentpay-mcp provides the unified spend governance that no individual protocol covers.
|
|
882
|
+
|
|
883
|
+
---
|
|
884
|
+
|
|
624
885
|
## EU AI Act Compliance
|
|
625
886
|
|
|
626
887
|
**Enforcement deadline: August 2, 2026.** AI systems that execute or facilitate financial transactions are classified as **high-risk** under EU AI Act Annex III. High-risk classification requires:
|
package/dist/index.js
CHANGED
|
@@ -37,10 +37,12 @@ const bridge_js_1 = require("./tools/bridge.js");
|
|
|
37
37
|
const budget_js_1 = require("./tools/budget.js");
|
|
38
38
|
const identity_js_1 = require("./tools/identity.js");
|
|
39
39
|
const escrow_js_1 = require("./tools/escrow.js");
|
|
40
|
+
// ─── Tool imports (v4.2.0 — OTel budget circuit-breaker for AWS AgentCore) ──
|
|
41
|
+
const otel_budget_js_1 = require("./tools/otel-budget.js");
|
|
40
42
|
// ─── Server configuration ──────────────────────────────────────────────────
|
|
41
43
|
const SERVER_INFO = {
|
|
42
44
|
name: 'agentpay-mcp',
|
|
43
|
-
version: '4.
|
|
45
|
+
version: '4.1.5',
|
|
44
46
|
};
|
|
45
47
|
const SERVER_CAPABILITIES = {
|
|
46
48
|
tools: {},
|
|
@@ -81,6 +83,10 @@ const ALL_TOOLS = [
|
|
|
81
83
|
identity_js_1.verifyAgentUAIDTool,
|
|
82
84
|
// v4.0.0 — escrow
|
|
83
85
|
escrow_js_1.createEscrowTool,
|
|
86
|
+
// v4.2.0 — OTel budget circuit-breaker (AWS AgentCore integration)
|
|
87
|
+
otel_budget_js_1.otelRegisterPolicyTool,
|
|
88
|
+
otel_budget_js_1.otelEvaluateSpendTool,
|
|
89
|
+
otel_budget_js_1.otelBudgetStatusTool,
|
|
84
90
|
];
|
|
85
91
|
// ─── Server initialization ─────────────────────────────────────────────────
|
|
86
92
|
const server = new index_js_1.Server(SERVER_INFO, {
|
|
@@ -203,6 +209,19 @@ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
|
203
209
|
const input = escrow_js_1.CreateEscrowSchema.parse(args);
|
|
204
210
|
return (0, escrow_js_1.handleCreateEscrow)(input);
|
|
205
211
|
}
|
|
212
|
+
// ── v4.2.0 — OTel budget circuit-breaker ─────────────────────────
|
|
213
|
+
case 'otel_register_budget_policy': {
|
|
214
|
+
const input = otel_budget_js_1.OTelRegisterPolicySchema.parse(args);
|
|
215
|
+
return (0, otel_budget_js_1.handleOTelRegisterPolicy)(input);
|
|
216
|
+
}
|
|
217
|
+
case 'otel_evaluate_spend': {
|
|
218
|
+
const input = otel_budget_js_1.OTelEvaluateSpendSchema.parse(args);
|
|
219
|
+
return (0, otel_budget_js_1.handleOTelEvaluateSpend)(input);
|
|
220
|
+
}
|
|
221
|
+
case 'otel_budget_status': {
|
|
222
|
+
const input = otel_budget_js_1.OTelBudgetStatusSchema.parse(args);
|
|
223
|
+
return (0, otel_budget_js_1.handleOTelBudgetStatus)(input);
|
|
224
|
+
}
|
|
206
225
|
default:
|
|
207
226
|
return {
|
|
208
227
|
content: [
|
|
@@ -242,7 +261,7 @@ async function main() {
|
|
|
242
261
|
});
|
|
243
262
|
await server.connect(transport);
|
|
244
263
|
// Log to stderr (not stdout — stdout is reserved for MCP protocol)
|
|
245
|
-
process.stderr.write(`AgentPay MCP
|
|
264
|
+
process.stderr.write(`AgentPay MCP v4.1.5 started. ` +
|
|
246
265
|
`Wallet: ${process.env['AGENT_WALLET_ADDRESS'] ?? '(not configured)'} | ` +
|
|
247
266
|
`Chain: ${process.env['CHAIN_ID'] ?? '8453 (Base Mainnet)'} | ` +
|
|
248
267
|
`Session TTL: ${process.env['SESSION_TTL_SECONDS'] ?? '3600'}s\n`);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA;;;;;;;;;;;;;;GAcG;AACH,wEAAmE;AACnE,wEAAiF;AACjF,iEAI4C;AAE5C,8EAA8E;AAE9E,iDAA6F;AAC7F,iDAAgG;AAChG,iDAAsG;AACtG,iDAAgG;AAChG,qDAA4F;AAC5F,6CAA4E;AAC5E,mDAAyH;AAEzH,6EAA6E;AAE7E,mDAa4B;AAE5B,2FAA2F;AAE3F,iDAU2B;AAE3B,uDAO8B;AAE9B,6CAAqF;AAErF,iDAAuF;AAEvF,iDAO2B;AAE3B,qDAU6B;AAE7B,iDAA6F;AAE7F,8EAA8E;AAE9E,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,cAAc;IACpB,OAAO,EAAE,OAAO;CACjB,CAAC;AAEF,MAAM,mBAAmB,GAAG;IAC1B,KAAK,EAAE,EAAE;CACV,CAAC;AAEF,8EAA8E;AAE9E,MAAM,SAAS,GAAG;IAChB,eAAe;IACf,4BAAgB;IAChB,6BAAiB;IACjB,6BAAe;IACf,+BAAmB;IACnB,6BAAiB;IACjB,qBAAW;IACX,sCAAyB;IACzB,iCAAiC;IACjC,iCAAoB;IACpB,iCAAoB;IACpB,kCAAqB;IACrB,+BAAkB;IAClB,kBAAkB;IAClB,2BAAe;IACf,8BAAkB;IAClB,+BAAmB;IACnB,qBAAqB;IACrB,4BAAa;IACb,8BAAe;IACf,gBAAgB;IAChB,wBAAc;IACd,kBAAkB;IAClB,0BAAc;IACd,kBAAkB;IAClB,8BAAkB;IAClB,2BAAe;IACf,oBAAoB;IACpB,qCAAuB;IACvB,+BAAiB;IACjB,uCAAuC;IACvC,iCAAmB;IACnB,kBAAkB;IAClB,4BAAgB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA;;;;;;;;;;;;;;GAcG;AACH,wEAAmE;AACnE,wEAAiF;AACjF,iEAI4C;AAE5C,8EAA8E;AAE9E,iDAA6F;AAC7F,iDAAgG;AAChG,iDAAsG;AACtG,iDAAgG;AAChG,qDAA4F;AAC5F,6CAA4E;AAC5E,mDAAyH;AAEzH,6EAA6E;AAE7E,mDAa4B;AAE5B,2FAA2F;AAE3F,iDAU2B;AAE3B,uDAO8B;AAE9B,6CAAqF;AAErF,iDAAuF;AAEvF,iDAO2B;AAE3B,qDAU6B;AAE7B,iDAA6F;AAE7F,+EAA+E;AAE/E,2DAUgC;AAEhC,8EAA8E;AAE9E,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,cAAc;IACpB,OAAO,EAAE,OAAO;CACjB,CAAC;AAEF,MAAM,mBAAmB,GAAG;IAC1B,KAAK,EAAE,EAAE;CACV,CAAC;AAEF,8EAA8E;AAE9E,MAAM,SAAS,GAAG;IAChB,eAAe;IACf,4BAAgB;IAChB,6BAAiB;IACjB,6BAAe;IAC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