x402 Deploy

v1.0.0Finance & Fintechstable

Turn any API or MCP server into a paid service with x402

agentagentsaibaseclaude
Share:
22
Stars
0
Downloads
0
Weekly
0/5

What is x402 Deploy?

x402 Deploy is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to turn any api or mcp server into a paid service with x402

Turn any API or MCP server into a paid service with x402

This server falls under the Finance & Fintech category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Turn any API or MCP server into a paid service with x402

Use Cases

Monetized MCP services
Crypto payment integration
API service deployment
nirholas

Maintainer

LicenseMIT
Languagetypescript
Versionv1.0.0
UpdatedApr 23, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx x402-deploy

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use x402 Deploy

x402 Deploy is a CLI tool and MCP server that wraps existing APIs and MCP servers with cryptocurrency-based micropayment verification using the x402 payment protocol on Base (Ethereum L2). With a single 'x402-deploy deploy' command it adds per-route pricing, creates a custodial wallet, and lists your service on x402scan.com so AI agents can discover and pay for it autonomously. It supports Express, Fastify, FastAPI, Next.js, and generic MCP servers, making it straightforward to monetize any developer tool.

Prerequisites

  • Node.js 18 or later installed
  • An existing API server or MCP server to monetize
  • A Base-compatible Ethereum wallet or willingness to use the auto-generated custodial wallet
  • An MCP-compatible client such as Claude Desktop if using the MCP interface
1

Install x402-deploy globally

Install the x402-deploy CLI from npm so the 'x402-deploy' command is available in your terminal.

npm install -g @nirholas/x402-deploy
2

Initialize your project

Run the init command inside your existing API or MCP server project. It auto-detects the framework (Express, Fastify, FastAPI, Next.js, MCP) and creates a pricing configuration file.

cd your-api-project
x402-deploy init
3

Configure per-route pricing

Edit the generated pricing configuration to set prices for individual routes. Use '$0' for free endpoints and any dollar amount for paid ones.

{
  "pricing": {
    "model": "per-call",
    "default": { "price": "$0.01" },
    "routes": {
      "GET /api/data": "$0.0001",
      "POST /api/trade": "$0.10",
      "GET /api/health": "$0"
    }
  }
}
4

Deploy your payment-gated service

Run the deploy command to wrap your service with x402 payment middleware, create a custodial wallet for receiving payments, and publish the service to x402scan.com.

x402-deploy deploy
5

Monitor earnings and manage the deployment

Use the dashboard and utility commands to watch real-time earnings, check deployment health, view logs, and withdraw funds to your own wallet.

x402-deploy dashboard   # Real-time earnings visualization
x402-deploy status      # Deployment health check
x402-deploy logs        # View deployment output
x402-deploy withdraw    # Extract earnings to your wallet
x402-deploy export      # Download analytics as CSV

x402 Deploy Examples

Client configuration

claude_desktop_config.json entry if using x402-deploy as an MCP server directly.

{
  "mcpServers": {
    "x402-deploy": {
      "command": "npx",
      "args": ["x402-deploy"]
    }
  }
}

Prompts to try

Example prompts for managing deployments and earnings through Claude.

- "Deploy my current MCP server project with x402 and set a default price of $0.001 per call."
- "Show me the current earnings dashboard for my deployed x402 service."
- "Update the price for the POST /api/analyze route to $0.05."
- "Withdraw my accumulated earnings from the x402 custodial wallet."

Troubleshooting x402 Deploy

'x402-deploy' command not found after npm install -g

Check that your global npm bin directory is in your PATH ('npm bin -g'). On some systems you may need to add it: 'export PATH=$(npm bin -g):$PATH'.

Framework not detected during 'x402-deploy init'

Ensure you are running the command from the root of your project where package.json or requirements.txt is located. For non-standard setups, manually edit the generated config to specify the framework type.

Payments not being received after deployment

Verify the deployment is live with 'x402-deploy status' and that the custodial wallet address is correctly registered on x402scan.com. Check 'x402-deploy logs' for payment verification errors.

Frequently Asked Questions about x402 Deploy

What is x402 Deploy?

x402 Deploy is a Model Context Protocol (MCP) server that turn any api or mcp server into a paid service with x402 It connects AI assistants to external tools and data sources through a standardized interface.

How do I install x402 Deploy?

Follow the installation instructions on the x402 Deploy GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with x402 Deploy?

x402 Deploy works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is x402 Deploy free to use?

Yes, x402 Deploy is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Finance & Fintech MCP Servers

Explore all finance & fintech servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "x402-deploy": { "command": "npx", "args": ["-y", "x402-deploy"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use x402 Deploy?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides