About X402 Multi Chain Blockchain Gateway
X402 Multi Chain Blockchain Gateway provides pay-per-call blockchain data APIs for NEAR, Solana, and Base. It serves callers querying on-chain accounts, transactions, and network data, using x402 USDC micropayments and access without API keys.
Key features
- 01Covers NEAR, Solana, and Base
- 02Endpoints for account, transaction, and network data
- 03Per-call USDC payments through x402
- 04No API key or signup required
- 05Payment analytics dashboard
Use cases
- 01Check account balances and tokens across chains
- 02Inspect transactions, validators, or staking data
- 03Pay micropayments for blockchain data
MCP support
The README lists the project in the MCP Registry, but does not describe tools exposed to MCP clients or how they are called.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEx402 Multi-Chain Blockchain API
Pay-per-call blockchain data API for NEAR Protocol, Solana, and Base (Ethereum L2) — powered by x402 USDC micropayments.
Live: ironflip.duckdns.org
Features
- 24 REST endpoints across 3 chains (NEAR, Solana, Base)
- x402 micropayments — $0.001–$0.005 USDC per call on Solana or Base
- No API keys, no signup — just attach an
X-PAYMENTheader - Agent-discoverable — OpenAPI 3.1, A2A agent card, ChatGPT plugin manifest, llms.txt
- Analytics dashboard with payment tracking
- MCP Registry listed as
io.github.trevorflipper/near-solana-blockchain-api
Endpoints
NEAR Protocol (8)
| Endpoint | Price | Description |
|---|---|---|
GET /api/near/account/{id}/balance | $0.001 | NEAR balance (total, staked, available) |
GET /api/near/account/{id}/keys | $0.001 | Access keys (full + function-call) |
GET /api/near/tx/{hash}?sender_id={id} | $0.001 | Transaction with receipts and actions |
GET /api/near/validators | $0.002 | Active validator set |
GET /api/near/validators/{id} | $0.001 | Single validator details |
GET /api/near/account/{id}/staking | $0.002 | Staking delegations across pools |
GET /api/near/nft/{contract}/tokens | $0.002 | NFT tokens with metadata |
GET /api/near/defi/pools | $0.005 | Ref Finance liquidity pools |
Solana (9)
| Endpoint | Price | Description |
|---|---|---|
GET /api/solana/account/{id}/balance | $0.001 | SOL balance |
GET /api/solana/account/{id}/info | $0.001 | Account metadata |
GET /api/solana/account/{id}/tokens | $0.002 | SPL token holdings |
GET /api/solana/account/{id}/stakes | $0.002 | Stake accounts |
GET /api/solana/account/{id}/transactions | $0.002 | Recent transaction signatures |
GET /api/solana/tx/{signature} | $0.001 | Parsed transaction details |
GET /api/solana/validators | $0.002 | Top vote accounts by stake |
GET /api/solana/tokens/prices | $0.002 | SOL, USDC, JUP, JTO, BONK prices |
GET /api/solana/network/stats | $0.002 | Epoch, TPS, supply |
Base / Ethereum L2 (7)
| Endpoint | Price | Description |
|---|---|---|
GET /api/base/account/{id}/balance | $0.001 | ETH balance on Base |
GET /api/base/account/{id}/info | $0.001 | EOA vs contract detection |
GET /api/base/account/{id}/tokens | $0.002 | ERC-20 balances (USDC, DAI, WETH, etc.) |
GET /api/base/tx/{hash} | $0.001 | Transaction details |
GET /api/base/block/latest | $0.002 | Latest block info |
GET /api/base/gas | $0.001 | Current gas price |
GET /api/base/network/stats | $0.002 | Network stats |
Payment
Payments use the x402 protocol. Include an X-PAYMENT header with a USDC transaction proof:
- Solana mainnet —
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp - Base (EIP-155:8453) —
eip155:8453
The facilitator (AutoIncentive) is free — no API key needed.
Discovery
| Standard | URL |
|---|---|
| OpenAPI 3.1 | /openapi.json |
| A2A Agent Card | /.well-known/agent-card.json |
| ChatGPT Plugin | /.well-known/ai-plugin.json |
| LLMs.txt | /llms.txt |
| Dashboard | /dashboard |
Self-hosting
git clone https://github.com/trevorflipper/x402-multichain-gateway.git
cd x402-multichain-gateway
npm install
npm run build
# Required env vars for paid mode:
export X402_PAY_TO="<your-solana-usdc-address>"
export X402_BASE_PAY_TO="<your-base-usdc-address>"
npm start
Without X402_PAY_TO, the gateway runs in free/demo mode (no payment required).
Tech Stack
- TypeScript + Express
- @x402/express middleware
- near-api-js v5
- Raw JSON-RPC for Solana and Base (no SDK dependencies)
- better-sqlite3 for analytics
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.