NFT Data / API Docs / MCP Server

MCP Server

NFT Data MCP is a published MCP server that gives Claude Desktop and compatible MCP clients access to the NFT Data API through one tool: get_collection_data. Each successful non-cached request is paid automatically at $0.002 in USDC on Base mainnet using x402 v2 (default) or MPP. No API keys or subscriptions required. The MCP server is a separate optional integration; the NFT Data API is accessible directly without it.

Overview

Version
1.1.0
Transport
stdio
Payment
x402 v2 (default) or MPP (evm/charge), on Base mainnet (USDC)
Price
$0.002 USDC per successful non-cached request

Requirements and Claude Desktop setup

Requirements:

Requirement Details
Node.js Version 20 or newer
MCP client Claude Desktop or another compatible stdio MCP client
Dedicated wallet A dedicated EVM wallet funded with a small USDC balance on Base mainnet. Do not use a primary wallet.

Add the following block to your Claude Desktop config file:

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

claude_desktop_config.json
{
  "mcpServers": {
    "nftdata": {
      "command": "npx",
      "args": ["-y", "nftdata-mcp@1.1.0"],
      "env": {
        "EVM_PRIVATE_KEY": "YOUR_EVM_PRIVATE_KEY"
      }
    }
  }
}

Replace YOUR_EVM_PRIVATE_KEY with the private key of your dedicated wallet (0x followed by 64 hexadecimal characters). Store this value only in the config file on your own machine. Never share it in chat or paste it anywhere else.

After saving, fully restart Claude Desktop. The server communicates over stdio and is launched automatically by the client. Running it manually from a terminal shows no output; it waits for an MCP client to connect.

Configuration

Variable Default Description
EVM_PRIVATE_KEY required - Private key of the dedicated wallet that pays for calls. Must be 0x followed by exactly 64 hexadecimal characters.
NFTDATA_MAX_REQUESTS optional 100 Maximum signed payments per session. Integer 1-1000; any value outside this range stops startup with an error.
NFTDATA_PAYMENT_PROTOCOL optional x402 Payment protocol: x402 or mpp. Unset or empty selects x402; any other value stops startup with an error. Chosen once at startup.
NFTDATA_TIMEOUT_MS optional 15000 Request timeout in milliseconds. Range: 1000-60000.
NFTDATA_URL optional https://www.nftdata.app/api/get-collection-data API endpoint. Only the official NFT Data endpoint is accepted; any other value stops startup.

First query

After restarting Claude Desktop:

  1. Open a new conversation.
  2. Start with an explicit request to make sure Claude selects the right server when multiple MCP servers are configured:
    Use the NFT Data MCP server.
  3. When Claude asks for a collection slug, enter an existing OpenSea collection slug, for example:
    azuki
    This is just an example. You can use the slug of any OpenSea collection.
  4. Continue with natural follow-up questions. If the NFT Data server is not selected, ask Claude explicitly to use it.

Available data

The get_collection_data tool returns the following fields for any OpenSea collection. Not every field is guaranteed to be populated for every collection.

FieldDescription
nameCollection display name
slugOpenSea collection slug
contractsArray of contract objects, each with address and chain
floor_priceCurrent floor price (numeric)
floor_price_currencyCurrency of the floor price (e.g. ETH, USDC)
one_day_salesSales count in the last 24 hours
one_day_volumeTrade volume in the last 24 hours
one_day_volume_currencyCurrency of the 24h volume
seven_day_salesSales count in the last 7 days
seven_day_volumeTrade volume in the last 7 days
seven_day_volume_currencyCurrency of the 7d volume
thirty_day_salesSales count in the last 30 days
thirty_day_volumeTrade volume in the last 30 days
thirty_day_volume_currencyCurrency of the 30d volume
total_salesAll-time sales count
total_volumeAll-time trade volume
total_volume_currencyCurrency of the all-time volume
num_ownersNumber of unique owners
total_supplyTotal token supply
created_dateCollection creation date (ISO 8601 date string)

