Get the FREE Ultimate OpenClaw Setup Guide →

solx402

SOLx402 MCP Server is a Model Context Protocol (MCP) server that enables AI assistants to interact with the x402 payment protocol on Solana.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio leandrogavidia-solx402-mcp-server node apps/mcp-server/server.js \
  --env HOST="127.0.0.1" \
  --env PORT="8001"

How to use

SOLx402 MCP Server exposes a set of MCP tools to interact with the x402 payment protocol on Solana. It includes services for discovering x402-enabled services, consuming them with automatic USDC payments, and querying Solana development resources. The server also provides wallet operations to fetch the configured wallet public key and check USDC balances, and optional Solana development helpers for expert assistance and documentation search. To use it, start the MCP server with your chosen configuration, then connect your MCP client (e.g., Claude, Cursor, VS Code extension, or custom client) to the server URL returned by Smithery, ensuring you’ve configured a minimum 60-second request timeout as recommended. The Tools section lists commands like get_x402_services, consume_x402_service, get_wallet_public_key, and Solana-related helpers, which you can invoke from your MCP client to discover services, make payments, and retrieve developer documentation.

How to install

Prerequisites:

  • Node.js (LTS) installed on your system
  • npm or yarn for package management
  • An account on Smithery to configure and obtain an MCP server URL

Install steps:

  1. Clone the repository or install via npm if published as a package
  2. Install dependencies
    • npm install
    • or yarn install
  3. Configure environment variables (PORT, HOST) as needed or rely on defaults
  4. Start the MCP server using the recommended command from your setup
    • npm run start
    • or node apps/mcp-server/server.js
  5. Verify the server is running by reaching http://127.0.0.1:8001 (or your configured host/port)

Example local run (with env):

  • PORT=8001 HOST=127.0.0.1 node apps/mcp-server/server.js

If you deploy via Node, ensure your deployment environment exposes the configured port and allows external access if needed.

Additional notes

Notes and tips:

  • Ensure your MCP client timeout is at least 60 seconds (120 seconds recommended) to avoid failures during x402 service consumption.
  • You must provide a valid Smithery API key and profile URL when configuring the MCP server in Smithery to obtain the correct mcp URL.
  • The server interacts with external x402 services; availability depends on third-party facilitators, so implement retry and error handling in your client.
  • Environment variables PORT and HOST control where the server listens; set them to suit your network and firewall rules.
  • If you encounter timeouts, consider increasing the timeout parameter in your MCP client configuration and/or server settings as shown in examples.
  • For mainnet operations, provide mainnet RPC URLs and a valid Solana wallet private key via query parameters or environment configuration as your client requires.

Related MCP Servers

Sponsor this space

Reach thousands of developers