@easynodexyz/mcp-x402

@easynodexyz/mcp-x402

MCP server enabling AI agents to purchase VPS and blockchain node products using USDC on Base via Easy Node's x402 API.

Category
访问服务器

README

npm Node Docs

@easynodexyz/mcp-x402

MCP server for AI agents to purchase VPS and blockchain node products via Easy Node's x402 API with USDC on Base.

Overview

This package provides a Model Context Protocol (MCP) server that enables AI assistants to:

  • List available VPS and blockchain node products
  • Purchase products using USDC on Base network
  • Check order status
  • Manage running instances (list, view details, renew, rename)

The x402 payment flow is handled automatically - the agent simply calls the tools and payments are processed seamlessly.

Quick Start

1. Install & Setup

npx @easynodexyz/mcp-x402 setup

This interactive wizard will:

  • Prompt for your wallet private key
  • Save configuration to ~/.easy-node/.env
  • Output the IDE config to copy

2. Configure Your IDE

Choose your IDE and add the MCP server configuration.


Install as Claude Code Plugin

/plugin add easynodexyz/mcp-x402

Documentation

Full documentation available at x402.easy-node.xyz.


IDE Configurations

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "easynode-x402": {
      "command": "npx",
      "args": ["@easynodexyz/mcp-x402"]
    }
  }
}

Config file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Claude Code (CLI)

Add MCP server using the /mcp command:

claude /mcp add @easynodexyz/mcp-x402 -- npx @easynodexyz/mcp-x402

Or manually add to your Claude Code settings (~/.claude/settings.json):

{
  "mcpServers": {
    "easynode-x402": {
      "command": "npx",
      "args": ["@easynodexyz/mcp-x402"]
    }
  }
}

Config file locations:

  • macOS/Linux: ~/.claude/settings.json
  • Windows: %USERPROFILE%\.claude\settings.json

Cursor

Add to your Cursor settings (.cursor/mcp.json in your project or global config):

{
  "mcpServers": {
    "easynode-x402": {
      "command": "npx",
      "args": ["@easynodexyz/mcp-x402"]
    }
  }
}

Config file locations:

  • Project: .cursor/mcp.json in project root
  • Global macOS: ~/.cursor/mcp.json
  • Global Windows: %USERPROFILE%\.cursor\mcp.json

VS Code + Continue

Add to your Continue configuration (~/.continue/config.json):

{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "stdio",
          "command": "npx",
          "args": ["@easynodexyz/mcp-x402"]
        }
      }
    ]
  }
}

Other MCP-Compatible Tools

For any MCP-compatible tool, use this stdio transport configuration:

Field Value
Command npx
Args ["@easynodexyz/mcp-x402"]
Transport stdio

With environment variables:

{
  "command": "npx",
  "args": ["@easynodexyz/mcp-x402"],
  "env": {
    "EASYNODE_PRIVATE_KEY": "0x...",
    "EASYNODE_API_URL": "..."
  }
}

3. Restart Your IDE

Restart to load the MCP server.

4. Use It

Ask your AI assistant:

  • "List available VPS products"
  • "Purchase 1 month of the VPS-XS product"
  • "Check the status of order abc123"
  • "List my instances"
  • "Get connection details for instance xyz"
  • "Renew instance xyz for 3 months"

Configuration

Environment Variables

Variable Required Default Description
EASYNODE_PRIVATE_KEY Yes - Wallet private key (0x...)
EASYNODE_API_URL No https://api.easy-node.xyz/api API base URL
EASYNODE_MAX_PAYMENT No 100 Max USDC per transaction

Config Resolution Order

Configuration is loaded from multiple sources (later overrides earlier):

  1. ~/.easy-node/.env - Global config
  2. ./.env - Project-level config
  3. Environment variables - Highest priority

Alternative: Manual Configuration

Instead of running setup, you can configure manually:

Option A: Pass env vars in MCP config

{
  "mcpServers": {
    "easynode-x402": {
      "command": "npx",
      "args": ["@easynodexyz/mcp-x402"],
      "env": {
        "EASYNODE_PRIVATE_KEY": "0x..."
      }
    }
  }
}

Option B: Create config file manually

Create ~/.easy-node/.env:

EASYNODE_PRIVATE_KEY=0x...
EASYNODE_API_URL=https://api.easy-node.xyz/api
EASYNODE_MAX_PAYMENT=1000

MCP Tools

list_products

List available VPS and blockchain node products with USDC pricing.

Parameters:

  • category (optional): Filter by "vps" or "node"

Example:

List all VPS products available for purchase

create_order

Purchase a product using USDC on Base. Handles x402 payment automatically.

Parameters:

  • productId (required): Product ID to purchase
  • period (required): Subscription period in months
  • quantity (optional): Number of instances (default: 1)
  • customName (optional): Custom name for the instance (max 100 characters)

Example:

Purchase 3 months of product abc123

get_order

Check the status of an existing order.

Parameters:

  • orderId (required): Order ID to look up

Example:

Check status of order xyz789

list_instances

List all instances owned by the wallet.

Example:

List all my instances

get_instance

Get detailed instance information including connection details.

Parameters:

  • instanceId (required): Instance ID to look up
  • type (required): Instance type ("node" or "vps")

Example:

Get connection details for VPS instance abc123

renew_instance

Renew an existing instance subscription.

Parameters:

  • instanceId (required): Instance ID to renew
  • period (required): Renewal period in months
  • type (required): Instance type ("node" or "vps")

Example:

Renew my VPS instance abc123 for 3 months

update_custom_name

Set or update the custom name of an instance.

Parameters:

  • instanceId (required): Instance ID to update
  • type (required): Instance type ("node" or "vps")
  • customName (required): Custom name (max 100 characters)

Example:

Rename instance abc123 to "my-validator"

Security

  • Private keys are stored with 600 permissions (owner read/write only)
  • Max payment limit prevents accidental large transactions
  • Wallet only signs EIP-3009 TransferWithAuthorization for USDC

How x402 Works

  1. Agent calls create_order with product details
  2. First request returns HTTP 402 with payment requirements
  3. Client signs USDC transfer authorization (EIP-3009)
  4. Retry with payment signature
  5. Server verifies, settles on-chain, creates order
  6. Order returned to agent

Troubleshooting

"EASYNODE_PRIVATE_KEY is required"

Run npx @easynodexyz/mcp-x402 setup or set the environment variable.

"Payment amount exceeds maximum"

Increase EASYNODE_MAX_PAYMENT in your config or env vars.

"402 response missing payment-required header"

The API endpoint may not support x402. Check you're using the correct API URL.

MCP server not appearing in IDE

  1. Verify the config file location is correct for your OS
  2. Check JSON syntax is valid
  3. Restart the IDE completely (not just reload)
  4. Check IDE logs for MCP connection errors

Contributing

Found a bug or have a feature request? Please open an issue at github.com/easynodexyz/mcp-x402/issues.

Links

License

BUSL-1.1

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选