Example: Azuki

The following values are from a specific historical query. Market data changes continuously; these are not current live data.

Collection

NameAzuki
Slugazuki
ChainEthereum
Contract0xed5af388653567af2f388e6224dc7c4b3241c544
CreatedJanuary 12, 2022
Total supply10,000
Unique owners4,394
Floor price0.4933 ETH

Market activity

PeriodSalesVolume
24 hours2110.15 ETH
7 days16396.68 ETH
30 days471325.72 ETH
Lifetime93,156831,992.65 ETH

Tool request

{ "collection": "azuki" }

Payment

Cost$0.002 USDC
Protocolx402 on Base mainnet
Transaction 0x4fb3...580f8
Full raw JSON response
{
  "name": "Azuki",
  "slug": "azuki",
  "contracts": [
    {
      "address": "0xed5af388653567af2f388e6224dc7c4b3241c544",
      "chain": "ethereum"
    }
  ],
  "floor_price": 0.49328599,
  "floor_price_currency": "ETH",
  "one_day_sales": 21,
  "one_day_volume": 10.150091000000002,
  "seven_day_sales": 163,
  "seven_day_volume": 96.67526161112121,
  "thirty_day_sales": 471,
  "thirty_day_volume": 325.72023569476767,
  "total_sales": 93156,
  "total_volume": 831992.6461159982,
  "num_owners": 4394,
  "total_supply": 10000,
  "created_date": "2022-01-12",
  "one_day_volume_currency": "ETH",
  "seven_day_volume_currency": "ETH",
  "thirty_day_volume_currency": "ETH",
  "total_volume_currency": "ETH"
}

Claude can present the same underlying data as a summary, table, comparison, or detailed report without changing the source values. Ask Claude for the format you prefer.

Payments: x402 and MPP

Base mainnet only. This MCP server pays on Base mainnet exclusively, with USDC, using either x402 v2 (default) or MPP (evm/charge). Solana payments are not supported by the MCP server. The NFT Data website and API additionally accept x402 on Solana, but that does not apply to this MCP server.

Payment protocols

ProtocolHow it is selected
x402 v2 Default. Used when NFTDATA_PAYMENT_PROTOCOL is unset or empty.
MPP evm/charge Set NFTDATA_PAYMENT_PROTOCOL=mpp in the MCP server environment.
  • One protocol per run. The protocol is selected once at server startup. The server never falls back from one protocol to the other and never switches during a run. If the API does not offer an acceptable payment in the selected protocol, nothing is signed and the call fails.
  • Only x402 and mpp are accepted. Any other value (for example auto or x402,mpp) stops startup with an error.
  • Both protocols use the same dedicated EVM wallet (EVM_PRIVATE_KEY) and the same USDC balance on Base mainnet.
  • Price: $0.002 USDC per successful non-cached request in both protocols. Cache hits are free.

x402 v2 (default). Each request is paid automatically. The payment flow:

  1. The server sends the API request.
  2. The API responds with HTTP 402 and a payment challenge.
  3. Before signing, the server validates the challenge:
    • Scheme: exact
    • Network: Base mainnet (eip155:8453)
    • USDC contract: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
    • Amount: exactly 2000 atomic units ($0.002)
    • Recipient: 0x344143199642e87320785823c20c2df107d17534
  4. If all values match, the wallet signs and submits the payment.
  5. The API returns the collection data and an on-chain transaction hash.

MPP mode. To pay with MPP (EVM charge, USDC on Base mainnet) instead of x402, add NFTDATA_PAYMENT_PROTOCOL to the env block of your MCP server configuration:

env block
"env": {
  "EVM_PRIVATE_KEY": "YOUR_EVM_PRIVATE_KEY",
  "NFTDATA_PAYMENT_PROTOCOL": "mpp"
}
  • The same checks apply before signing: Base mainnet, USDC, exactly 2000 atomic units ($0.002), and the official recipient. Payment splits are refused.
  • At most one payment credential is signed per tool call. A repeated 402 after payment is not retried.
  • The spend limit, the 5-minute cache, and de-duplication of concurrent identical calls work the same way in both modes.

Successful non-cached responses include a transaction hash and a BaseScan verification link. Cache hits (results served from the 5-minute per-slug cache) are free and do not include a new hash.

Data network vs. payment network

Network typeDetails
Data network The blockchain where the NFT collection lives. The API covers 30+ networks including Ethereum, Base, Ink, Arc, HyperEVM, Robinhood Chain, and Solana. Querying a Solana collection still pays on Base.
Payment network Always Base mainnet (USDC, via x402 or MPP), regardless of which chain the queried collection is on. Solana payments are not supported by the MCP server.

Security

Use a dedicated wallet. Fund it with only a small USDC balance on Base mainnet. Never use a primary wallet or one holding significant funds.
Protect EVM_PRIVATE_KEY. Store it only in the Claude Desktop config file on your own machine. Never share it, paste it into chat, or commit it to version control.
Challenge validation. In both x402 and MPP modes, the server validates the recipient address, token, network, scheme or method, and exact amount before signing any payment. Mismatched challenges are rejected.
Verify on BaseScan. Every successful non-cached response includes a transaction hash. Verify at basescan.org.

Behavior

Sends POST /api/get-collection-data with body {"collection": "<slug>"}. The slug is trimmed and lowercased, then must match ^[a-z0-9][a-z0-9_-]*$ (max 100 characters); invalid slugs are rejected without making a payment.
Every signed payment counts against the session limit (NFTDATA_MAX_REQUESTS), including payments for requests that later fail or time out.
The payment protocol (x402 by default, or MPP when NFTDATA_PAYMENT_PROTOCOL=mpp) is chosen once at startup. There is no fallback or protocol switching during a run.
No automatic retries. Each tool call makes at most one payment attempt.
Successful results are cached for five minutes per slug. Concurrent identical calls share a single in-flight request. Cache hits are free and do not include a transaction hash.
Generic errors are returned for invalid slug (400), collection not found (404), rate limit (429 with retry delay), timeout, and other failures. Server and payment details are not exposed to the MCP client.

Troubleshooting

Server does not appear in Claude Desktop. Verify the config file path, check for JSON syntax errors, and fully restart Claude Desktop.
EVM_PRIVATE_KEY is missing or malformed. The key must be 0x followed by exactly 64 hexadecimal characters. Check for extra whitespace or a missing 0x prefix.
Server fails at startup after setting NFTDATA_PAYMENT_PROTOCOL. Only x402 or mpp are accepted, or leave it unset or empty for x402. Values such as auto or x402,mpp stop startup with an error.
Request limit reached. The session has reached NFTDATA_MAX_REQUESTS. Restart Claude Desktop to reset the counter, or increase the limit by setting a higher value in the config env block.
Request timed out. A payment may have been signed before the timeout occurred. The server does not retry automatically.
SDK import failures after an update. The x402 SDK changes frequently. Check the x402 docs and the nftdata-mcp changelog for the latest compatible version.

Run from source (optional)

Clone the repository and install dependencies:

npm install

Set EVM_PRIVATE_KEY for the current shell session only, then start:

macOS / Linux
export EVM_PRIVATE_KEY=0x...
npm start
Windows PowerShell
$env:EVM_PRIVATE_KEY = "0x..."
npm start
Windows cmd
set EVM_PRIVATE_KEY=0x...
npm start

To use a local checkout with Claude Desktop, set "command": "npx" and "args": ["tsx", "/absolute/path/to/nftdata-mcp/server.ts"] in the config.

Build and test:

npm run build   # compiles TypeScript to dist/
npm test        # offline unit tests, no network calls and no payments

Links