Skip to main content
AllMCPs
BrowseBestCategoriesStackCompareToolsGuidesBlog
Log in Submit MCP

Stay in the loop

Get new MCP servers and top picks in your inbox.

AllMCPs

The open directory for discovering and installing Model Context Protocol servers.

AllMCPs on GitHub (opens in a new tab)
Launched onTiny Startupstinystartups.com
Explore
  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Random discovery New
  • Submit a server
  • Pricing & Boost Boost
Learn
  • Guides hub
  • What is MCP?
  • Install guide
  • Build an MCP server
  • Deploy an MCP server
  • Security guide
  • Troubleshooting
  • MCP for SEO & AEO
  • Protocol versioning
  • Blog & updates
Tools
  • All developer tools
  • Config generator
  • Config validator
  • Config auditor
  • MCP playground
  • Token calculator
  • OpenAPI โ†’ MCP
  • Badge generator
For agents
  • REST API docs
  • Trust & traffic Live
  • Remote MCP server SSE โ†— (opens in a new tab)
  • llms.txt โ†— (opens in a new tab)
  • Catalog JSON โ†— (opens in a new tab)
Company
  • About
  • Advertise Sponsor
  • Contact
  • GitHub โ†— (opens in a new tab)
  • Terms
  • Privacy
AllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZoneAllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZone
ยฉ 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. ๐Ÿ’ฐ Finance & Fintech
  3. X402 API Server
X402 API Server logo
Health: ActiveRecent health check succeeded.Last checked 9/9/2026, 12:03:18 PM

X402 API Server

User RatingsBe the first to rate and review this MCP server!
View Repository2 GitHub StarsTotal stargazers on GitHub for the source repository (2 stars).Visit Website
deficryptopaymentsbasemarket-data

MCP server for pay-per-call crypto and DeFi data using USDC micropayments on Base.

Quick Install

Automated & IDE Setup

Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ€” or use 1-click editor setup below.

Add to CursorAdd to VS Code
We couldnโ€™t automatically confirm this listing starts correctly

We ran the install command below but it didn't respond within our test window โ€” this can mean a slow first-time install rather than a real problem.

npx -y @x402-api/mcp-server

No response to initialize.

This is an experimental automated check and can have false negatives โ€” missing environment variables, a slow cold install, etc. It doesnโ€™t necessarily mean somethingโ€™s wrong. Last checked 1mo ago.

Manual Client & Custom JSON ConfigExpand JSON โ–พ

Client Config & Setup

Choose your client or environment
Target File:~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "fernsugi-x402-api-server": {
      "command": "npx",
      "args": [
        "-y",
        "@x402-api/mcp-server"
      ]
    }
  }
}

๐Ÿ’ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.

Install Directory Badge Claim listing Alternatives๐Ÿ’ฐ More in Finance & Fintech

Overview

This server provides AI agents with crypto and DeFi data through x402 HTTP 402 payments. Available data includes prices, gas, DEX quotes, token risks, whales, yields, funding rates, and wallet activity. Use it when agents need paid API access without accounts, subscriptions, or API keys.

Use cases

โ€ขFetch live cryptocurrency prices and daily movers
โ€ขCompare DEX swap quotes
โ€ขAnalyze token security and holder concentration
โ€ขScan DeFi yields and perpetual funding rates
โ€ขProfile wallet holdings, activity, and risk

Key features

โ€ขx402 per-request USDC payments
โ€ขBase mainnet payment support
โ€ขMulti-chain gas tracking
โ€ขDEX quote comparison
โ€ขDeFi yield and funding-rate scanning
โ€ขWallet and token risk analysis

Capabilities & Tool Schemas

Inspect callable tools, capabilities, and parameters exposed to AI agents by X402 API Server.

Extracted Tool Capabilities
x402 per-request USDC payments
Base mainnet payment support
Multi-chain gas tracking
DEX quote comparison
DeFi yield and funding-rate scanning
Wallet and token risk analysis

Documentation Overview

x402 API Server

npm: MCP Server npm: ElizaOS Plugin Listed on awesome-x402

Pay-per-call crypto/DeFi data API using HTTP 402 Payment Required.
No API keys. No subscriptions. AI agents pay USDC on Base, per request.

