From 00354a2b9c1c51bd83f98d9265ea4bb37369a2a4 Mon Sep 17 00:00:00 2001 From: MQ37 Date: Sun, 29 Mar 2026 17:48:39 -0700 Subject: [PATCH 1/5] docs(mcp): add x402 protocol to agentic payments --- sources/platform/integrations/ai/mcp.md | 68 ++++++++++++++++++++++--- 1 file changed, 62 insertions(+), 6 deletions(-) diff --git a/sources/platform/integrations/ai/mcp.md b/sources/platform/integrations/ai/mcp.md index 3842045fc5..4b335c2e4b 100644 --- a/sources/platform/integrations/ai/mcp.md +++ b/sources/platform/integrations/ai/mcp.md @@ -326,16 +326,72 @@ For a detailed overview of client support for dynamic discovery, see the [MCP cl ::: -## Agentic payments with Skyfire +## Agentic payments -The Apify MCP server integrates with [Skyfire](https://www.skyfire.xyz/) to enable _agentic payments_. This allows AI agents to autonomously pay for Actor runs without requiring an Apify API token. Instead of authenticating with an Apify token, the agent uses Skyfire _PAY tokens_ to cover billing for each tool call. +Agentic payments allow AI agents to autonomously pay for Actor runs without requiring an Apify API token. The Apify MCP server supports two payment methods: -### Prerequisites +- [x402 protocol](#x402-protocol) - Direct on-chain payments using USDC on the [Base](https://www.base.org/) blockchain via the open [x402](https://www.x402.org/) standard. +- [Skyfire](#skyfire) - Managed payment tokens through the [Skyfire](https://www.skyfire.xyz/) payment platform. + +### x402 protocol + +The [x402 protocol](https://www.x402.org/) is an open standard for internet-native payments. The Apify MCP server implements an MCP extension of this protocol to support agentic payments. The client automatically detects payment requirements in the tool's metadata and signs a USDC payment on the [Base](https://www.base.org/) blockchain (mainnet) to include with the tool call - no human intervention needed. + +#### Prerequisites + +- _`mcpc` CLI_ - Install the [`mcpc` CLI](https://github.com/apify/mcpc) (`npm install -g mcpc`), the Universal MCP command-line client. +- _USDC on Base_ - A wallet funded with USDC on the [Base](https://www.base.org/) mainnet blockchain. + +#### Setup + +Set up a local wallet and connect to the Apify MCP server with x402 payment support. + +1. Create or import a wallet: + + ```bash + # Create a new wallet (generates a random private key) + mcpc x402 init + + # Or import an existing wallet from a private key + mcpc x402 import + + # Verify your wallet address + mcpc x402 info + ``` + +1. Fund the wallet with USDC on Base mainnet. + +1. Connect to the Apify MCP server with x402 payment mode enabled. Add the `?payment=x402` query parameter to the server URL and pass the `--x402` flag to `mcpc`: + + ```bash + mcpc connect "mcp.apify.com?payment=x402" @apify --x402 + ``` + +1. Call tools as usual. Payments are handled automatically: + + ```bash + mcpc @apify tools-call call-actor actor:="apify/rag-web-browser" input:='{"query": "latest AI news"}' + ``` + +#### How it works + +1. The Apify MCP server advertises payment requirements in each paid tool's metadata. +1. When `mcpc` calls a paid tool, it automatically signs a USDC payment using your local wallet and includes it in the request. +1. The server verifies and settles the payment on-chain, then executes the tool and returns the result. +1. If a tool is called without a payment, the server responds with HTTP 402 and `mcpc` signs and retries automatically. + +The Apify MCP server requires a minimum transaction of $1.00 USD. The payment is tracked as a balance on the server - subsequent tool calls draw from this balance without requiring a new on-chain transaction. When the balance runs out, `mcpc` automatically signs a new payment to top it up. After a period of inactivity, any remaining unused balance is refunded to the client's wallet address on the Base blockchain. + +### Skyfire + +[Skyfire](https://www.skyfire.xyz/) provides agentic payments using managed _PAY tokens_. Instead of direct on-chain payments, the agent creates a PAY token through the Skyfire MCP server to cover billing for each tool call. + +#### Prerequisites - _Skyfire account_ - Sign up for a [Skyfire account](https://www.skyfire.xyz/) and fund your wallet. - _MCP client with multi-server support_ - An MCP client that supports multiple servers, such as Claude Desktop or VS Code. -### Setup +#### Setup Configure both the Skyfire MCP server and the Apify MCP server in your client. Enable payment mode by adding the `payment=skyfire` query parameter to the Apify server URL: @@ -357,7 +413,7 @@ Configure both the Skyfire MCP server and the Apify MCP server in your client. E Replace `` with your API key from your [Skyfire dashboard](https://www.skyfire.xyz/). -### How it works +#### How it works When Skyfire payment mode is enabled, the agent handles the full payment flow autonomously: @@ -366,7 +422,7 @@ When Skyfire payment mode is enabled, the agent handles the full payment flow au 1. The agent passes the PAY token in the `skyfire-pay-id` input property when calling the Actor tool. 1. The Actor returns results as usual. Unused funds on the token remain available for future runs or return upon expiration. -To learn more, see the [Skyfire integration documentation](/platform/integrations/skyfire) and the [Agentic Payments with Skyfire](https://blog.apify.com/agentic-payments-skyfire/) blog post. +To learn more, see the [Skyfire integration documentation](/platform/integrations/skyfire) and the [Agentic payments with Skyfire](https://blog.apify.com/agentic-payments-skyfire/) blog post. ## Telemetry From 8ef71e4e346720e4e3664651472646d18fa7792a Mon Sep 17 00:00:00 2001 From: MQ37 Date: Sun, 29 Mar 2026 18:27:13 -0700 Subject: [PATCH 2/5] docs(mcp): fix mcpc installation command --- sources/platform/integrations/ai/mcp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/platform/integrations/ai/mcp.md b/sources/platform/integrations/ai/mcp.md index 4b335c2e4b..0b0978373d 100644 --- a/sources/platform/integrations/ai/mcp.md +++ b/sources/platform/integrations/ai/mcp.md @@ -339,7 +339,7 @@ The [x402 protocol](https://www.x402.org/) is an open standard for internet-nati #### Prerequisites -- _`mcpc` CLI_ - Install the [`mcpc` CLI](https://github.com/apify/mcpc) (`npm install -g mcpc`), the Universal MCP command-line client. +- _`mcpc` CLI_ - Install the [`mcpc` CLI](https://github.com/apify/mcpc) (`npm install -g @apify/mcpc`), the Universal MCP command-line client. - _USDC on Base_ - A wallet funded with USDC on the [Base](https://www.base.org/) mainnet blockchain. #### Setup From b48be09d120270ee71f1b87775b8305bf651eb86 Mon Sep 17 00:00:00 2001 From: MQ37 Date: Sun, 29 Mar 2026 18:32:49 -0700 Subject: [PATCH 3/5] docs(mcp): update mcpc github link and remove 402 status code mention --- sources/platform/integrations/ai/mcp.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/platform/integrations/ai/mcp.md b/sources/platform/integrations/ai/mcp.md index 0b0978373d..c92156984a 100644 --- a/sources/platform/integrations/ai/mcp.md +++ b/sources/platform/integrations/ai/mcp.md @@ -339,7 +339,7 @@ The [x402 protocol](https://www.x402.org/) is an open standard for internet-nati #### Prerequisites -- _`mcpc` CLI_ - Install the [`mcpc` CLI](https://github.com/apify/mcpc) (`npm install -g @apify/mcpc`), the Universal MCP command-line client. +- _`mcpc` CLI_ - Install the [`mcpc` CLI](https://github.com/apify/mcp-cli) (`npm install -g @apify/mcpc`), the Universal MCP command-line client. - _USDC on Base_ - A wallet funded with USDC on the [Base](https://www.base.org/) mainnet blockchain. #### Setup @@ -378,7 +378,7 @@ Set up a local wallet and connect to the Apify MCP server with x402 payment supp 1. The Apify MCP server advertises payment requirements in each paid tool's metadata. 1. When `mcpc` calls a paid tool, it automatically signs a USDC payment using your local wallet and includes it in the request. 1. The server verifies and settles the payment on-chain, then executes the tool and returns the result. -1. If a tool is called without a payment, the server responds with HTTP 402 and `mcpc` signs and retries automatically. +1. If a tool is called without a payment, the server responds that payment is required and `mcpc` signs and retries automatically. The Apify MCP server requires a minimum transaction of $1.00 USD. The payment is tracked as a balance on the server - subsequent tool calls draw from this balance without requiring a new on-chain transaction. When the balance runs out, `mcpc` automatically signs a new payment to top it up. After a period of inactivity, any remaining unused balance is refunded to the client's wallet address on the Base blockchain. From 5b66eac6e4d94c21375f3509bcf9a016c1c3e85c Mon Sep 17 00:00:00 2001 From: Marcel Rebro Date: Tue, 31 Mar 2026 13:31:11 +0200 Subject: [PATCH 4/5] review and reformatting --- sources/platform/integrations/ai/mcp.md | 95 +-------------------- sources/platform/integrations/ai/skyfire.md | 4 +- sources/platform/integrations/ai/x402.md | 74 ++++++++++++++++ 3 files changed, 79 insertions(+), 94 deletions(-) create mode 100644 sources/platform/integrations/ai/x402.md diff --git a/sources/platform/integrations/ai/mcp.md b/sources/platform/integrations/ai/mcp.md index c92156984a..88091c532c 100644 --- a/sources/platform/integrations/ai/mcp.md +++ b/sources/platform/integrations/ai/mcp.md @@ -330,99 +330,10 @@ For a detailed overview of client support for dynamic discovery, see the [MCP cl Agentic payments allow AI agents to autonomously pay for Actor runs without requiring an Apify API token. The Apify MCP server supports two payment methods: -- [x402 protocol](#x402-protocol) - Direct on-chain payments using USDC on the [Base](https://www.base.org/) blockchain via the open [x402](https://www.x402.org/) standard. -- [Skyfire](#skyfire) - Managed payment tokens through the [Skyfire](https://www.skyfire.xyz/) payment platform. +- [x402 protocol](/integrations/x402) - Direct on-chain payments using USDC on the [Base](https://www.base.org/) blockchain via the open [x402](https://www.x402.org/) standard. +- [Skyfire](/integrations/skyfire) - Managed payment tokens through the [Skyfire](https://www.skyfire.xyz/) payment platform. -### x402 protocol - -The [x402 protocol](https://www.x402.org/) is an open standard for internet-native payments. The Apify MCP server implements an MCP extension of this protocol to support agentic payments. The client automatically detects payment requirements in the tool's metadata and signs a USDC payment on the [Base](https://www.base.org/) blockchain (mainnet) to include with the tool call - no human intervention needed. - -#### Prerequisites - -- _`mcpc` CLI_ - Install the [`mcpc` CLI](https://github.com/apify/mcp-cli) (`npm install -g @apify/mcpc`), the Universal MCP command-line client. -- _USDC on Base_ - A wallet funded with USDC on the [Base](https://www.base.org/) mainnet blockchain. - -#### Setup - -Set up a local wallet and connect to the Apify MCP server with x402 payment support. - -1. Create or import a wallet: - - ```bash - # Create a new wallet (generates a random private key) - mcpc x402 init - - # Or import an existing wallet from a private key - mcpc x402 import - - # Verify your wallet address - mcpc x402 info - ``` - -1. Fund the wallet with USDC on Base mainnet. - -1. Connect to the Apify MCP server with x402 payment mode enabled. Add the `?payment=x402` query parameter to the server URL and pass the `--x402` flag to `mcpc`: - - ```bash - mcpc connect "mcp.apify.com?payment=x402" @apify --x402 - ``` - -1. Call tools as usual. Payments are handled automatically: - - ```bash - mcpc @apify tools-call call-actor actor:="apify/rag-web-browser" input:='{"query": "latest AI news"}' - ``` - -#### How it works - -1. The Apify MCP server advertises payment requirements in each paid tool's metadata. -1. When `mcpc` calls a paid tool, it automatically signs a USDC payment using your local wallet and includes it in the request. -1. The server verifies and settles the payment on-chain, then executes the tool and returns the result. -1. If a tool is called without a payment, the server responds that payment is required and `mcpc` signs and retries automatically. - -The Apify MCP server requires a minimum transaction of $1.00 USD. The payment is tracked as a balance on the server - subsequent tool calls draw from this balance without requiring a new on-chain transaction. When the balance runs out, `mcpc` automatically signs a new payment to top it up. After a period of inactivity, any remaining unused balance is refunded to the client's wallet address on the Base blockchain. - -### Skyfire - -[Skyfire](https://www.skyfire.xyz/) provides agentic payments using managed _PAY tokens_. Instead of direct on-chain payments, the agent creates a PAY token through the Skyfire MCP server to cover billing for each tool call. - -#### Prerequisites - -- _Skyfire account_ - Sign up for a [Skyfire account](https://www.skyfire.xyz/) and fund your wallet. -- _MCP client with multi-server support_ - An MCP client that supports multiple servers, such as Claude Desktop or VS Code. - -#### Setup - -Configure both the Skyfire MCP server and the Apify MCP server in your client. Enable payment mode by adding the `payment=skyfire` query parameter to the Apify server URL: - -```json -{ - "mcpServers": { - "skyfire": { - "url": "https://api.skyfire.xyz/mcp/sse", - "headers": { - "skyfire-api-key": "" - } - }, - "apify": { - "url": "https://mcp.apify.com?payment=skyfire" - } - } -} -``` - -Replace `` with your API key from your [Skyfire dashboard](https://www.skyfire.xyz/). - -#### How it works - -When Skyfire payment mode is enabled, the agent handles the full payment flow autonomously: - -1. The agent discovers relevant Actors via `search-actors` or `fetch-actor-details` (these remain free). -1. Before executing an Actor, the agent creates a PAY token using the `create-pay-token` tool from the Skyfire MCP server (minimum $5.00 USD). -1. The agent passes the PAY token in the `skyfire-pay-id` input property when calling the Actor tool. -1. The Actor returns results as usual. Unused funds on the token remain available for future runs or return upon expiration. - -To learn more, see the [Skyfire integration documentation](/platform/integrations/skyfire) and the [Agentic payments with Skyfire](https://blog.apify.com/agentic-payments-skyfire/) blog post. +For setup instructions and details, see the individual integration pages. ## Telemetry diff --git a/sources/platform/integrations/ai/skyfire.md b/sources/platform/integrations/ai/skyfire.md index e6674a73dd..9f909bca78 100644 --- a/sources/platform/integrations/ai/skyfire.md +++ b/sources/platform/integrations/ai/skyfire.md @@ -13,9 +13,9 @@ Agentic payments enable AI agents to autonomously run Apify Actors using third-p Apify supports agentic payments through _Skyfire_, a payment network specifically designed for AI agents. -:::warning Experimental feature +:::caution Experimental feature -Keep in mind that agentic payments are an experimental feature and may undergo significant changes considering the rapid evolution of payment protocols and AI technologies. +Agentic payments are an experimental feature and may change significantly as payment protocols and AI technologies evolve. ::: diff --git a/sources/platform/integrations/ai/x402.md b/sources/platform/integrations/ai/x402.md new file mode 100644 index 0000000000..c0afebc82f --- /dev/null +++ b/sources/platform/integrations/ai/x402.md @@ -0,0 +1,74 @@ +--- +title: Agentic payments with x402 protocol +sidebar_label: x402 +description: Use the x402 protocol to enable AI agents to autonomously pay for Apify Actor runs using USDC on the Base blockchain. +sidebar_position: 19 +slug: /integrations/x402 +--- + +Agentic payments enable AI agents to autonomously run Apify Actors using third-party payment providers, without requiring traditional Apify user accounts. This allows agents to discover, execute, and pay for web scraping and automation tasks independently. + +Apify supports agentic payments through the [x402 protocol](https://www.x402.org/), an open standard for internet-native payments. + +:::caution Experimental feature + +Agentic payments are an experimental feature and may change significantly as payment protocols and AI technologies evolve. + +::: + +## What is x402 + +The [x402 protocol](https://www.x402.org/) is an open standard for internet-native payments. It enables direct on-chain payments using USDC on the [Base](https://www.base.org/) blockchain. + +The Apify MCP server implements an MCP extension of this protocol to support agentic payments. The client automatically detects payment requirements in the tool's metadata and signs a USDC payment on the Base blockchain (mainnet). This payment is included with the tool call - no human intervention needed. + +## Use x402 with Apify MCP server + +The [Apify MCP server](/integrations/mcp) provides the simplest way for agents to access Apify's Actor library using x402 payments. + +### Prerequisites + +- _`mcpc` CLI_ - Install the [`mcpc` CLI](https://github.com/apify/mcp-cli) (`npm install -g @apify/mcpc`), the Universal MCP command-line client. +- _USDC on Base_ - A wallet funded with USDC on the [Base](https://www.base.org/) mainnet blockchain. + +### Setup + +Set up a local wallet and connect to the Apify MCP server with x402 payment support. + +1. Create or import a wallet: + + ```bash + # Create a new wallet (generates a random private key) + mcpc x402 init + + # Or import an existing wallet from a private key + mcpc x402 import + + # Verify your wallet address + mcpc x402 info + ``` + +1. Fund the wallet with USDC on Base mainnet. + +1. Connect to the Apify MCP server with x402 payment mode enabled. Add the `?payment=x402` query parameter to the server URL and pass the `--x402` flag to `mcpc`: + + ```bash + mcpc connect "mcp.apify.com?payment=x402" @apify --x402 + ``` + +1. Call tools as usual. Payments are handled automatically: + + ```bash + mcpc @apify tools-call call-actor actor:="apify/rag-web-browser" input:='{"query": "latest AI news"}' + ``` + +### How it works + +When x402 payment mode is enabled, the agent handles the full payment flow autonomously: + +1. The Apify MCP server advertises payment requirements in each paid tool's metadata. +1. When `mcpc` calls a paid tool, it automatically signs a USDC payment using your local wallet and includes it in the request. +1. The server verifies and settles the payment on-chain, then executes the tool and returns the result. +1. If a tool is called without a payment, the server responds that payment is required and `mcpc` signs and retries automatically. + +The Apify MCP server requires a minimum transaction of $1.00. The server tracks the payment as a balance. Subsequent tool calls draw from this balance without requiring a new on-chain transaction. When the balance runs out, `mcpc` automatically signs a new payment to top it up. After a period of inactivity, the server refunds any remaining unused balance to the client's wallet address on the Base blockchain. From fe8a0e669f86bf77f3c369f393219cc960fb748a Mon Sep 17 00:00:00 2001 From: MQ37 Date: Tue, 31 Mar 2026 20:17:23 -0700 Subject: [PATCH 5/5] docs: fix broken integration links --- sources/platform/integrations/ai/mcp.md | 4 ++-- sources/platform/integrations/ai/x402.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/platform/integrations/ai/mcp.md b/sources/platform/integrations/ai/mcp.md index 88091c532c..622ed2694a 100644 --- a/sources/platform/integrations/ai/mcp.md +++ b/sources/platform/integrations/ai/mcp.md @@ -330,8 +330,8 @@ For a detailed overview of client support for dynamic discovery, see the [MCP cl Agentic payments allow AI agents to autonomously pay for Actor runs without requiring an Apify API token. The Apify MCP server supports two payment methods: -- [x402 protocol](/integrations/x402) - Direct on-chain payments using USDC on the [Base](https://www.base.org/) blockchain via the open [x402](https://www.x402.org/) standard. -- [Skyfire](/integrations/skyfire) - Managed payment tokens through the [Skyfire](https://www.skyfire.xyz/) payment platform. +- [x402 protocol](/platform/integrations/x402) - Direct on-chain payments using USDC on the [Base](https://www.base.org/) blockchain via the open [x402](https://www.x402.org/) standard. +- [Skyfire](/platform/integrations/skyfire) - Managed payment tokens through the [Skyfire](https://www.skyfire.xyz/) payment platform. For setup instructions and details, see the individual integration pages. diff --git a/sources/platform/integrations/ai/x402.md b/sources/platform/integrations/ai/x402.md index c0afebc82f..30c3a9c1d0 100644 --- a/sources/platform/integrations/ai/x402.md +++ b/sources/platform/integrations/ai/x402.md @@ -24,7 +24,7 @@ The Apify MCP server implements an MCP extension of this protocol to support age ## Use x402 with Apify MCP server -The [Apify MCP server](/integrations/mcp) provides the simplest way for agents to access Apify's Actor library using x402 payments. +The [Apify MCP server](/platform/integrations/mcp) provides the simplest way for agents to access Apify's Actor library using x402 payments. ### Prerequisites