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
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
{
"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:
- Open a new conversation.
- 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.
- When Claude asks for a collection slug, enter an existing OpenSea collection slug, for example:
This is just an example. You can use the slug of any OpenSea collection.
azuki
- 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.
| Field | Description |
|---|---|
| name | Collection display name |
| slug | OpenSea collection slug |
| contracts | Array of contract objects, each with address and chain |
| floor_price | Current floor price (numeric) |
| floor_price_currency | Currency of the floor price (e.g. ETH, USDC) |
| one_day_sales | Sales count in the last 24 hours |
| one_day_volume | Trade volume in the last 24 hours |
| one_day_volume_currency | Currency of the 24h volume |
| seven_day_sales | Sales count in the last 7 days |
| seven_day_volume | Trade volume in the last 7 days |
| seven_day_volume_currency | Currency of the 7d volume |
| thirty_day_sales | Sales count in the last 30 days |
| thirty_day_volume | Trade volume in the last 30 days |
| thirty_day_volume_currency | Currency of the 30d volume |
| total_sales | All-time sales count |
| total_volume | All-time trade volume |
| total_volume_currency | Currency of the all-time volume |
| num_owners | Number of unique owners |
| total_supply | Total token supply |
| created_date | Collection 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
| Name | Azuki |
| Slug | azuki |
| Chain | Ethereum |
| Contract | 0xed5af388653567af2f388e6224dc7c4b3241c544 |
| Created | January 12, 2022 |
| Total supply | 10,000 |
| Unique owners | 4,394 |
| Floor price | 0.4933 ETH |
Market activity
| Period | Sales | Volume |
|---|---|---|
| 24 hours | 21 | 10.15 ETH |
| 7 days | 163 | 96.68 ETH |
| 30 days | 471 | 325.72 ETH |
| Lifetime | 93,156 | 831,992.65 ETH |
Tool request
{ "collection": "azuki" }
Payment
| Cost | $0.002 USDC |
| Protocol | x402 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
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
| Protocol | How 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
x402andmppare accepted. Any other value (for exampleautoorx402,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:
- The server sends the API request.
- The API responds with HTTP 402 and a payment challenge.
- Before signing, the server validates the challenge:
- Scheme:
exact - Network: Base mainnet (
eip155:8453) - USDC contract:
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 - Amount: exactly
2000atomic units ($0.002) - Recipient:
0x344143199642e87320785823c20c2df107d17534
- Scheme:
- If all values match, the wallet signs and submits the payment.
- 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": {
"EVM_PRIVATE_KEY": "YOUR_EVM_PRIVATE_KEY",
"NFTDATA_PAYMENT_PROTOCOL": "mpp"
}
- The same checks apply before signing: Base mainnet, USDC, exactly
2000atomic 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 type | Details |
|---|---|
| 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
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.
Behavior
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.
NFTDATA_MAX_REQUESTS), including payments for requests that later fail or time out.
NFTDATA_PAYMENT_PROTOCOL=mpp) is chosen once at startup. There is no fallback or protocol switching during a run.
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
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.
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.
NFTDATA_MAX_REQUESTS. Restart Claude Desktop to reset the counter, or increase the limit by setting a higher value in the config env block.
Run from source (optional)
Clone the repository and install dependencies:
npm install
Set EVM_PRIVATE_KEY for the current shell session only, then start:
export EVM_PRIVATE_KEY=0x... npm start
$env:EVM_PRIVATE_KEY = "0x..." npm start
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