- X402 Payment Gated Http
X402 Payment Gated Http
Use:
Allows AI agents to call payment-gated HTTP APIs using the x402 protocol. Send a request; if the server returns 402 Payment Required, the MCP server handles the challenge, payment, and retry with proof, then returns the API response. Primary tool: paid_http_request.
Overview
What it does
x402 Payment-Gated HTTP lets AI agents call HTTP APIs that use the x402 protocol. If the API responds with 402 Payment Required, the MCP server handles the challenge, builds the payment, and retries with a proof, then returns the final response.
Primary tool
- paid_http_request — Send a request to a URL; if the server returns 402, the flow (parse challenge → pay → retry with proof) runs automatically and the tool returns the API response.
Other tools
- discover_x402_api — Find payable endpoints (e.g. from
/.well-known/x402or by probing). - pay_x402_endpoint — Call a known x402 endpoint with full control.
- parse_x402_challenge / verify_x402_proof — Inspect and verify x402 headers.
Install
npx @merkleworks/x402-mcp
Example (Cursor)
Add to .cursor/mcp.json:
{
"mcpServers": {
"x402": {
"command": "npx",
"args": ["@merkleworks/x402-mcp"]
}
}
}
Example tool call
-
Tool:
paid_http_request -
Input:
{ "url": "https://your-x402-api.example.com/v1/expensive", "method": "GET" }
Server Config
{
"mcpServers": {
"x402": {
"command": "npx",
"args": [
"@merkleworks/x402-mcp"
]
}
}
}Project Info
Created At
3 months agoUpdated At
3 months agoAuthor Name
merkleworksStar
-Language
-License
-Recommend Servers
View All虎嗅嗅 Ai行业参谋
a day ago
Payai X402 Tools
9 hours ago
Tip Mcp Server
@tip
42 minutes ago
Fabric
@fabric-agent-plugins
a day ago