X402 Payment Gated Http
@merkleworks
About X402 Payment Gated Http
Use:
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"x402": {
"command": "npx",
"args": [
"@merkleworks/x402-mcp"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is X402 Payment Gated Http?
X402 Payment Gated Http is an MCP server that lets AI agents call HTTP APIs using the x402 protocol. When an API responds with a 402 Payment Required status, the server automatically handles the payment challenge, builds the proof, retries the request, and returns the final response.
How to use X402 Payment Gated Http?
Install via npx @merkleworks/x402-mcp. Configure in your MCP client (e.g., Cursor’s .cursor/mcp.json) by pointing the command to that package. Then invoke tools such as paid_http_request with a URL and method to make payment-gated HTTP calls.
Key features of X402 Payment Gated Http
- paid_http_request – sends an HTTP request and automatically handles 402 challenges.
- discover_x402_api – finds payable endpoints (e.g., from
/.well-known/x402or probing). - pay_x402_endpoint – calls a known x402 endpoint with full control.
- parse_x402_challenge / verify_x402_proof – inspect and verify x402 headers.
- Runs entirely via
npx; no separate installation steps required.
Use cases of X402 Payment Gated Http
- AI agents accessing premium APIs that require micropayments per request.
- Automating calls to a paywalled data source without manual payment handling.
- Discovering and interacting with unknown x402-enabled endpoints programmatically.
- Testing and debugging x402 protocol headers from within an MCP environment.
FAQ from X402 Payment Gated Http
What is the x402 protocol?
x402 is a protocol that allows HTTP APIs to request payment (402 status) and include a challenge; the client then constructs and attaches a cryptographic proof of payment to retry the request.
How does the automatic payment flow work?
When an API responds with 402, the server parses the challenge, builds the required payment, retries the request with the proof, and returns the API’s final response.
What tools does the MCP server provide?
It offers paid_http_request (main), discover_x402_api, pay_x402_endpoint, parse_x402_challenge, and verify_x402_proof.
What are the runtime dependencies?
The server runs via npx and only requires Node.js. No additional libraries or wallets are mentioned in the README.
How is the server invoked in an MCP client?
Add it to the MCP configuration (e.g., mcpServers.x402 in .cursor/mcp.json) with command: "npx" and args: ["@merkleworks/x402-mcp"].
Frequently asked questions
What is the x402 protocol?
x402 is a protocol that allows HTTP APIs to request payment (402 status) and include a challenge; the client then constructs and attaches a cryptographic proof of payment to retry the request.
How does the automatic payment flow work?
When an API responds with 402, the server parses the challenge, builds the required payment, retries the request with the proof, and returns the API’s final response.
What tools does the MCP server provide?
It offers `paid_http_request` (main), `discover_x402_api`, `pay_x402_endpoint`, `parse_x402_challenge`, and `verify_x402_proof`.
What are the runtime dependencies?
The server runs via `npx` and only requires Node.js. No additional libraries or wallets are mentioned in the README.
How is the server invoked in an MCP client?
Add it to the MCP configuration (e.g., `mcpServers.x402` in `.cursor/mcp.json`) with `command: "npx"` and `args: ["@merkleworks/x402-mcp"]`.
Basic information
More Other MCP servers
Website
FunnyWolfAdversary simulation and Red teaming platform with AI
Reactive Resume
amruthpillaiA one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

Peekaboo MCP – lightning-fast macOS screenshots for AI agents
steipetePeekaboo is a macOS CLI & optional MCP server that enables AI agents to capture screenshots of applications, or the entire system, with optional visual question answering through local or remote AI models.
Maestro
mobile-dev-incPainless E2E Automation for Mobile and Web

DeepMark
DeepMark helps teachers deliver rapid, consistent marking with meaningful feedback for every student — in a fraction of the time. What once took a week, now takes one free period.
Comments