Code
  โ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
   โ•šโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•—โ•šโ•โ•โ•โ•โ–ˆโ–ˆโ•—
    โ•šโ–ˆโ–ˆโ–ˆโ•”โ• โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•
    โ–ˆโ–ˆโ•”โ–ˆโ–ˆโ•— โ•šโ•โ•โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ•
   โ–ˆโ–ˆโ•”โ• โ–ˆโ–ˆโ•—     โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
   โ•šโ•โ•  โ•šโ•โ•     โ•šโ•โ• โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•

๐ŸŒ Live at: https://x402-api.fly.dev
๐Ÿค– Agent Identity: #18763 on Base (ERC-8004)
๐Ÿ“ Blog Post: I Built a DeFi Data API Where AI Agents Pay Per Call


What Is This?

This is a DeFi/crypto data API server where payment is part of the HTTP protocol itself.

Every endpoint costs a small USDC micropayment โ€” between 0.001 and 0.008 USDC (fractions of a cent). When a client hits a protected endpoint, the server responds with HTTP 402 Payment Required and precise payment instructions. The client pays, retries with proof, and gets data.

No accounts. No OAuth. No billing dashboard. Just: "this costs 0.003 USDC โ€” pay here."

This model is designed for AI agents: autonomous software that needs to call APIs without a human reaching for a credit card. The agent holds a wallet, pays exactly what's needed, and moves on.

The stack:

  • x402 Protocol โ€” HTTP 402-based micropayment standard by Coinbase
  • USDC on Base โ€” L2 mainnet, sub-cent fees, instant finality
  • ERC-8004 โ€” on-chain identity registration for AI agents
  • Express.js backend โ€” straightforward, auditable, no framework magic

Endpoints

EndpointPriceDescription
GET /api/price-feed0.001 USDCBTC/ETH/SOL prices + top 24h movers (live CoinGecko)
GET /api/gas-tracker0.001 USDCMulti-chain gas prices (ETH, Base, Polygon, Arbitrum) with speed tiers
GET /api/dex-quotes0.002 USDCCompare swap quotes across Uniswap, SushiSwap, 1inch
GET /api/token-scanner0.003 USDCToken security & risk analysis โ€” rug-pull detection flags
GET /api/whale-tracker0.005 USDCToken holder concentration, Gini coefficient, whale alerts
GET /api/yield-scanner0.005 USDCTop DeFi yields across Aave, Compound, Morpho, Lido, Pendle + more
GET /api/funding-rates0.008 USDCPerp funding rates across 6 venues + arb ranking
GET /api/wallet-profiler0.008 USDCWallet portfolio analysis, holdings, activity, risk profile
GET /api/endpointsFreeMachine-readable endpoint catalog
GET /healthFreeHealth check

Query Parameters

EndpointParameterExample
/api/dex-quotesfrom, to, amount?from=ETH&to=USDC&amount=1.5
/api/token-scannertoken?token=PEPE or ?token=0x...
/api/whale-trackertoken?token=ETH
/api/yield-scannerchain, min_tvl?chain=base&min_tvl=1000000
/api/funding-ratesasset?asset=BTC
/api/wallet-profileraddress?address=0x...

How x402 Works

The x402 protocol extends the long-forgotten HTTP 402 Payment Required status code into a machine-readable micropayment standard.

The Payment Flow

Step 1 โ€” Initial request (no payment)

http
GET /api/price-feed HTTP/1.1
Host: x402-api.fly.dev

Step 2 โ€” Server returns 402

http
HTTP/1.1 402 Payment Required
Content-Type: application/json

{
  "x402Version": 1,
  "error": "Payment Required",
  "accepts": [{
    "scheme": "exact",
    "network": "base",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "payTo": "0x60264c480b67adb557efEd22Cf0e7ceA792DefB7",
    "maxAmountRequired": "1000",
    "resource": "https://x402-api.fly.dev/api/price-feed",
    "description": "Live crypto price feed",
    "extra": {
      "name": "USD Coin",
      "chainId": 8453,
      "supportedProofs": ["txHash"],
      "experimentalProofs": ["eip3009_transferWithAuthorization"]
    }
  }]
}

Step 3 โ€” Client pays and retries

http
GET /api/price-feed HTTP/1.1
Host: x402-api.fly.dev
X-Payment: <base64-encoded payment proof>

Step 4 โ€” Server verifies and responds

http
HTTP/1.1 200 OK
X-Payment-Response: {"success":true,"txHash":"0x..."}
Content-Type: application/json

