Enables AI agents to securely access APIs, manage credentials via a vault, and execute governed payments with human-in-the-loop approvals.
Also known as Rumblingb/Agentpay, @agentpayxyz/mcp-server
- Stars
- 2
- Tools
- —
- Downloads, 30 days
- 366
- Latest version
- 0.2.0
- Last commit
- Oct 25, 2026
- License
- —
What is AgentPay MCP?
AgentPay enables AI agents to securely access APIs, manage credentials via a vault, and execute governed payments with human-in-the-loop approvals.
Summary generated from the project's README
About AgentPay MCP server
AgentPay acts as a security and authority layer for AI agents, allowing them to interact with the real world without exposing raw credentials in chat. It provides a capability vault where users can store provider keys, ensuring agents only receive governed access rather than sensitive secrets. This setup is designed for developers building autonomous agents that need to use paid APIs like Firecrawl, Databento, Browserbase, or Exa.
Users can deploy the server locally using npx or connect via remote MCP using a Bearer token. The system manages the entire lifecycle of an agentic task, including requesting API access, setting spend limits, and handling human-in-the-loop approvals via OTP. A standout feature is the exact-call resume capability, which allows an agent to automatically continue a specific blocked call once a human provides the necessary payment or authorization, preventing the need to reconstruct the request.
What you can do with it
- 1Secure API Credential ManagementA developer can grant an agent access to a service like Firecrawl without ever pasting the raw API key into the chat interface.
- 2Governed Financial GuardrailsYou can instruct an agent to use a specific tool while enforcing a strict budget and requiring manual approval for higher costs.
- 3Automated Task ResumptionWhen an agent hits a paywall or requires authorization, the system pauses and then automatically finishes the exact call once approved.
- 4E-commerce Product DiscoveryAn agent can use specialized commerce tools to discover products and audit catalogs based on a predefined buyer constitution.
Written from the project's README. Every use case is checked against a quote from it.
How to install AgentPay MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall AgentPay MCP in Claude Code
$ claude mcp add --env 'AGENTPAY_API_KEY=<YOUR_AGENTPAY_API_KEY>' agentpay -- npx -y @agentpayxyz/mcp-serverInstall AgentPay MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"agentpay": {
"command": "npx",
"args": [
"-y",
"@agentpayxyz/mcp-server"
],
"env": {
"AGENTPAY_API_KEY": "<YOUR_AGENTPAY_API_KEY>"
}
}
}
}Install AgentPay MCP in VS Code
.vscode/mcp.json
{
"servers": {
"agentpay": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@agentpayxyz/mcp-server"
],
"env": {
"AGENTPAY_API_KEY": "<YOUR_AGENTPAY_API_KEY>"
}
}
}
}Install AgentPay MCP in VS Code CLI
$ code --add-mcp '{"name":"agentpay","type":"stdio","command":"npx","args":["-y","@agentpayxyz/mcp-server"],"env":{"AGENTPAY_API_KEY":"<YOUR_AGENTPAY_API_KEY>"}}'Install AgentPay MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"agentpay": {
"command": "npx",
"args": [
"-y",
"@agentpayxyz/mcp-server"
],
"env": {
"AGENTPAY_API_KEY": "<YOUR_AGENTPAY_API_KEY>"
}
}
}
}Install AgentPay MCP in Codex
$ codex mcp add agentpay --env 'AGENTPAY_API_KEY=<YOUR_AGENTPAY_API_KEY>' -- npx -y @agentpayxyz/mcp-serverInstall AgentPay MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.agentpay] command = "npx" args = ["-y", "@agentpayxyz/mcp-server"] [mcp_servers.agentpay.env] AGENTPAY_API_KEY = "<YOUR_AGENTPAY_API_KEY>"
Install AgentPay MCP in Gemini CLI
$ gemini mcp add -s user -e 'AGENTPAY_API_KEY=<YOUR_AGENTPAY_API_KEY>' agentpay npx -- -y @agentpayxyz/mcp-serverInstall AgentPay MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"agentpay": {
"command": "npx",
"args": [
"-y",
"@agentpayxyz/mcp-server"
],
"env": {
"AGENTPAY_API_KEY": "<YOUR_AGENTPAY_API_KEY>"
}
}
}
}Needs a key before it starts
Started on 16 Nov 2026 with no keys, it stopped and asked for one, so a client sees no tools until you set the variables above.
Configuration
AGENTPAY_API_KEYRequiredSecretAgentPay merchant API key used for authenticated tool calls
AGENTPAY_API_URLOptional override for the AgentPay API base URL
AGENTPAY_MERCHANT_IDOptional AgentPay merchant ID for intent creation and attribution
BEE_CASPER_RECEIPT_IDCASPER_PRIVATE_KEY_HEXCASPER_RECIPIENT_PUBLIC_KEY_HEX
| Name | Description | |
|---|---|---|
| AGENTPAY_API_KEY | AgentPay merchant API key used for authenticated tool calls | RequiredSecret |
| AGENTPAY_API_URL | Optional override for the AgentPay API base URL | |
| AGENTPAY_MERCHANT_ID | Optional AgentPay merchant ID for intent creation and attribution | |
| BEE_CASPER_RECEIPT_ID | — | |
| CASPER_PRIVATE_KEY_HEX | — | |
| CASPER_RECIPIENT_PUBLIC_KEY_HEX | — |
Automated checks
Ran Nov 12, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work · What to fix for more points
- Source repository linked and reachablePass
- Open source license (OSI)No licenseFinding
- Commit or release in the last yearPass
- Package name not close to a popular packagePass
- Remote endpoint uses HTTPSPass
- Destructive tools are labelledNot checked
- No hidden instructions to the modelPass
- No critical advisory in the package or its dependenciesPass
README
View on GitHubAgentPay
AgentPay is the authority layer between an AI agent and the real world. It handles provider access, funding authority, human approval, exact-call resume, and proof so agents can finish work end to end without raw secrets in chat or repeated dashboard setup.
It is not a generic "agent platform." It is the trust seam that makes autonomous execution usable.
npx -y @agentpayxyz/mcp-server
That one command gives any MCP-compatible host the ability to:
- request API access
- vault credentials without exposing the raw key to the agent
- run governed paid execution
- pause for OTP or approval only when needed
- resume the exact blocked call automatically
- reuse governed access later from the same workbench
AgentPay Commerce Network
AgentPay now has a focused ecommerce surface: shoppers discover products by a concrete need, then set a visual Buyer Constitution for category scope, budget, delivery, returns, merchant policy, and human approval. AgentPay enforces that constitution before optional model ranking, and approved matches continue to merchant checkout. Merchants get the other side of the demand graph through catalog truth, source-grounded product imagery, and signed attribution drafts.
- Shopper experience:
/commerce - Seller growth workspace:
/commerce/studio - Need-led API:
POST /api/commerce/discover - Closed-world GPT-5.6 compiler:
POST /api/commerce/compile - Catalog audit API:
POST /api/commerce/catalog/audit - MCP tools:
agentpay_discover_products,agentpay_compile_product_decision, andagentpay_audit_catalog_truth - Founder and SEO specification: docs/COMMERCE_CONTROL_PLANE.md
- OpenAI Build Week evidence and judge runbook: docs/OPENAI_BUILD_WEEK_2026.md
- Dated hackathon reuse decisions and event-specific build boundaries: docs/HACKATHON_REUSE_2026-07-18.md
The included inventory and demand indexes are sandbox fixtures. They do not represent live merchants, customers, orders, or revenue. Merchant connections, public inventory, conversion webhooks, fee collection, and deployment remain separate approval and validation gates.
Casper Buildathon Entry
Bee + Clickey: Founder-in-a-Box with Casper-Verifiable Agent Payments
Bee is the operator brain. Clickey is the desktop companion. Together they route work across a real local AI fleet, discover tools through the AgentPay Feed MCP, and stage payment receipts through founder-approved rails. For the Casper Agentic Buildathon, the project adds a Casper-native receipt path: Bee can stage x402-casper payment payloads and bind a Bee mandate/receipt id to a Casper Testnet transfer.
Start here:
Judges can verify the local proof path:
node --test ops/mac-mini/bee/bee.test.mjs
ops/mac-mini/bin/bee doctor
ops/mac-mini/bin/bee caps
ops/mac-mini/bin/bee feed
npm --prefix ops/mac-mini/bee/casper run proof
npm --prefix ops/mac-mini/bee/casper run video
Broadcasting a real testnet proof requires a dedicated funded Casper testnet key:
CASPER_PRIVATE_KEY_HEX=<testnet-private-key-hex> \
CASPER_RECIPIENT_PUBLIC_KEY_HEX=<recipient-public-key-hex> \
BEE_CASPER_RECEIPT_ID=<bee-mandate-id-or-demo-receipt-id> \
npm --prefix ops/mac-mini/bee/casper run receipt
Bee can prepare and stage high-impact actions, but it does not autonomously publish, upload, change OAuth/account settings, move money, or bypass founder approval. Live settlement remains founder-triggered.
Why it exists
Agents fail at the same place every time:
- they need an API the developer has not wired yet
- they need a credential the human should not paste into chat
- they hit a paid step and lose continuity
AgentPay fixes that seam.
Capability Vault Users connect a provider once through AgentPay. The raw credential is vaulted server-side. The agent receives only governed capability access.
Governed paid execution Humans set guardrails once: funding rail, auto-approve limit, OTP policy, and spend limits. AgentPay enforces those rules when the agent acts.
Exact-call resume When a paid step needs a human, AgentPay pauses, collects the minimum approval, and resumes the exact blocked call without asking the agent to reconstruct it.
Same-workbench reuse Local projects never need raw provider keys. AgentPay can issue opaque, revocable workbench leases so the same workbench can reuse governed access later.
The inevitable path
This is the path AgentPay is built around:
- Agent asks for an API.
- AgentPay checks whether governed access already exists.
- If not, AgentPay runs one hosted setup flow for authority and provider connection.
- The agent uses the capability for free until paid usage is required.
- AgentPay pauses for OTP or confirmation only if policy requires it.
- AgentPay resumes the exact blocked call.
- The same workbench can reuse governed access later without re-entering the secret.
Get started in 30 seconds
Add AgentPay to Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"agentpay": {
"command": "npx",
"args": ["-y", "@agentpayxyz/mcp-server"],
"env": {
"AGENTPAY_API_KEY": "apk_your_key_here",
"AGENTPAY_MERCHANT_ID": "your_merchant_id"
}
}
}
}
Get your API key:
curl -s -X POST https://api.agentpay.so/api/merchants/register \
-H "Content-Type: application/json" \
-d '{ "name": "My Agent", "email": "you@example.com" }'
Now ask your host:
"My agent needs Firecrawl. Set a $5 auto-approve limit, ask for OTP above that, and keep the key out of chat."
Or:
"My agent needs Databento for this workbench. If access already exists, reuse it. If not, start the minimal AgentPay setup flow."
Terminal-native control plane
AgentPay should be operated through hosts and terminals, not a merchant dashboard.
Key surfaces:
GET /api/capabilities/authority-bootstrapPOST /api/capabilities/authority-bootstrapPOST /api/capabilities/access-resolvePOST /api/capabilities/onboarding-sessionsPOST /api/capabilities/lease-executeGET /api/capabilities/leasesPOST /api/capabilities/leases/:leaseId/revokePOST /api/capabilities/:capabilityId/execute
These let a host or agent:
- read authority state
- set guardrails
- connect providers
- request human approval only when needed
- reuse governed access safely later
Flagship provider paths
The current wedge is strongest when AgentPay owns setup and continuity for high-value agent APIs.
Current priority paths:
- Databento
- Firecrawl
- Browserbase
- Exa
- Generic REST API fallback
The product goal is simple: visiting provider dashboards should become the exception, not the default.
Remote MCP
For hosts that support remote MCP:
https://api.agentpay.so/api/mcp
Authenticate with your API key as a Bearer token, or mint a short-lived token for Claude, OpenAI, or another remote MCP host:
curl -X POST https://api.agentpay.so/api/mcp/tokens \
-H "Authorization: Bearer apk_your_key_here" \
-d '{ "audience": "openai", "ttlSeconds": 3600 }'
Ace - built on AgentPay
Ace is a proof front door built on AgentPay. It demonstrates the core seam under real-world conditions. It is not the core story.
Product truth
If a human still has to:
- paste a raw provider key into chat
- rebuild a blocked call after payment
- keep reopening provider dashboards
- or lose continuity between approval and execution
then the product is still unfinished.
Developer resources
| Resource | Link |
|---|---|
| Quickstart | QUICKSTART.md |
| MCP server reference | packages/mcp-server/README.md |
| Full API reference | openapi.yaml |
| Terminal-native control plane | docs/TERMINAL_NATIVE_CONTROL_PLANE_20260419.md |
| Examples | examples/README.md |
| Security model | docs/SECURITY_MODEL.md |
| Secure payment providers | docs/PAYMENT_PROVIDERS.md |
| Commerce network | docs/COMMERCE_CONTROL_PLANE.md |
Repository layout
apps/
api-edge/ Cloudflare Workers public API
meridian/ Ace front door
packages/
mcp-server/ Published MCP package
sdk/ TypeScript SDK
sdk-node/ Node.js SDK
examples/ Example agents and adapters
docs/ Architecture and product notes
migrations/ PostgreSQL migrations
ops/ Founder and growth operating artifacts
License
Business Source License 1.1. Converts to AGPL-3.0 on 2029-01-01.
AgentPay MCP questions
How do I add AgentPay MCP to Claude Code?
Run claude mcp add --env 'AGENTPAY_API_KEY=<YOUR_AGENTPAY_API_KEY>' agentpay -- npx -y @agentpayxyz/mcp-server in your terminal. Add --scope user to make it available in every project.
How do I add AgentPay MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
How does AgentPay handle API credentials?
It uses a Capability Vault where users connect a provider once and the raw credential is vaulted server-side, providing the agent only with governed access.
Can agents perform paid actions autonomously?
Agents can perform paid execution within user-defined guardrails, such as auto-approve limits and OTP policies.
What happens if a paid API call requires human approval?
AgentPay pauses the process, collects the necessary approval or OTP, and then automatically resumes the exact call that was blocked.