opensea-mcpQuery OpenSea NFT marketplace data via official MCP server. Get floor prices, trending collections, token prices, wallet balances, swap quotes, and NFT holdings. Supports Ethereum, Base, Polygon, Solana, and other major chains. Requires OpenSea developer account for MCP token.
Install via ClawdBot CLI:
clawdbot install dfinzer/opensea-mcpQuery NFT data, trade on the Seaport marketplace, and swap ERC20 tokens across Ethereum, Base, Arbitrum, Optimism, Polygon, and more.
OPENSEA_API_KEY in your environmentscripts/ for common operationsexport OPENSEA_API_KEY="your-api-key"
# Token swap: ETH to token
./scripts/opensea-swap.sh 0xTokenAddress 0.1 0xYourWallet 0xYourKey base
# Token swap: Token to token (specify from_token as last arg)
./scripts/opensea-swap.sh 0xToToken 100 0xYourWallet 0xYourKey base 0xFromToken
# Get collection info
./scripts/opensea-collection.sh boredapeyachtclub
# Get NFT details
./scripts/opensea-nft.sh ethereum 0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d 1234
# Get best listing price for an NFT
./scripts/opensea-best-listing.sh boredapeyachtclub 1234
OpenSea's API includes a cross-chain DEX aggregator for swapping ERC20 tokens with optimal routing across all supported chains.
| Task | Tool/Script |
|------|-------------|
| Get swap quote with calldata | get_token_swap_quote (MCP) or opensea-swap.sh |
| Check token balances | get_token_balances (MCP) |
| Search tokens | search_tokens (MCP) |
| Get trending tokens | get_trending_tokens (MCP) |
| Get top tokens by volume | get_top_tokens (MCP) |
| Task | Script |
|------|--------|
| Get collection details | opensea-collection.sh |
| Get collection stats | opensea-collection-stats.sh |
| List NFTs in collection | opensea-collection-nfts.sh |
| Get single NFT | opensea-nft.sh |
| List NFTs by wallet | opensea-account-nfts.sh |
| Task | Script |
|------|--------|
| Get best listing for NFT | opensea-best-listing.sh |
| Get best offer for NFT | opensea-best-offer.sh |
| List all collection listings | opensea-listings-collection.sh |
| List all collection offers | opensea-offers-collection.sh |
| Get listings for specific NFT | opensea-listings-nft.sh |
| Get offers for specific NFT | opensea-offers-nft.sh |
| Get order by hash | opensea-order.sh |
| Task | Script |
|------|--------|
| Get fulfillment data (buy NFT) | opensea-fulfill-listing.sh |
| Get fulfillment data (accept offer) | opensea-fulfill-offer.sh |
| Generic POST request | opensea-post.sh |
| Task | Script |
|------|--------|
| Get collection events | opensea-events-collection.sh |
| Stream real-time events | opensea-stream-collection.sh (requires websocat) |
| Task | Script |
|------|--------|
| Any GET endpoint | opensea-get.sh |
| Any POST endpoint | opensea-post.sh |
./scripts/opensea-best-listing.sh cool-cats-nft 1234
./scripts/opensea-fulfill-listing.sh ethereum 0x_order_hash 0x_your_wallet
./scripts/opensea-best-offer.sh cool-cats-nft 1234
./scripts/opensea-fulfill-offer.sh ethereum 0x_offer_hash 0x_your_wallet 0x_nft_contract 1234
Creating new listings and offers requires wallet signatures. Use opensea-post.sh with the Seaport order structure - see references/marketplace-api.md for full details.
| Script | Purpose |
|--------|---------|
| opensea-get.sh | Generic GET (path + optional query) |
| opensea-post.sh | Generic POST (path + JSON body) |
| opensea-collection.sh | Fetch collection by slug |
| opensea-collection-stats.sh | Fetch collection statistics |
| opensea-collection-nfts.sh | List NFTs in collection |
| opensea-nft.sh | Fetch single NFT by chain/contract/token |
| opensea-account-nfts.sh | List NFTs owned by wallet |
| Script | Purpose |
|--------|---------|
| opensea-listings-collection.sh | All listings for collection |
| opensea-listings-nft.sh | Listings for specific NFT |
| opensea-offers-collection.sh | All offers for collection |
| opensea-offers-nft.sh | Offers for specific NFT |
| opensea-best-listing.sh | Lowest listing for NFT |
| opensea-best-offer.sh | Highest offer for NFT |
| opensea-order.sh | Get order by hash |
| opensea-fulfill-listing.sh | Get buy transaction data |
| opensea-fulfill-offer.sh | Get sell transaction data |
| Script | Purpose |
|--------|---------|
| opensea-swap.sh | Swap tokens via OpenSea MCP |
| Script | Purpose |
|--------|---------|
| opensea-events-collection.sh | Collection event history |
| opensea-stream-collection.sh | Real-time WebSocket events |
ethereum, matic, arbitrum, optimism, base, avalanche, klaytn, zora, blast, sepolia
references/rest-api.md - REST endpoint families and paginationreferences/marketplace-api.md - Buy/sell workflows and Seaport detailsreferences/stream-api.md - WebSocket event streamingreferences/seaport.md - Seaport protocol and NFT purchase executionreferences/token-swaps.md - Token swap workflows via MCPAn official OpenSea MCP server provides direct LLM integration for token swaps and NFT operations. When enabled, Claude can execute swaps, query token data, and interact with NFT marketplaces directly.
Setup:
Add to your MCP config:
{
"mcpServers": {
"opensea": {
"url": "https://mcp.opensea.io/mcp",
"headers": {
"Authorization": "Bearer YOUR_MCP_TOKEN"
}
}
}
}
Or use the inline token format: https://mcp.opensea.io/YOUR_MCP_TOKEN/mcp
| MCP Tool | Purpose |
|----------|---------|
| get_token_swap_quote | Get swap calldata for token trades |
| get_token_balances | Check wallet token holdings |
| search_tokens | Find tokens by name/symbol |
| get_trending_tokens | Hot tokens by momentum |
| get_top_tokens | Top tokens by 24h volume |
| get_tokens | Get detailed token info |
| MCP Tool | Purpose |
|----------|---------|
| search_collections | Search NFT collections |
| search_items | Search individual NFTs |
| get_collections | Get detailed collection info |
| get_items | Get detailed NFT info |
| get_nft_balances | List NFTs owned by wallet |
| get_trending_collections | Trending NFT collections |
| get_top_collections | Top collections by volume |
| get_activity | Trading activity for collections/items |
| get_upcoming_drops | Upcoming NFT mints |
| MCP Tool | Purpose |
|----------|---------|
| get_profile | Wallet profile with holdings/activity |
| account_lookup | Resolve ENS/address/username |
| get_chains | List supported chains |
| search | AI-powered natural language search |
| fetch | Get full details by entity ID |
OpenSea MCP supports ERC20 token swaps across supported DEXes - not just NFTs!
mcporter call opensea.get_token_swap_quote --args '{
"fromContractAddress": "0x0000000000000000000000000000000000000000",
"fromChain": "base",
"toContractAddress": "0xb695559b26bb2c9703ef1935c37aeae9526bab07",
"toChain": "base",
"fromQuantity": "0.02",
"address": "0xYourWalletAddress"
}'
Parameters:
fromContractAddress: Token to swap from (use 0x0000...0000 for native ETH)toContractAddress: Token to swap tofromChain / toChain: Chain identifiersfromQuantity: Amount in human-readable units (e.g., "0.02" for 0.02 ETH)address: Your wallet addressResponse includes:
swapQuote: Price info, fees, slippage impactswap.actions[0].transactionSubmissionData: Ready-to-use calldataimport { createWalletClient, http } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { base } from 'viem/chains';
// Extract from swap quote response
const txData = response.swap.actions[0].transactionSubmissionData;
const wallet = createWalletClient({
account: privateKeyToAccount(PRIVATE_KEY),
chain: base,
transport: http()
});
const hash = await wallet.sendTransaction({
to: txData.to,
data: txData.data,
value: BigInt(txData.value)
});
mcporter call opensea.get_token_balances --args '{
"address": "0xYourWallet",
"chains": ["base", "ethereum"]
}'
To execute swaps or buy NFTs, you need an Ethereum wallet (private key + address).
import crypto from 'crypto';
import { privateKeyToAccount } from 'viem/accounts';
const privateKey = '0x' + crypto.randomBytes(32).toString('hex');
const account = privateKeyToAccount(privateKey);
console.log('Private Key:', privateKey);
console.log('Address:', account.address);
# Generate private key
PRIVATE_KEY="0x$(openssl rand -hex 32)"
echo "Private Key: $PRIVATE_KEY"
# Derive address (requires node + viem)
node --input-type=module -e "
import { privateKeyToAccount } from 'viem/accounts';
console.log('Address:', privateKeyToAccount('$PRIVATE_KEY').address);
"
cast wallet new
Important: Store private keys securely. Never commit them to git or share publicly.
OPENSEA_API_KEY environment variable (for REST API scripts)OPENSEA_MCP_TOKEN environment variable (for MCP server, separate from API key)curl for REST callswebsocat (optional) for Stream APIjq (recommended) for parsing JSON responsesGet both credentials at opensea.io/settings/developer.
Generated Mar 1, 2026
Users can track and analyze their NFT holdings across multiple blockchains, query collection details, and monitor market trends. This enables informed decisions on buying, selling, or holding assets based on real-time data and statistics.
Facilitates seamless ERC20 token exchanges across supported chains like Ethereum and Base using OpenSea's DEX aggregator. Users obtain optimal swap quotes and execute trades via scripts or MCP tools for efficient asset conversion.
Enables users to list NFTs for sale, accept offers, and purchase NFTs by retrieving fulfillment data for on-chain transactions. Supports workflows for finding best listings, checking offers, and executing trades via Seaport protocol.
Allows monitoring of NFT collection events such as sales and listings through historical queries or WebSocket streaming. Useful for tracking market activity, detecting trends, and automating responses to specific events.
Offer a subscription-based service that leverages OpenSea's API to provide advanced analytics, portfolio tracking, and market insights for NFT collectors and traders. Revenue is generated through tiered monthly or annual plans.
Build a platform that integrates OpenSea's token swap capabilities to offer users optimized routing and low fees for ERC20 exchanges across multiple chains. Revenue comes from transaction fees or affiliate commissions on swaps.
Provide consulting and development services to help businesses integrate OpenSea's marketplace APIs for buying, selling, and managing NFTs. Revenue is earned through project-based contracts or ongoing support fees.
💬 Integration Tip
Start by setting the OPENSEA_API_KEY environment variable and testing with helper scripts for common operations like token swaps or NFT queries before integrating MCP tools for advanced features.
Connect Claude to Clawdbot instantly and keep it connected 24/7. Run after setup to link your subscription, then auto-refreshes tokens forever.
ERC-8004 Trustless Agents - Register, discover, and build reputation for AI agents on Ethereum. Use when registering agents on-chain, querying agent registries, giving/receiving reputation feedback, or interacting with the AI agent trust layer.
Autonomous crypto trading on Base via Bankr. Use for trading tokens, monitoring launches, executing strategies, or managing a trading portfolio. Triggers on "trade", "buy", "sell", "launch", "snipe", "profit", "PnL", "portfolio balance", or any crypto trading task on Base.
Deploy ERC20 tokens on Base using Clanker SDK. Create tokens with built-in Uniswap V4 liquidity pools. Supports Base mainnet and Sepolia testnet. Requires PRIVATE_KEY in config.
Query DeFi portfolio data across 50+ chains via Zapper's GraphQL API. Use when the user wants to check wallet balances, DeFi positions, NFT holdings, token prices, or transaction history. Supports Base, Ethereum, Polygon, Arbitrum, Optimism, and more. Requires ZAPPER_API_KEY.
Interact with Solana blockchain via Helius APIs. Create/manage wallets, check balances (SOL + tokens), send transactions, swap tokens via Jupiter, and monitor addresses. Use for any Solana blockchain operation, crypto wallet management, token transfers, DeFi swaps, or portfolio tracking.