{ "btc": 95420.12, "eth": 3241.88, ... }

Payment Verification

In the current repo, the production-ready payment proof path is:

  1. Transaction hash โ€” Confirms a submitted Base transaction contains a USDC transfer to the receiving address.

The repo also supports EIP-3009 transferWithAuthorization settlement when you configure one of these:

  1. Direct settlement via X402_SETTLEMENT_PRIVATE_KEY โ€” the server submits transferWithAuthorization on-chain and pays gas.
  2. Custom facilitator settlement via X402_FACILITATOR_URL โ€” the server forwards the signed authorization to your facilitator.

Without either of those configured, the deployment stays on the txHash payment proof path only.

Receiving wallet: 0x60264c480b67adb557efEd22Cf0e7ceA792DefB7
Network: Base mainnet (chain ID 8453)
Asset: USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)


Using with x402-fetch

x402-fetch is the official client library from Coinbase that handles the payment flow automatically. Drop it in as a fetch replacement.

Installation

Terminal
npm install x402-fetch viem

Basic Usage

server.ts
import { wrapFetchWithPayment } from 'x402-fetch';
import { createWalletClient, http } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { base } from 'viem/chains';

const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);
const walletClient = createWalletClient({
  account,
  chain: base,
  transport: http(),
});

// Wrap fetch โ€” payments handled automatically
const fetchWithPayment = wrapFetchWithPayment(fetch, walletClient);

// Just call the API โ€” 402 is handled transparently
const response = await fetchWithPayment('https://x402-api.fly.dev/api/price-feed');
const data = await response.json();
console.log(data);

What wrapFetchWithPayment Does

  1. Makes the initial request
  2. If 402 โ†’ parses payment requirements
  3. Signs the payment authorization (EIP-3009 transferWithAuthorization)
  4. Retries the request with X-Payment header
  5. Returns the successful response

Note: this is the standard x402 client flow. The current server repo also supports a simpler proof format where a client pays on-chain first, then sends a Base64 JSON X-Payment header like:

config.json
{ "txHash": "0x...", "payer": "0x..." }

Your wallet needs USDC on Base mainnet. You can bridge USDC from Ethereum to Base using the Base Bridge or buy directly on Coinbase.


ERC-8004 Identity

This API is registered as an AI agent on Base via ERC-8004 โ€” the Ethereum standard for on-chain agent identity.

Agent ID: #18763
Registry contract: 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432
Network: Base mainnet

The registration includes:

  • Agent name and description
  • Service endpoints (web + x402)
  • x402 capability flag
  • Reputation-based trust signals

This lets discovery services, AI marketplaces, and other agents find and verify this API on-chain โ€” no centralized registry required.

See the registration data: agent-registration.json


Integrations

MCP Server (Claude Desktop / Claude API)

The MCP (Model Context Protocol) server now lives in its own standalone repo:

  • GitHub: fernsugi/x402-api-mcp-server
  • npm: @x402-api/mcp-server

Quick setup:

bash
# Run without payment (inspect mode)
npx @x402-api/mcp-server

# Run with auto-pay
X402_WALLET_PRIVATE_KEY=0x... npx @x402-api/mcp-server

Add to Claude Desktop (claude_desktop_config.json):

config.json
{
  "mcpServers": {
    "x402-api": {
      "command": "npx",
      "args": ["@x402-api/mcp-server"],
      "env": {
        "X402_WALLET_PRIVATE_KEY": "0x<your_key>"
      }
    }
  }
}

โ†’ See the standalone MCP repo for full docs: x402-api-mcp-server README

ElizaOS Plugin

The elizaos-plugin/ directory contains an ElizaOS plugin that gives autonomous agents natural-language access to all 8 endpoints.

Install:

Terminal
npm install @x402-api/elizaos-plugin

Register in your ElizaOS agent:

server.ts
import { x402ApiPlugin } from '@x402-api/elizaos-plugin';

export const agent: Character = {
  name: 'DeFi Agent',
  plugins: [
    x402ApiPlugin({
      walletPrivateKey: process.env.X402_WALLET_PRIVATE_KEY,
    }),
  ],
};

The plugin adds 8 actions: GET_CRYPTO_PRICES, GET_GAS_PRICES, GET_DEX_QUOTES, SCAN_TOKEN, TRACK_WHALES, SCAN_YIELDS, GET_FUNDING_RATES, PROFILE_WALLET.

