# Solx402 Mcp Server

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

- **Type:** MCP server
- **Install:** `agentstack add mcp-leandrogavidia-solx402-mcp-server`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [leandrogavidia](https://agentstack.voostack.com/s/leandrogavidia)
- **Installs:** 0
- **Category:** [Finance & Payments](https://agentstack.voostack.com/c/finance-and-payments)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [leandrogavidia](https://github.com/leandrogavidia)
- **Source:** https://github.com/leandrogavidia/solx402-mcp-server
- **Website:** https://solx402-mcp-server-web.vercel.app

## Install

```sh
agentstack add mcp-leandrogavidia-solx402-mcp-server
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

SOLx402 MCP Server

&nbsp;&nbsp;

SOLx402 MCP Server is a Model Context Protocol (MCP) server that enables AI assistants to interact with the x402 payment protocol on Solana. It provides tools for discovering and consuming x402-enabled services, managing USDC payments, querying protocol documentation, and accessing Solana development resources through integrated MCP clients.

Official page

## Diagram flow

## Integration 

To integrate the **SOLx402 MCP Server**, follow these steps:

1. Go to the [SOLx402 MCP Server Smithery page](https://smithery.ai/server/@leandrogavidia/solx402-mcp-server).
2. Sign in.
3. Click the Configure button.
4. Fill in the required fields (and optional fields, if needed).
5. Generate the URL using your API key and Profile, then copy it.
6. Add the generated MCP Server URL to your system (e.g., Claude, Cursor, VS Code, etc.).

    ```json
    {
        "mcpServers": {
                "solx402-mcp-server": {
                    "url": "https://server.smithery.ai/@leandrogavidia/solx402-mcp-server/mcp?api_key=&profile=",
                    "type": "streamable-http",
                    "timeout": 120000
                },
            }
    }
    ```

## Tools

- ### x402 Protocol

    - **Documentation**
        
        - `search_x402_documentation`: Search across the x402 documentation to find relevant information, code examples, API references, and guides.
        
        - `x402_protocol_flow`: Visual diagram showing the x402 protocol flow and architecture.

    - **Services Discovery**
        
        - `get_x402_services`: Retrieve a list of available x402 services from the facilitator.
        
        - `get_facilitators`: Retrieve a list of known Solana facilitators.

    - **Service Consumption**
        
        - `consume_x402_service`: Consume a specific x402 service with automatic payment handling.
        
            > **⚠️ Note:** x402 services are external services maintained by third-party teams. While these services appear in the discovery layer, they may be temporarily down, unavailable, or experiencing issues. Service availability depends entirely on the external teams managing them.

- ### Wallet Operations

    - **Wallet Info**
        
        - `get_wallet_public_key`: Retrieve the public key of the configured wallet.

    - **Balance**
        
        - `get_wallet_usdc_balance`: Check the USDC token balance of the configured wallet.

- ### Solana Development Resources (Optional)

    - **Expert Assistance**
        
        - `Ask_Solana_Anchor_Framework_Expert`: Ask questions about developing on Solana with the Anchor Framework.
        
        - `Solana_Expert__Ask_For_Help`: Get expert help on Solana development topics, concepts, APIs, SDKs, and errors.

    - **Documentation**
        
        - `Solana_Documentation_Search`: Search documentation across the Solana ecosystem for up-to-date information.

---

## ⚠️ Important: Request Timeout Configuration

**Critical Setup Requirement:** When using this MCP server, it's essential to configure your MCP client with a **minimum request timeout of 60,000ms (60 seconds)** to ensure successful execution of x402 service consumption.

### Why This Matters:

- x402 services are external APIs that may require significant processing time.
- Payment transactions are executed on the Solana blockchain, which can take time to confirm.
- Short timeouts can cause requests to fail **after** USDC has been charged, resulting in payment without receiving the service.
- By default, MCP servers use a maximum request timeout of 10 seconds when running, which is quite low in some cases.

### Configuration Examples:

```json
{
  "mcpServers": {
    "solx402": {
      "url": "https://server.smithery.ai/@leandrogavidia/solx402-mcp-server/mcp?api_key=&profile=",
      "type": "streamable-http",
      "timeout": 120000 // 2 Minutes
    }
  }
}
```

### Query Parameters:

The MCP server now accepts configuration through URL query parameters, making setup simpler and more flexible:

- **`privateKey`** (required): Base58-encoded private key for your Solana wallet
- **`mainnetRpcUrl`** (required): Solana RPC URL for mainnet operations

- **`isMainnet`** (optional): Set to true for mainnet, false for devnet (Default: false)
- **`facilitatorUrl`** (optional): URL of the x402 facilitator (default: PayAI Facilitator URL)
- **`maxPrice`** (optional): Maximum price to pay for services in USDC microcents, e.g. 10000 = 0.01 USDC (default: 0)
- **`useSolanaMcpServer`** (optional): Enable Solana development tools integration (default: false)

### Related Issues:
- [Cline PR #1904](https://github.com/cline/cline/pull/1904) - Request timeout configuration
- [Cline Issue #4391](https://github.com/cline/cline/issues/4391) - Timeout-related problems

**Note:** Always ensure your MCP client timeout is at least 120 seconds to prevent payment issues and service consumption failures.

---

## Configuration Options

### 1. Query Parameters 
Pass configuration directly in the MCP client URL as shown in the examples above.

### 2. Environment Variables
You can use environment variables:

- `PORT`: Port where your MCP server will run (default: 8001)
- `HOST`: Host where your MCP server will run (default: 127.0.0.1)

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [leandrogavidia](https://github.com/leandrogavidia)
- **Source:** [leandrogavidia/solx402-mcp-server](https://github.com/leandrogavidia/solx402-mcp-server)
- **License:** MIT
- **Homepage:** https://solx402-mcp-server-web.vercel.app

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-leandrogavidia-solx402-mcp-server
- Seller: https://agentstack.voostack.com/s/leandrogavidia
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