โ†’ See elizaos-plugin/README.md for full docs.


Local Development

Read the full README โ†’View source on GitHub โ†’

Related MCP Servers

View all in Finance & Fintech View all alternatives
  • Web3 Research MCP logoWeb3 Research MCP

    Deep Research for crypto - free & fully local

    ๐Ÿ’ฐ Finance & Fintech3 views
    Compare vs Web3 Research MCP โ†’
  • Mossgate MCP logoMossgate MCP

    mcp stdio server exposing mossgate trust and rue render apis with x402 usdc payment

    ๐Ÿ’ฐ Finance & Fintech6 views
    Compare vs Mossgate MCP โ†’
  • Solana MCP Server logoSolana MCP Server

    Solana blockchain data for AI agents โ€” wallet balances, token prices, DeFi yields (Raydium + Orca), and token safety checks (RugCheck scores, holder concentration, insider detection).

    ๐Ÿ’ฐ Finance & Fintech3 views
    Compare vs Solana MCP Server โ†’
  • Openmm MCP logoOpenmm MCP

    AI-native crypto market making toolkit with 13 tools for DeFi analytics, CEX/DEX trading, and liquidity management

    ๐Ÿ’ฐ Finance & Fintech2 views
    Compare vs Openmm MCP โ†’

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks โ€” not a rating.

GitHub stars
2
Stargazers on the source repository.
npm downloads
145
Package downloads in the last 30 days.
Last commit
5mo ago
Most recent push to the default branch.
Install check
Inconclusive
Didn't respond in our test window โ€” often a slow first install.
Directory activity
2 views
Config copies, upvotes, and views on AllMCPs.

Reviews

No reviews yet โ€” be the first to share how this listing worked for you.

Frequently Asked Questions about X402 API Server

No. The API uses x402 payments instead of API keys, accounts, or subscriptions.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewX402 API Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/fernsugi-x402-api-server?style=directory)](https://allmcps.com/mcp/fernsugi-x402-api-server)
HTML Embed
<a href="https://allmcps.com/mcp/fernsugi-x402-api-server"><img src="https://allmcps.com/api/badge/fernsugi-x402-api-server?style=directory" alt="X402 API Server on AllMCPs" /></a>

Technical Specs & Signals

Category๐Ÿ’ฐFinance & Fintech
PricingFree
More technical detailsExpand โ–พ
TransportSTDIO
RuntimeNode.js
AuthOther
Last updatedAug 9, 2026
Views2
Unique ViewsTotal visits recorded for this listing page on AllMCPs.
Installs0
Installs & Copy ActionsTotal times users copied install commands or configuration snippets for this server.
GitHub stars2
GitHub Star CountTotal stargazers on GitHub representing community popularity (2 stars).
Last commit5mo ago
Last Repository CommitThe most recent commit or push recorded for this server's GitHub repository.Last commit on Mar 25, 2026
npm downloads145/mo
Monthly npm DownloadsAverage monthly package installs recorded from npm registry statistics.
51Quality signal: Good ยท 51/100How this signal is calculated โ–พ
Server availabilityNot measured

Not scored for repo-hosted servers โ€” we can't reach the running server, only its GitHub page. Hosted MCP endpoints are health-checked live.

Verified ownership10/20
Documentation & tools24/30
Adoption & activity4/15
Community engagement0/10

A guidance signal from public completeness & health data โ€” not a user rating. New listings start lower and rise as they add docs, get verified, and grow adoption. Signals we can't observe for a listing are skipped, not counted against it.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 23d ago via OSV.dev ยท @x402-api/mcp-server (npm)

โ˜… FeaturedMoxie Docs MCP logo

Moxie Docs MCP

MCP & Agent Skills for Automated Documentation, and codebase conventions + context

Explore Server โ†’

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to unlock edit access and the Official badge โ€” proof is checked automatically, then reviewed by our team.

Free dofollow backlink: add your website and place the AllMCPs badge on it โ€” no claim needed. We detect it automatically and keep it verified as long as the badge stays live.

Claim & get free dofollow

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.

Explore more

More in ๐Ÿ’ฐ Finance & Fintech โ†’Best MCP servers for Finance & Fintech โ†’Alternatives to X402 API Server โ†’Install in Claude DesktopInstall in CursorInstall in VS Code