Rank
70
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
Traction
No public download signal
Freshness
Updated 2d ago
Xpersona Agent
Query 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.
clawhub skill install kn7176r43k8cwrwyv9h52051z9809n51:opensea-mcpOverall rank
#62
Adoption
1.5K downloads
Trust
Unknown
Freshness
Feb 28, 2026
Freshness
Last checked Feb 28, 2026
Best For
OpenSea is best for general automation workflows where OpenClaw compatibility matters.
Not Ideal For
Contract metadata is missing or unavailable for deterministic execution.
Evidence Sources Checked
CLAWHUB, CLAWHUB, runtime-metrics, public facts pack
Key links, install path, reliability highlights, and the shortest practical read before diving into the crawl record.
Overview
Query 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. Capability contract not published. No trust telemetry is available yet. 1.5K downloads reported by the source. Last updated 4/15/2026.
Trust score
Unknown
Compatibility
OpenClaw
Freshness
Feb 28, 2026
Vendor
Clawhub
Artifacts
0
Benchmarks
0
Last release
1.0.2
Install & run
clawhub skill install kn7176r43k8cwrwyv9h52051z9809n51:opensea-mcpInstall using `clawhub skill install kn7176r43k8cwrwyv9h52051z9809n51:opensea-mcp` in an isolated environment before connecting it to live workloads.
No published capability contract is available yet, so validate auth and request/response behavior manually.
Review the upstream CLAWHUB listing at https://clawhub.ai/dfinzer/opensea-mcp before using production credentials.
Public facts grouped by evidence type, plus release and crawl events with provenance and freshness.
Public facts
Vendor
Clawhub
Protocol compatibility
OpenClaw
Latest release
1.0.2
Adoption signal
1.5K downloads
Handshake status
UNKNOWN
Parameters, dependencies, examples, extracted files, editorial overview, and the complete README when available.
Captured outputs
Extracted files
5
Examples
6
Snippets
0
Languages
Unknown
bash
export 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
bash
./scripts/opensea-best-listing.sh cool-cats-nft 1234
bash
./scripts/opensea-fulfill-listing.sh ethereum 0x_order_hash 0x_your_wallet
bash
./scripts/opensea-best-offer.sh cool-cats-nft 1234
bash
./scripts/opensea-fulfill-offer.sh ethereum 0x_offer_hash 0x_your_wallet 0x_nft_contract 1234
json
{
"mcpServers": {
"opensea": {
"url": "https://mcp.opensea.io/mcp",
"headers": {
"Authorization": "Bearer YOUR_MCP_TOKEN"
}
}
}
}SKILL.md
# OpenSea API Query NFT data, trade on the Seaport marketplace, and swap ERC20 tokens across Ethereum, Base, Arbitrum, Optimism, Polygon, and more. ## Quick start 1. Set `OPENSEA_API_KEY` in your environment 2. Run helper scripts in `scripts/` for common operations 3. Use the MCP server for token swaps and advanced queries ```bash export 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 ``` ## Task guide ### Token swaps 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) | ### Reading NFT data | Task | Script | |------|--------| | Get collection details | `opensea-collection.sh <slug>` | | Get collection stats | `opensea-collection-stats.sh <slug>` | | List NFTs in collection | `opensea-collection-nfts.sh <slug> [limit] [next]` | | Get single NFT | `opensea-nft.sh <chain> <contract> <token_id>` | | List NFTs by wallet | `opensea-account-nfts.sh <chain> <address> [limit]` | ### Marketplace queries | Task | Script | |------|--------| | Get best listing for NFT | `opensea-best-listing.sh <slug> <token_id>` | | Get best offer for NFT | `opensea-best-offer.sh <slug> <token_id>` | | List all collection listings | `opensea-listings-collection.sh <slug> [limit]` | | List all collection offers | `opensea-offers-collection.sh <slug> [limit]` | | Get listings for specific NFT | `opensea-listings-nft.sh <chain> <contract> <token_id>` | | Get offers for specific NFT | `opensea-offers-nft.sh <chain> <contract> <token_id>` | | Get order by hash | `opensea-order.sh <chain> <order_hash>` | ### Marketplace actions (POST) | Task | Script | |------|--------| | Get fulfillment data (buy NFT) | `opensea-fulfill-listing.sh <chain> <order_hash> <buyer>` | | Get fulfillment data (accept offer) | `opensea-fulfill-offer.sh <chain> <order_hash> <seller> <contract> <token_id>` | | Generic POST request | `opensea-post.sh <path> <json_body>` | ### Events and monitoring | Task | Script | |------|--------| | Get collection events | `opensea-events-collection.sh <slug> [event_type] [limit]` | | Stream real-time events | `opensea-stream-collection.sh <slug>` (requires websocat) |
_meta.json
{
"ownerId": "kn7176r43k8cwrwyv9h52051z9809n51",
"slug": "opensea-mcp",
"version": "1.0.2",
"publishedAt": 1770513419679
}references/marketplace-api.md
# OpenSea Marketplace API
This reference covers the marketplace endpoints for buying and selling NFTs on OpenSea.
## Overview
OpenSea uses the **Seaport protocol** for all marketplace orders. The API provides endpoints to:
- Query existing listings and offers
- Build new listings and offers (returns unsigned Seaport orders)
- Fulfill orders (accept listings or offers)
- Cancel orders
**Important**: Creating and fulfilling orders requires wallet signatures. The API returns order data that must be signed client-side before submission.
## Base URL and Authentication
```
Base URL: https://api.opensea.io/api/v2
Auth: x-api-key: $OPENSEA_API_KEY
```
## Supported Chains
| Chain | Identifier |
|-------|------------|
| Ethereum | `ethereum` |
| Polygon | `matic` |
| Arbitrum | `arbitrum` |
| Optimism | `optimism` |
| Base | `base` |
| Avalanche | `avalanche` |
| Klaytn | `klaytn` |
| Zora | `zora` |
| Blast | `blast` |
| Sepolia (testnet) | `sepolia` |
---
## Read Operations (GET)
### Get Best Listing for NFT
Returns the lowest-priced active listing for an NFT.
```bash
GET /api/v2/listings/collection/{collection_slug}/nfts/{identifier}/best
```
**Parameters:**
- `collection_slug`: Collection slug (e.g., `boredapeyachtclub`)
- `identifier`: NFT identifier (token ID)
**Example:**
```bash
scripts/opensea-get.sh "/api/v2/listings/collection/boredapeyachtclub/nfts/1234/best"
```
### Get Best Offer for NFT
Returns the highest active offer for an NFT.
```bash
GET /api/v2/offers/collection/{collection_slug}/nfts/{identifier}/best
```
**Example:**
```bash
scripts/opensea-get.sh "/api/v2/offers/collection/boredapeyachtclub/nfts/1234/best"
```
### Get All Listings for Collection
Returns all active listings for a collection.
```bash
GET /api/v2/listings/collection/{collection_slug}/all
```
**Query parameters:**
- `limit`: Page size (default 50, max 100)
- `next`: Cursor for pagination
**Example:**
```bash
scripts/opensea-listings-collection.sh boredapeyachtclub 50
```
### Get All Offers for Collection
Returns all active offers for a collection.
```bash
GET /api/v2/offers/collection/{collection_slug}/all
```
**Example:**
```bash
scripts/opensea-offers-collection.sh boredapeyachtclub 50
```
### Get Listings for Specific NFT
```bash
GET /api/v2/orders/{chain}/seaport/listings
```
**Query parameters:**
- `asset_contract_address`: Contract address
- `token_ids`: Comma-separated token IDs
- `limit`, `next`: Pagination
**Example:**
```bash
scripts/opensea-get.sh "/api/v2/orders/ethereum/seaport/listings" "asset_contract_address=0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d&token_ids=1234"
```
### Get Offers for Specific NFT
```bash
GET /api/v2/orders/{chain}/seaport/offers
```
**Query parameters:**
- `asset_contract_address`: Contract address
- `token_ids`: Comma-separated token IDs
**Example:**
```bash
scripts/opensea-get.sh "/api/v2/orders/ethereum/seaport/offers" "asset_contract_address=0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d&token_idsreferences/rest-api.md
# OpenSea REST API Reference
## Base URL and Authentication
```
Base URL: https://api.opensea.io
Auth header: x-api-key: $OPENSEA_API_KEY
```
## Pagination
List endpoints support cursor-based pagination:
- `limit`: Page size (default varies, max 100)
- `next`: Cursor token from previous response
## Supported Chains
| Chain | Identifier |
|-------|------------|
| Ethereum | `ethereum` |
| Polygon | `matic` |
| Arbitrum | `arbitrum` |
| Optimism | `optimism` |
| Base | `base` |
| Avalanche | `avalanche` |
| Klaytn | `klaytn` |
| Zora | `zora` |
| Blast | `blast` |
| Sepolia (testnet) | `sepolia` |
## Endpoint Reference
### Collections
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/api/v2/collections/{slug}` | GET | Single collection details |
| `/api/v2/collections/{slug}/stats` | GET | Collection statistics (floor, volume) |
| `/api/v2/collections` | GET | List multiple collections |
### NFTs
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/api/v2/chain/{chain}/contract/{contract}/nfts/{token_id}` | GET | Single NFT details |
| `/api/v2/collection/{slug}/nfts` | GET | NFTs by collection |
| `/api/v2/chain/{chain}/account/{address}/nfts` | GET | NFTs by wallet |
| `/api/v2/chain/{chain}/contract/{contract}/nfts` | GET | NFTs by contract |
| `/api/v2/nft/{contract}/{token_id}/refresh` | POST | Refresh NFT metadata |
### Listings
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/api/v2/listings/collection/{slug}/all` | GET | All listings for collection |
| `/api/v2/listings/collection/{slug}/nfts/{token_id}/best` | GET | Best listing for NFT |
| `/api/v2/orders/{chain}/seaport/listings` | GET | Listings by contract/token |
| `/api/v2/orders/{chain}/seaport/listings` | POST | Create new listing |
| `/api/v2/listings/fulfillment_data` | POST | Get buy transaction data |
### Offers
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/api/v2/offers/collection/{slug}/all` | GET | All offers for collection |
| `/api/v2/offers/collection/{slug}/nfts/{token_id}/best` | GET | Best offer for NFT |
| `/api/v2/orders/{chain}/seaport/offers` | GET | Offers by contract/token |
| `/api/v2/orders/{chain}/seaport/offers` | POST | Create new offer |
| `/api/v2/offers/fulfillment_data` | POST | Get sell transaction data |
### Orders
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/api/v2/orders/chain/{chain}/protocol/{protocol}/{hash}` | GET | Get order by hash |
| `/api/v2/orders/chain/{chain}/protocol/{protocol}/{hash}/cancel` | POST | Cancel order |
### Events
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/api/v2/events/collection/{slug}` | GET | Events by collection |
| `/api/v2/events/chain/{chain}/contract/{contract}/nfts/{token_id}` | GET | Events by NFT |
| `/api/v2/events/chain/{chain}/account/{address}` | GET | Events by account |
### Accounts
| Endpoint | Method | Description |
|references/seaport.md
# Seaport (OpenSea marketplace protocol)
## What it is
Seaport is the marketplace protocol used for OpenSea orders. All listings and offers on OpenSea are Seaport orders under the hood.
## Order structure
- **Offer items**: What the offerer provides (e.g., an NFT for listings, WETH for offers)
- **Consideration items**: What the offerer expects to receive (e.g., ETH payment + fees)
## Seaport Contract Addresses
| Chain | Seaport 1.6 Address |
|-------|---------------------|
| All EVM chains | `0x0000000000000068F116a894984e2DB1123eB395` |
Legacy Seaport 1.4: `0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC`
---
## Buying NFTs (Fulfilling Listings)
**No SDK required!** The OpenSea API returns ready-to-use calldata.
### Workflow
1. **Find a listing** - Get order hash from listings endpoint
2. **Get fulfillment data** - POST to fulfillment endpoint
3. **Submit transaction** - Send calldata directly to blockchain
### Step 1: Get Listings
```bash
# Via script
./scripts/opensea-listings-collection.sh basenames
# Via MCP
mcporter call opensea.get_listings collection="basenames" limit=10
```
Note the `order_hash` and `protocol_address` from the response.
### Step 2: Get Fulfillment Calldata
```bash
# Via script
./scripts/opensea-fulfill-listing.sh base 0xORDER_HASH 0xYOUR_WALLET
# Via curl
curl -X POST "https://api.opensea.io/api/v2/listings/fulfillment_data" \
-H "Content-Type: application/json" \
-H "x-api-key: $OPENSEA_API_KEY" \
-d '{
"listing": {
"hash": "0xORDER_HASH",
"chain": "base",
"protocol_address": "0x0000000000000068F116a894984e2DB1123eB395"
},
"fulfiller": {
"address": "0xYOUR_WALLET"
}
}'
```
**Response contains:**
- `fulfillment_data.transaction.to` - Seaport contract
- `fulfillment_data.transaction.value` - ETH to send (wei)
- `fulfillment_data.transaction.input_data` - Encoded calldata
### Step 3: Submit Transaction
```javascript
import { createPublicClient, createWalletClient, http } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { base } from 'viem/chains';
const account = privateKeyToAccount(PRIVATE_KEY);
const wallet = createWalletClient({ account, chain: base, transport: http() });
const pub = createPublicClient({ chain: base, transport: http() });
// From fulfillment response
const txData = response.fulfillment_data.transaction;
const hash = await wallet.sendTransaction({
to: txData.to,
data: txData.input_data.parameters ? encodeSeaportCall(txData.input_data) : txData.data,
value: BigInt(txData.value)
});
const receipt = await pub.waitForTransactionReceipt({ hash });
console.log(receipt.status === 'success' ? '✅ NFT purchased!' : '❌ Failed');
```
### Complete Working Example
```javascript
// buy-nft.mjs - Buy an NFT via OpenSea fulfillment API
import { createPublicClient, createWalletClient, http, encodeFunctionData } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { base } from 'viem/chains';
const SEAPOEditorial read
Docs source
CLAWHUB
Editorial quality
thin
Skill: OpenSea Owner: dfinzer Summary: Query 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. Tags: latest:1.0.2 Version history: v1.0.2 | 2026-02-08T01:16:59.679Z | user Version 1.0.2 - Documentat
Skill: OpenSea
Owner: dfinzer
Summary: Query 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.
Tags: latest:1.0.2
Version history:
v1.0.2 | 2026-02-08T01:16:59.679Z | user
Version 1.0.2
v1.0.1 | 2026-02-08T00:45:59.632Z | user
v1.0.0 | 2026-01-31T18:52:39.344Z | user
Archive index:
Archive v1.0.2: 26 files, 22965 bytes
Files: references/marketplace-api.md (9198b), references/rest-api.md (3935b), references/seaport.md (7026b), references/stream-api.md (661b), references/token-swaps.md (4604b), scripts/opensea-account-nfts.sh (483b), scripts/opensea-best-listing.sh (336b), scripts/opensea-best-offer.sh (330b), scripts/opensea-collection-nfts.sh (450b), scripts/opensea-collection-stats.sh (290b), scripts/opensea-collection.sh (210b), scripts/opensea-events-collection.sh (625b), scripts/opensea-fulfill-listing.sh (676b), scripts/opensea-fulfill-offer.sh (854b), scripts/opensea-get.sh (480b), scripts/opensea-listings-collection.sh (462b), scripts/opensea-listings-nft.sh (476b), scripts/opensea-nft.sh (285b), scripts/opensea-offers-collection.sh (458b), scripts/opensea-offers-nft.sh (470b), scripts/opensea-order.sh (374b), scripts/opensea-post.sh (527b), scripts/opensea-stream-collection.sh (958b), scripts/opensea-swap.sh (3027b), SKILL.md (10740b), _meta.json (130b)
File v1.0.2:SKILL.md
Query 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 <slug> |
| Get collection stats | opensea-collection-stats.sh <slug> |
| List NFTs in collection | opensea-collection-nfts.sh <slug> [limit] [next] |
| Get single NFT | opensea-nft.sh <chain> <contract> <token_id> |
| List NFTs by wallet | opensea-account-nfts.sh <chain> <address> [limit] |
| Task | Script |
|------|--------|
| Get best listing for NFT | opensea-best-listing.sh <slug> <token_id> |
| Get best offer for NFT | opensea-best-offer.sh <slug> <token_id> |
| List all collection listings | opensea-listings-collection.sh <slug> [limit] |
| List all collection offers | opensea-offers-collection.sh <slug> [limit] |
| Get listings for specific NFT | opensea-listings-nft.sh <chain> <contract> <token_id> |
| Get offers for specific NFT | opensea-offers-nft.sh <chain> <contract> <token_id> |
| Get order by hash | opensea-order.sh <chain> <order_hash> |
| Task | Script |
|------|--------|
| Get fulfillment data (buy NFT) | opensea-fulfill-listing.sh <chain> <order_hash> <buyer> |
| Get fulfillment data (accept offer) | opensea-fulfill-offer.sh <chain> <order_hash> <seller> <contract> <token_id> |
| Generic POST request | opensea-post.sh <path> <json_body> |
| Task | Script |
|------|--------|
| Get collection events | opensea-events-collection.sh <slug> [event_type] [limit] |
| Stream real-time events | opensea-stream-collection.sh <slug> (requires websocat) |
| Task | Script |
|------|--------|
| Any GET endpoint | opensea-get.sh <path> [query] |
| Any POST endpoint | opensea-post.sh <path> <json_body> |
Find the NFT and check its listing:
./scripts/opensea-best-listing.sh cool-cats-nft 1234
Get the order hash from the response, then get fulfillment data:
./scripts/opensea-fulfill-listing.sh ethereum 0x_order_hash 0x_your_wallet
The response contains transaction data to execute on-chain
Check offers on your NFT:
./scripts/opensea-best-offer.sh cool-cats-nft 1234
Get fulfillment data for the offer:
./scripts/opensea-fulfill-offer.sh ethereum 0x_offer_hash 0x_your_wallet 0x_nft_contract 1234
Execute the returned transaction data
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.
File v1.0.2:_meta.json
{ "ownerId": "kn7176r43k8cwrwyv9h52051z9809n51", "slug": "opensea-mcp", "version": "1.0.2", "publishedAt": 1770513419679 }
File v1.0.2:references/marketplace-api.md
This reference covers the marketplace endpoints for buying and selling NFTs on OpenSea.
OpenSea uses the Seaport protocol for all marketplace orders. The API provides endpoints to:
Important: Creating and fulfilling orders requires wallet signatures. The API returns order data that must be signed client-side before submission.
Base URL: https://api.opensea.io/api/v2
Auth: x-api-key: $OPENSEA_API_KEY
| Chain | Identifier |
|-------|------------|
| Ethereum | ethereum |
| Polygon | matic |
| Arbitrum | arbitrum |
| Optimism | optimism |
| Base | base |
| Avalanche | avalanche |
| Klaytn | klaytn |
| Zora | zora |
| Blast | blast |
| Sepolia (testnet) | sepolia |
Returns the lowest-priced active listing for an NFT.
GET /api/v2/listings/collection/{collection_slug}/nfts/{identifier}/best
Parameters:
collection_slug: Collection slug (e.g., boredapeyachtclub)identifier: NFT identifier (token ID)Example:
scripts/opensea-get.sh "/api/v2/listings/collection/boredapeyachtclub/nfts/1234/best"
Returns the highest active offer for an NFT.
GET /api/v2/offers/collection/{collection_slug}/nfts/{identifier}/best
Example:
scripts/opensea-get.sh "/api/v2/offers/collection/boredapeyachtclub/nfts/1234/best"
Returns all active listings for a collection.
GET /api/v2/listings/collection/{collection_slug}/all
Query parameters:
limit: Page size (default 50, max 100)next: Cursor for paginationExample:
scripts/opensea-listings-collection.sh boredapeyachtclub 50
Returns all active offers for a collection.
GET /api/v2/offers/collection/{collection_slug}/all
Example:
scripts/opensea-offers-collection.sh boredapeyachtclub 50
GET /api/v2/orders/{chain}/seaport/listings
Query parameters:
asset_contract_address: Contract addresstoken_ids: Comma-separated token IDslimit, next: PaginationExample:
scripts/opensea-get.sh "/api/v2/orders/ethereum/seaport/listings" "asset_contract_address=0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d&token_ids=1234"
GET /api/v2/orders/{chain}/seaport/offers
Query parameters:
asset_contract_address: Contract addresstoken_ids: Comma-separated token IDsExample:
scripts/opensea-get.sh "/api/v2/orders/ethereum/seaport/offers" "asset_contract_address=0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d&token_ids=1234"
Retrieve details of a specific order.
GET /api/v2/orders/chain/{chain}/protocol/{protocol_address}/hash/{order_hash}
Example:
scripts/opensea-get.sh "/api/v2/orders/chain/ethereum/protocol/0x00000000000000adc04c56bf30ac9d3c0aaf14dc/hash/0x..."
Creates an unsigned Seaport listing order. Returns order parameters to sign.
POST /api/v2/orders/{chain}/seaport/listings
Request body:
{
"parameters": {
"offerer": "0xYourWalletAddress",
"offer": [{
"itemType": 2,
"token": "0xContractAddress",
"identifierOrCriteria": "1234",
"startAmount": "1",
"endAmount": "1"
}],
"consideration": [{
"itemType": 0,
"token": "0x0000000000000000000000000000000000000000",
"identifierOrCriteria": "0",
"startAmount": "1000000000000000000",
"endAmount": "1000000000000000000",
"recipient": "0xYourWalletAddress"
}],
"startTime": "1704067200",
"endTime": "1735689600",
"orderType": 0,
"zone": "0x0000000000000000000000000000000000000000",
"zoneHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"salt": "random_salt_value",
"conduitKey": "0x0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000",
"totalOriginalConsiderationItems": 1
},
"signature": "0xSignedOrderSignature"
}
Item Types:
0: Native currency (ETH, MATIC, etc.)1: ERC20 token2: ERC721 NFT3: ERC1155 NFTExample (curl):
curl -X POST "https://api.opensea.io/api/v2/orders/ethereum/seaport/listings" \
-H "x-api-key: $OPENSEA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"parameters": {...}, "signature": "0x..."}'
Creates an unsigned Seaport offer order.
POST /api/v2/orders/{chain}/seaport/offers
Request body structure (similar to listings, but offer contains payment and consideration contains NFT):
{
"parameters": {
"offerer": "0xBuyerWalletAddress",
"offer": [{
"itemType": 1,
"token": "0xWETHAddress",
"identifierOrCriteria": "0",
"startAmount": "1000000000000000000",
"endAmount": "1000000000000000000"
}],
"consideration": [{
"itemType": 2,
"token": "0xNFTContractAddress",
"identifierOrCriteria": "1234",
"startAmount": "1",
"endAmount": "1",
"recipient": "0xBuyerWalletAddress"
}]
},
"signature": "0x..."
}
Accept an existing listing to purchase an NFT.
POST /api/v2/listings/fulfillment_data
Request body:
{
"listing": {
"hash": "0xOrderHash",
"chain": "ethereum",
"protocol_address": "0x00000000000000adc04c56bf30ac9d3c0aaf14dc"
},
"fulfiller": {
"address": "0xBuyerWalletAddress"
}
}
Response: Returns transaction data for the buyer to submit on-chain.
Accept an existing offer to sell your NFT.
POST /api/v2/offers/fulfillment_data
Request body:
{
"offer": {
"hash": "0xOfferOrderHash",
"chain": "ethereum",
"protocol_address": "0x00000000000000adc04c56bf30ac9d3c0aaf14dc"
},
"fulfiller": {
"address": "0xSellerWalletAddress"
},
"consideration": {
"asset_contract_address": "0xNFTContract",
"token_id": "1234"
}
}
Cancel an active listing or offer.
POST /api/v2/orders/chain/{chain}/protocol/{protocol_address}/hash/{order_hash}/cancel
Note: Cancellation requires an on-chain transaction. The API returns the transaction data to execute.
opensea-nft.sh to get NFT detailsopensea-get.sh to get best listing/api/v2/listings/fulfillment_data# Step 1: Get NFT info
./scripts/opensea-nft.sh ethereum 0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d 1234
# Step 2: Get best listing
./scripts/opensea-get.sh "/api/v2/listings/collection/boredapeyachtclub/nfts/1234/best"
# Step 3: Request fulfillment (requires POST - see marketplace scripts)
./scripts/opensea-fulfill-listing.sh ethereum 0x_order_hash 0x_your_wallet
/api/v2/orders/{chain}/seaport/listings/api/v2/listings/collection/{slug}/all/api/v2/orders/{chain}/seaport/offersopensea-offers-collection.sh/api/v2/offers/fulfillment_data| Code | Meaning | |------|---------| | 400 | Bad request - invalid parameters | | 401 | Unauthorized - missing or invalid API key | | 404 | Not found - order/NFT doesn't exist | | 429 | Rate limited - too many requests | | 500 | Server error |
| Chain | Seaport 1.6 Address |
|-------|---------------------|
| All chains | 0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC |
File v1.0.2:references/rest-api.md
Base URL: https://api.opensea.io
Auth header: x-api-key: $OPENSEA_API_KEY
List endpoints support cursor-based pagination:
limit: Page size (default varies, max 100)next: Cursor token from previous response| Chain | Identifier |
|-------|------------|
| Ethereum | ethereum |
| Polygon | matic |
| Arbitrum | arbitrum |
| Optimism | optimism |
| Base | base |
| Avalanche | avalanche |
| Klaytn | klaytn |
| Zora | zora |
| Blast | blast |
| Sepolia (testnet) | sepolia |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v2/collections/{slug} | GET | Single collection details |
| /api/v2/collections/{slug}/stats | GET | Collection statistics (floor, volume) |
| /api/v2/collections | GET | List multiple collections |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v2/chain/{chain}/contract/{contract}/nfts/{token_id} | GET | Single NFT details |
| /api/v2/collection/{slug}/nfts | GET | NFTs by collection |
| /api/v2/chain/{chain}/account/{address}/nfts | GET | NFTs by wallet |
| /api/v2/chain/{chain}/contract/{contract}/nfts | GET | NFTs by contract |
| /api/v2/nft/{contract}/{token_id}/refresh | POST | Refresh NFT metadata |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v2/listings/collection/{slug}/all | GET | All listings for collection |
| /api/v2/listings/collection/{slug}/nfts/{token_id}/best | GET | Best listing for NFT |
| /api/v2/orders/{chain}/seaport/listings | GET | Listings by contract/token |
| /api/v2/orders/{chain}/seaport/listings | POST | Create new listing |
| /api/v2/listings/fulfillment_data | POST | Get buy transaction data |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v2/offers/collection/{slug}/all | GET | All offers for collection |
| /api/v2/offers/collection/{slug}/nfts/{token_id}/best | GET | Best offer for NFT |
| /api/v2/orders/{chain}/seaport/offers | GET | Offers by contract/token |
| /api/v2/orders/{chain}/seaport/offers | POST | Create new offer |
| /api/v2/offers/fulfillment_data | POST | Get sell transaction data |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v2/orders/chain/{chain}/protocol/{protocol}/{hash} | GET | Get order by hash |
| /api/v2/orders/chain/{chain}/protocol/{protocol}/{hash}/cancel | POST | Cancel order |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v2/events/collection/{slug} | GET | Events by collection |
| /api/v2/events/chain/{chain}/contract/{contract}/nfts/{token_id} | GET | Events by NFT |
| /api/v2/events/chain/{chain}/account/{address} | GET | Events by account |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v2/accounts/{address} | GET | Account profile |
For the events endpoint, filter with event_type:
sale - NFT soldtransfer - NFT transferredlisting - New listing createdoffer - New offer madecancel - Order cancelledredemption - NFT redeemed| Code | Meaning | |------|---------| | 400 | Bad request - check parameters | | 401 | Unauthorized - missing/invalid API key | | 404 | Resource not found | | 429 | Rate limited | | 500 | Server error |
jq to parse JSON responses: ./script.sh | jq '.nft.name'File v1.0.2:references/seaport.md
Seaport is the marketplace protocol used for OpenSea orders. All listings and offers on OpenSea are Seaport orders under the hood.
| Chain | Seaport 1.6 Address |
|-------|---------------------|
| All EVM chains | 0x0000000000000068F116a894984e2DB1123eB395 |
Legacy Seaport 1.4: 0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC
No SDK required! The OpenSea API returns ready-to-use calldata.
# Via script
./scripts/opensea-listings-collection.sh basenames
# Via MCP
mcporter call opensea.get_listings collection="basenames" limit=10
Note the order_hash and protocol_address from the response.
# Via script
./scripts/opensea-fulfill-listing.sh base 0xORDER_HASH 0xYOUR_WALLET
# Via curl
curl -X POST "https://api.opensea.io/api/v2/listings/fulfillment_data" \
-H "Content-Type: application/json" \
-H "x-api-key: $OPENSEA_API_KEY" \
-d '{
"listing": {
"hash": "0xORDER_HASH",
"chain": "base",
"protocol_address": "0x0000000000000068F116a894984e2DB1123eB395"
},
"fulfiller": {
"address": "0xYOUR_WALLET"
}
}'
Response contains:
fulfillment_data.transaction.to - Seaport contractfulfillment_data.transaction.value - ETH to send (wei)fulfillment_data.transaction.input_data - Encoded calldataimport { createPublicClient, createWalletClient, http } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { base } from 'viem/chains';
const account = privateKeyToAccount(PRIVATE_KEY);
const wallet = createWalletClient({ account, chain: base, transport: http() });
const pub = createPublicClient({ chain: base, transport: http() });
// From fulfillment response
const txData = response.fulfillment_data.transaction;
const hash = await wallet.sendTransaction({
to: txData.to,
data: txData.input_data.parameters ? encodeSeaportCall(txData.input_data) : txData.data,
value: BigInt(txData.value)
});
const receipt = await pub.waitForTransactionReceipt({ hash });
console.log(receipt.status === 'success' ? '✅ NFT purchased!' : '❌ Failed');
// buy-nft.mjs - Buy an NFT via OpenSea fulfillment API
import { createPublicClient, createWalletClient, http, encodeFunctionData } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { base } from 'viem/chains';
const SEAPORT_ABI = [{
name: 'fulfillBasicOrder_efficient_6GL6yc',
type: 'function',
stateMutability: 'payable',
inputs: [{
name: 'parameters',
type: 'tuple',
components: [
{ name: 'considerationToken', type: 'address' },
{ name: 'considerationIdentifier', type: 'uint256' },
{ name: 'considerationAmount', type: 'uint256' },
{ name: 'offerer', type: 'address' },
{ name: 'zone', type: 'address' },
{ name: 'offerToken', type: 'address' },
{ name: 'offerIdentifier', type: 'uint256' },
{ name: 'offerAmount', type: 'uint256' },
{ name: 'basicOrderType', type: 'uint8' },
{ name: 'startTime', type: 'uint256' },
{ name: 'endTime', type: 'uint256' },
{ name: 'zoneHash', type: 'bytes32' },
{ name: 'salt', type: 'uint256' },
{ name: 'offererConduitKey', type: 'bytes32' },
{ name: 'fulfillerConduitKey', type: 'bytes32' },
{ name: 'totalOriginalAdditionalRecipients', type: 'uint256' },
{ name: 'additionalRecipients', type: 'tuple[]', components: [
{ name: 'amount', type: 'uint256' },
{ name: 'recipient', type: 'address' }
]},
{ name: 'signature', type: 'bytes' }
]
}],
outputs: [{ name: 'fulfilled', type: 'bool' }]
}];
async function buyNFT(orderHash, chain, buyerAddress, privateKey) {
// 1. Get fulfillment data
const res = await fetch('https://api.opensea.io/api/v2/listings/fulfillment_data', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': process.env.OPENSEA_API_KEY
},
body: JSON.stringify({
listing: { hash: orderHash, chain, protocol_address: '0x0000000000000068F116a894984e2DB1123eB395' },
fulfiller: { address: buyerAddress }
})
});
const { fulfillment_data } = await res.json();
const tx = fulfillment_data.transaction;
const params = tx.input_data.parameters;
// 2. Setup wallet
const account = privateKeyToAccount(privateKey);
const wallet = createWalletClient({ account, chain: base, transport: http() });
const pub = createPublicClient({ chain: base, transport: http() });
// 3. Encode and send
const orderParams = {
...params,
considerationIdentifier: BigInt(params.considerationIdentifier),
considerationAmount: BigInt(params.considerationAmount),
offerIdentifier: BigInt(params.offerIdentifier),
offerAmount: BigInt(params.offerAmount),
startTime: BigInt(params.startTime),
endTime: BigInt(params.endTime),
salt: BigInt(params.salt),
totalOriginalAdditionalRecipients: BigInt(params.totalOriginalAdditionalRecipients),
additionalRecipients: params.additionalRecipients.map(r => ({
amount: BigInt(r.amount),
recipient: r.recipient
}))
};
const data = encodeFunctionData({
abi: SEAPORT_ABI,
functionName: 'fulfillBasicOrder_efficient_6GL6yc',
args: [orderParams]
});
const hash = await wallet.sendTransaction({
to: tx.to,
data,
value: BigInt(tx.value)
});
console.log(`TX: https://basescan.org/tx/${hash}`);
const receipt = await pub.waitForTransactionReceipt({ hash });
return receipt.status === 'success';
}
Similar workflow using /api/v2/offers/fulfillment_data:
./scripts/opensea-fulfill-offer.sh base 0xOFFER_HASH 0xYOUR_WALLET 0xNFT_CONTRACT 1234
Creating listings requires signing a Seaport order:
See references/marketplace-api.md for full order structure.
fulfillBasicOrder_efficient_6GL6yc functionfulfillAvailableAdvancedOrders for partial fillsFile v1.0.2:references/stream-api.md
wss://stream.openseabeta.com/socket/websocket?token=YOUR_API_KEY
Send a Phoenix join message:
{"topic":"collection:your-collection-slug","event":"phx_join","payload":{},"ref":1}
Use "collection:*" to subscribe globally.
Send every ~30 seconds:
{"topic":"phoenix","event":"heartbeat","payload":{},"ref":0}
File v1.0.2:references/token-swaps.md
OpenSea MCP provides token swap functionality through integrated DEX aggregation. This allows swapping ERC20 tokens and native currencies across supported chains.
The get_token_swap_quote tool returns:
ethereum)base)matic)arbitrum)optimism)mcporter call opensea.get_token_swap_quote --args '{
"fromContractAddress": "0x0000000000000000000000000000000000000000",
"fromChain": "base",
"toContractAddress": "0xb695559b26bb2c9703ef1935c37aeae9526bab07",
"toChain": "base",
"fromQuantity": "0.02",
"address": "0xYourWalletAddress"
}'
| Parameter | Required | Description |
|-----------|----------|-------------|
| fromContractAddress | Yes | Token to swap FROM. Use 0x0000...0000 for native ETH |
| toContractAddress | Yes | Token to swap TO |
| fromChain | Yes | Source chain identifier |
| toChain | Yes | Destination chain identifier |
| fromQuantity | Yes | Amount in human units (e.g., "0.02" for 0.02 ETH) |
| address | Yes | Your wallet address |
| recipient | No | Recipient address (defaults to sender) |
| slippageTolerance | No | Slippage as decimal (e.g., 0.005 for 0.5%) |
{
"swapQuote": {
"swapRoutes": [{
"toAsset": { "symbol": "MOLT", "usdPrice": "0.00045" },
"fromAsset": { "symbol": "ETH", "usdPrice": "2370" },
"costs": [
{ "costType": "GAS", "cost": { "usd": 0.01 } },
{ "costType": "MARKETPLACE", "cost": { "usd": 0.40 } }
],
"swapImpact": { "percent": "3.5" }
}],
"totalPrice": { "usd": 47.40 }
},
"swap": {
"actions": [{
"transactionSubmissionData": {
"to": "0xSwapRouterContract",
"data": "0x...",
"value": "20000000000000000",
"chain": { "networkId": 8453, "identifier": "base" }
}
}]
}
}
import { createPublicClient, createWalletClient, http } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { base } from 'viem/chains';
// Get quote first (via mcporter or direct API call)
const quote = await getSwapQuote(...);
const txData = quote.swap.actions[0].transactionSubmissionData;
// Setup wallet
const account = privateKeyToAccount(PRIVATE_KEY);
const wallet = createWalletClient({ account, chain: base, transport: http() });
const pub = createPublicClient({ chain: base, transport: http() });
// Execute swap
const hash = await wallet.sendTransaction({
to: txData.to,
data: txData.data,
value: BigInt(txData.value)
});
console.log(`TX: https://basescan.org/tx/${hash}`);
// Wait for confirmation
const receipt = await pub.waitForTransactionReceipt({ hash });
console.log(receipt.status === 'success' ? '✅ Swap complete!' : '❌ Failed');
./scripts/opensea-swap.sh <to_token_address> <amount_eth> <your_wallet> <private_key>
# Example: Swap 0.02 ETH to MOLT
./scripts/opensea-swap.sh 0xb695559b26bb2c9703ef1935c37aeae9526bab07 0.02 0xYourWallet 0xYourPrivateKey
mcporter call opensea.search_tokens --args '{"query": "MOLT", "chain": "base", "limit": 5}'
mcporter call opensea.get_trending_tokens --args '{"chains": ["base"], "limit": 10}'
mcporter call opensea.get_top_tokens --args '{"chains": ["base"], "limit": 10}'
mcporter call opensea.get_token_balances --args '{
"address": "0xYourWallet",
"chains": ["base", "ethereum"]
}'
| Token | Address |
|-------|---------|
| WETH | 0x4200000000000000000000000000000000000006 |
| USDC | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
| MOLT | 0xb695559b26bb2c9703ef1935c37aeae9526bab07 |
| CLAWD | 0x9f86db9fc6f7c9408e8fda3ff8ce4e78ac7a6b07 |
| 4CLAW | 0x3b94a3fa7f33930cf9fdc5f36cb251533c947b07 |
0x0000...0000) when swapping from ETHArchive v1.0.1: 26 files, 22945 bytes
Files: references/marketplace-api.md (9198b), references/rest-api.md (3935b), references/seaport.md (7026b), references/stream-api.md (661b), references/token-swaps.md (4604b), scripts/opensea-account-nfts.sh (483b), scripts/opensea-best-listing.sh (336b), scripts/opensea-best-offer.sh (330b), scripts/opensea-collection-nfts.sh (450b), scripts/opensea-collection-stats.sh (290b), scripts/opensea-collection.sh (210b), scripts/opensea-events-collection.sh (625b), scripts/opensea-fulfill-listing.sh (676b), scripts/opensea-fulfill-offer.sh (854b), scripts/opensea-get.sh (480b), scripts/opensea-listings-collection.sh (462b), scripts/opensea-listings-nft.sh (476b), scripts/opensea-nft.sh (285b), scripts/opensea-offers-collection.sh (458b), scripts/opensea-offers-nft.sh (470b), scripts/opensea-order.sh (374b), scripts/opensea-post.sh (527b), scripts/opensea-stream-collection.sh (958b), scripts/opensea-swap.sh (2908b), SKILL.md (10740b), _meta.json (130b)
File v1.0.1:SKILL.md
Query 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 <slug> |
| Get collection stats | opensea-collection-stats.sh <slug> |
| List NFTs in collection | opensea-collection-nfts.sh <slug> [limit] [next] |
| Get single NFT | opensea-nft.sh <chain> <contract> <token_id> |
| List NFTs by wallet | opensea-account-nfts.sh <chain> <address> [limit] |
| Task | Script |
|------|--------|
| Get best listing for NFT | opensea-best-listing.sh <slug> <token_id> |
| Get best offer for NFT | opensea-best-offer.sh <slug> <token_id> |
| List all collection listings | opensea-listings-collection.sh <slug> [limit] |
| List all collection offers | opensea-offers-collection.sh <slug> [limit] |
| Get listings for specific NFT | opensea-listings-nft.sh <chain> <contract> <token_id> |
| Get offers for specific NFT | opensea-offers-nft.sh <chain> <contract> <token_id> |
| Get order by hash | opensea-order.sh <chain> <order_hash> |
| Task | Script |
|------|--------|
| Get fulfillment data (buy NFT) | opensea-fulfill-listing.sh <chain> <order_hash> <buyer> |
| Get fulfillment data (accept offer) | opensea-fulfill-offer.sh <chain> <order_hash> <seller> <contract> <token_id> |
| Generic POST request | opensea-post.sh <path> <json_body> |
| Task | Script |
|------|--------|
| Get collection events | opensea-events-collection.sh <slug> [event_type] [limit] |
| Stream real-time events | opensea-stream-collection.sh <slug> (requires websocat) |
| Task | Script |
|------|--------|
| Any GET endpoint | opensea-get.sh <path> [query] |
| Any POST endpoint | opensea-post.sh <path> <json_body> |
Find the NFT and check its listing:
./scripts/opensea-best-listing.sh cool-cats-nft 1234
Get the order hash from the response, then get fulfillment data:
./scripts/opensea-fulfill-listing.sh ethereum 0x_order_hash 0x_your_wallet
The response contains transaction data to execute on-chain
Check offers on your NFT:
./scripts/opensea-best-offer.sh cool-cats-nft 1234
Get fulfillment data for the offer:
./scripts/opensea-fulfill-offer.sh ethereum 0x_offer_hash 0x_your_wallet 0x_nft_contract 1234
Execute the returned transaction data
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.
File v1.0.1:_meta.json
{ "ownerId": "kn7176r43k8cwrwyv9h52051z9809n51", "slug": "opensea-mcp", "version": "1.0.1", "publishedAt": 1770511559632 }
File v1.0.1:references/marketplace-api.md
This reference covers the marketplace endpoints for buying and selling NFTs on OpenSea.
OpenSea uses the Seaport protocol for all marketplace orders. The API provides endpoints to:
Important: Creating and fulfilling orders requires wallet signatures. The API returns order data that must be signed client-side before submission.
Base URL: https://api.opensea.io/api/v2
Auth: x-api-key: $OPENSEA_API_KEY
| Chain | Identifier |
|-------|------------|
| Ethereum | ethereum |
| Polygon | matic |
| Arbitrum | arbitrum |
| Optimism | optimism |
| Base | base |
| Avalanche | avalanche |
| Klaytn | klaytn |
| Zora | zora |
| Blast | blast |
| Sepolia (testnet) | sepolia |
Returns the lowest-priced active listing for an NFT.
GET /api/v2/listings/collection/{collection_slug}/nfts/{identifier}/best
Parameters:
collection_slug: Collection slug (e.g., boredapeyachtclub)identifier: NFT identifier (token ID)Example:
scripts/opensea-get.sh "/api/v2/listings/collection/boredapeyachtclub/nfts/1234/best"
Returns the highest active offer for an NFT.
GET /api/v2/offers/collection/{collection_slug}/nfts/{identifier}/best
Example:
scripts/opensea-get.sh "/api/v2/offers/collection/boredapeyachtclub/nfts/1234/best"
Returns all active listings for a collection.
GET /api/v2/listings/collection/{collection_slug}/all
Query parameters:
limit: Page size (default 50, max 100)next: Cursor for paginationExample:
scripts/opensea-listings-collection.sh boredapeyachtclub 50
Returns all active offers for a collection.
GET /api/v2/offers/collection/{collection_slug}/all
Example:
scripts/opensea-offers-collection.sh boredapeyachtclub 50
GET /api/v2/orders/{chain}/seaport/listings
Query parameters:
asset_contract_address: Contract addresstoken_ids: Comma-separated token IDslimit, next: PaginationExample:
scripts/opensea-get.sh "/api/v2/orders/ethereum/seaport/listings" "asset_contract_address=0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d&token_ids=1234"
GET /api/v2/orders/{chain}/seaport/offers
Query parameters:
asset_contract_address: Contract addresstoken_ids: Comma-separated token IDsExample:
scripts/opensea-get.sh "/api/v2/orders/ethereum/seaport/offers" "asset_contract_address=0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d&token_ids=1234"
Retrieve details of a specific order.
GET /api/v2/orders/chain/{chain}/protocol/{protocol_address}/hash/{order_hash}
Example:
scripts/opensea-get.sh "/api/v2/orders/chain/ethereum/protocol/0x00000000000000adc04c56bf30ac9d3c0aaf14dc/hash/0x..."
Creates an unsigned Seaport listing order. Returns order parameters to sign.
POST /api/v2/orders/{chain}/seaport/listings
Request body:
{
"parameters": {
"offerer": "0xYourWalletAddress",
"offer": [{
"itemType": 2,
"token": "0xContractAddress",
"identifierOrCriteria": "1234",
"startAmount": "1",
"endAmount": "1"
}],
"consideration": [{
"itemType": 0,
"token": "0x0000000000000000000000000000000000000000",
"identifierOrCriteria": "0",
"startAmount": "1000000000000000000",
"endAmount": "1000000000000000000",
"recipient": "0xYourWalletAddress"
}],
"startTime": "1704067200",
"endTime": "1735689600",
"orderType": 0,
"zone": "0x0000000000000000000000000000000000000000",
"zoneHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"salt": "random_salt_value",
"conduitKey": "0x0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000",
"totalOriginalConsiderationItems": 1
},
"signature": "0xSignedOrderSignature"
}
Item Types:
0: Native currency (ETH, MATIC, etc.)1: ERC20 token2: ERC721 NFT3: ERC1155 NFTExample (curl):
curl -X POST "https://api.opensea.io/api/v2/orders/ethereum/seaport/listings" \
-H "x-api-key: $OPENSEA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"parameters": {...}, "signature": "0x..."}'
Creates an unsigned Seaport offer order.
POST /api/v2/orders/{chain}/seaport/offers
Request body structure (similar to listings, but offer contains payment and consideration contains NFT):
{
"parameters": {
"offerer": "0xBuyerWalletAddress",
"offer": [{
"itemType": 1,
"token": "0xWETHAddress",
"identifierOrCriteria": "0",
"startAmount": "1000000000000000000",
"endAmount": "1000000000000000000"
}],
"consideration": [{
"itemType": 2,
"token": "0xNFTContractAddress",
"identifierOrCriteria": "1234",
"startAmount": "1",
"endAmount": "1",
"recipient": "0xBuyerWalletAddress"
}]
},
"signature": "0x..."
}
Accept an existing listing to purchase an NFT.
POST /api/v2/listings/fulfillment_data
Request body:
{
"listing": {
"hash": "0xOrderHash",
"chain": "ethereum",
"protocol_address": "0x00000000000000adc04c56bf30ac9d3c0aaf14dc"
},
"fulfiller": {
"address": "0xBuyerWalletAddress"
}
}
Response: Returns transaction data for the buyer to submit on-chain.
Accept an existing offer to sell your NFT.
POST /api/v2/offers/fulfillment_data
Request body:
{
"offer": {
"hash": "0xOfferOrderHash",
"chain": "ethereum",
"protocol_address": "0x00000000000000adc04c56bf30ac9d3c0aaf14dc"
},
"fulfiller": {
"address": "0xSellerWalletAddress"
},
"consideration": {
"asset_contract_address": "0xNFTContract",
"token_id": "1234"
}
}
Cancel an active listing or offer.
POST /api/v2/orders/chain/{chain}/protocol/{protocol_address}/hash/{order_hash}/cancel
Note: Cancellation requires an on-chain transaction. The API returns the transaction data to execute.
opensea-nft.sh to get NFT detailsopensea-get.sh to get best listing/api/v2/listings/fulfillment_data# Step 1: Get NFT info
./scripts/opensea-nft.sh ethereum 0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d 1234
# Step 2: Get best listing
./scripts/opensea-get.sh "/api/v2/listings/collection/boredapeyachtclub/nfts/1234/best"
# Step 3: Request fulfillment (requires POST - see marketplace scripts)
./scripts/opensea-fulfill-listing.sh ethereum 0x_order_hash 0x_your_wallet
/api/v2/orders/{chain}/seaport/listings/api/v2/listings/collection/{slug}/all/api/v2/orders/{chain}/seaport/offersopensea-offers-collection.sh/api/v2/offers/fulfillment_data| Code | Meaning | |------|---------| | 400 | Bad request - invalid parameters | | 401 | Unauthorized - missing or invalid API key | | 404 | Not found - order/NFT doesn't exist | | 429 | Rate limited - too many requests | | 500 | Server error |
| Chain | Seaport 1.6 Address |
|-------|---------------------|
| All chains | 0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC |
File v1.0.1:references/rest-api.md
Base URL: https://api.opensea.io
Auth header: x-api-key: $OPENSEA_API_KEY
List endpoints support cursor-based pagination:
limit: Page size (default varies, max 100)next: Cursor token from previous response| Chain | Identifier |
|-------|------------|
| Ethereum | ethereum |
| Polygon | matic |
| Arbitrum | arbitrum |
| Optimism | optimism |
| Base | base |
| Avalanche | avalanche |
| Klaytn | klaytn |
| Zora | zora |
| Blast | blast |
| Sepolia (testnet) | sepolia |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v2/collections/{slug} | GET | Single collection details |
| /api/v2/collections/{slug}/stats | GET | Collection statistics (floor, volume) |
| /api/v2/collections | GET | List multiple collections |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v2/chain/{chain}/contract/{contract}/nfts/{token_id} | GET | Single NFT details |
| /api/v2/collection/{slug}/nfts | GET | NFTs by collection |
| /api/v2/chain/{chain}/account/{address}/nfts | GET | NFTs by wallet |
| /api/v2/chain/{chain}/contract/{contract}/nfts | GET | NFTs by contract |
| /api/v2/nft/{contract}/{token_id}/refresh | POST | Refresh NFT metadata |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v2/listings/collection/{slug}/all | GET | All listings for collection |
| /api/v2/listings/collection/{slug}/nfts/{token_id}/best | GET | Best listing for NFT |
| /api/v2/orders/{chain}/seaport/listings | GET | Listings by contract/token |
| /api/v2/orders/{chain}/seaport/listings | POST | Create new listing |
| /api/v2/listings/fulfillment_data | POST | Get buy transaction data |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v2/offers/collection/{slug}/all | GET | All offers for collection |
| /api/v2/offers/collection/{slug}/nfts/{token_id}/best | GET | Best offer for NFT |
| /api/v2/orders/{chain}/seaport/offers | GET | Offers by contract/token |
| /api/v2/orders/{chain}/seaport/offers | POST | Create new offer |
| /api/v2/offers/fulfillment_data | POST | Get sell transaction data |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v2/orders/chain/{chain}/protocol/{protocol}/{hash} | GET | Get order by hash |
| /api/v2/orders/chain/{chain}/protocol/{protocol}/{hash}/cancel | POST | Cancel order |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v2/events/collection/{slug} | GET | Events by collection |
| /api/v2/events/chain/{chain}/contract/{contract}/nfts/{token_id} | GET | Events by NFT |
| /api/v2/events/chain/{chain}/account/{address} | GET | Events by account |
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v2/accounts/{address} | GET | Account profile |
For the events endpoint, filter with event_type:
sale - NFT soldtransfer - NFT transferredlisting - New listing createdoffer - New offer madecancel - Order cancelledredemption - NFT redeemed| Code | Meaning | |------|---------| | 400 | Bad request - check parameters | | 401 | Unauthorized - missing/invalid API key | | 404 | Resource not found | | 429 | Rate limited | | 500 | Server error |
jq to parse JSON responses: ./script.sh | jq '.nft.name'File v1.0.1:references/seaport.md
Seaport is the marketplace protocol used for OpenSea orders. All listings and offers on OpenSea are Seaport orders under the hood.
| Chain | Seaport 1.6 Address |
|-------|---------------------|
| All EVM chains | 0x0000000000000068F116a894984e2DB1123eB395 |
Legacy Seaport 1.4: 0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC
No SDK required! The OpenSea API returns ready-to-use calldata.
# Via script
./scripts/opensea-listings-collection.sh basenames
# Via MCP
mcporter call opensea.get_listings collection="basenames" limit=10
Note the order_hash and protocol_address from the response.
# Via script
./scripts/opensea-fulfill-listing.sh base 0xORDER_HASH 0xYOUR_WALLET
# Via curl
curl -X POST "https://api.opensea.io/api/v2/listings/fulfillment_data" \
-H "Content-Type: application/json" \
-H "x-api-key: $OPENSEA_API_KEY" \
-d '{
"listing": {
"hash": "0xORDER_HASH",
"chain": "base",
"protocol_address": "0x0000000000000068F116a894984e2DB1123eB395"
},
"fulfiller": {
"address": "0xYOUR_WALLET"
}
}'
Response contains:
fulfillment_data.transaction.to - Seaport contractfulfillment_data.transaction.value - ETH to send (wei)fulfillment_data.transaction.input_data - Encoded calldataimport { createPublicClient, createWalletClient, http } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { base } from 'viem/chains';
const account = privateKeyToAccount(PRIVATE_KEY);
const wallet = createWalletClient({ account, chain: base, transport: http() });
const pub = createPublicClient({ chain: base, transport: http() });
// From fulfillment response
const txData = response.fulfillment_data.transaction;
const hash = await wallet.sendTransaction({
to: txData.to,
data: txData.input_data.parameters ? encodeSeaportCall(txData.input_data) : txData.data,
value: BigInt(txData.value)
});
const receipt = await pub.waitForTransactionReceipt({ hash });
console.log(receipt.status === 'success' ? '✅ NFT purchased!' : '❌ Failed');
// buy-nft.mjs - Buy an NFT via OpenSea fulfillment API
import { createPublicClient, createWalletClient, http, encodeFunctionData } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { base } from 'viem/chains';
const SEAPORT_ABI = [{
name: 'fulfillBasicOrder_efficient_6GL6yc',
type: 'function',
stateMutability: 'payable',
inputs: [{
name: 'parameters',
type: 'tuple',
components: [
{ name: 'considerationToken', type: 'address' },
{ name: 'considerationIdentifier', type: 'uint256' },
{ name: 'considerationAmount', type: 'uint256' },
{ name: 'offerer', type: 'address' },
{ name: 'zone', type: 'address' },
{ name: 'offerToken', type: 'address' },
{ name: 'offerIdentifier', type: 'uint256' },
{ name: 'offerAmount', type: 'uint256' },
{ name: 'basicOrderType', type: 'uint8' },
{ name: 'startTime', type: 'uint256' },
{ name: 'endTime', type: 'uint256' },
{ name: 'zoneHash', type: 'bytes32' },
{ name: 'salt', type: 'uint256' },
{ name: 'offererConduitKey', type: 'bytes32' },
{ name: 'fulfillerConduitKey', type: 'bytes32' },
{ name: 'totalOriginalAdditionalRecipients', type: 'uint256' },
{ name: 'additionalRecipients', type: 'tuple[]', components: [
{ name: 'amount', type: 'uint256' },
{ name: 'recipient', type: 'address' }
]},
{ name: 'signature', type: 'bytes' }
]
}],
outputs: [{ name: 'fulfilled', type: 'bool' }]
}];
async function buyNFT(orderHash, chain, buyerAddress, privateKey) {
// 1. Get fulfillment data
const res = await fetch('https://api.opensea.io/api/v2/listings/fulfillment_data', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': process.env.OPENSEA_API_KEY
},
body: JSON.stringify({
listing: { hash: orderHash, chain, protocol_address: '0x0000000000000068F116a894984e2DB1123eB395' },
fulfiller: { address: buyerAddress }
})
});
const { fulfillment_data } = await res.json();
const tx = fulfillment_data.transaction;
const params = tx.input_data.parameters;
// 2. Setup wallet
const account = privateKeyToAccount(privateKey);
const wallet = createWalletClient({ account, chain: base, transport: http() });
const pub = createPublicClient({ chain: base, transport: http() });
// 3. Encode and send
const orderParams = {
...params,
considerationIdentifier: BigInt(params.considerationIdentifier),
considerationAmount: BigInt(params.considerationAmount),
offerIdentifier: BigInt(params.offerIdentifier),
offerAmount: BigInt(params.offerAmount),
startTime: BigInt(params.startTime),
endTime: BigInt(params.endTime),
salt: BigInt(params.salt),
totalOriginalAdditionalRecipients: BigInt(params.totalOriginalAdditionalRecipients),
additionalRecipients: params.additionalRecipients.map(r => ({
amount: BigInt(r.amount),
recipient: r.recipient
}))
};
const data = encodeFunctionData({
abi: SEAPORT_ABI,
functionName: 'fulfillBasicOrder_efficient_6GL6yc',
args: [orderParams]
});
const hash = await wallet.sendTransaction({
to: tx.to,
data,
value: BigInt(tx.value)
});
console.log(`TX: https://basescan.org/tx/${hash}`);
const receipt = await pub.waitForTransactionReceipt({ hash });
return receipt.status === 'success';
}
Similar workflow using /api/v2/offers/fulfillment_data:
./scripts/opensea-fulfill-offer.sh base 0xOFFER_HASH 0xYOUR_WALLET 0xNFT_CONTRACT 1234
Creating listings requires signing a Seaport order:
See references/marketplace-api.md for full order structure.
fulfillBasicOrder_efficient_6GL6yc functionfulfillAvailableAdvancedOrders for partial fillsFile v1.0.1:references/stream-api.md
wss://stream.openseabeta.com/socket/websocket?token=YOUR_API_KEY
Send a Phoenix join message:
{"topic":"collection:your-collection-slug","event":"phx_join","payload":{},"ref":1}
Use "collection:*" to subscribe globally.
Send every ~30 seconds:
{"topic":"phoenix","event":"heartbeat","payload":{},"ref":0}
File v1.0.1:references/token-swaps.md
OpenSea MCP provides token swap functionality through integrated DEX aggregation. This allows swapping ERC20 tokens and native currencies across supported chains.
The get_token_swap_quote tool returns:
ethereum)base)matic)arbitrum)optimism)mcporter call opensea.get_token_swap_quote --args '{
"fromContractAddress": "0x0000000000000000000000000000000000000000",
"fromChain": "base",
"toContractAddress": "0xb695559b26bb2c9703ef1935c37aeae9526bab07",
"toChain": "base",
"fromQuantity": "0.02",
"address": "0xYourWalletAddress"
}'
| Parameter | Required | Description |
|-----------|----------|-------------|
| fromContractAddress | Yes | Token to swap FROM. Use 0x0000...0000 for native ETH |
| toContractAddress | Yes | Token to swap TO |
| fromChain | Yes | Source chain identifier |
| toChain | Yes | Destination chain identifier |
| fromQuantity | Yes | Amount in human units (e.g., "0.02" for 0.02 ETH) |
| address | Yes | Your wallet address |
| recipient | No | Recipient address (defaults to sender) |
| slippageTolerance | No | Slippage as decimal (e.g., 0.005 for 0.5%) |
{
"swapQuote": {
"swapRoutes": [{
"toAsset": { "symbol": "MOLT", "usdPrice": "0.00045" },
"fromAsset": { "symbol": "ETH", "usdPrice": "2370" },
"costs": [
{ "costType": "GAS", "cost": { "usd": 0.01 } },
{ "costType": "MARKETPLACE", "cost": { "usd": 0.40 } }
],
"swapImpact": { "percent": "3.5" }
}],
"totalPrice": { "usd": 47.40 }
},
"swap": {
"actions": [{
"transactionSubmissionData": {
"to": "0xSwapRouterContract",
"data": "0x...",
"value": "20000000000000000",
"chain": { "networkId": 8453, "identifier": "base" }
}
}]
}
}
import { createPublicClient, createWalletClient, http } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { base } from 'viem/chains';
// Get quote first (via mcporter or direct API call)
const quote = await getSwapQuote(...);
const txData = quote.swap.actions[0].transactionSubmissionData;
// Setup wallet
const account = privateKeyToAccount(PRIVATE_KEY);
const wallet = createWalletClient({ account, chain: base, transport: http() });
const pub = createPublicClient({ chain: base, transport: http() });
// Execute swap
const hash = await wallet.sendTransaction({
to: txData.to,
data: txData.data,
value: BigInt(txData.value)
});
console.log(`TX: https://basescan.org/tx/${hash}`);
// Wait for confirmation
const receipt = await pub.waitForTransactionReceipt({ hash });
console.log(receipt.status === 'success' ? '✅ Swap complete!' : '❌ Failed');
./scripts/opensea-swap.sh <to_token_address> <amount_eth> <your_wallet> <private_key>
# Example: Swap 0.02 ETH to MOLT
./scripts/opensea-swap.sh 0xb695559b26bb2c9703ef1935c37aeae9526bab07 0.02 0xYourWallet 0xYourPrivateKey
mcporter call opensea.search_tokens --args '{"query": "MOLT", "chain": "base", "limit": 5}'
mcporter call opensea.get_trending_tokens --args '{"chains": ["base"], "limit": 10}'
mcporter call opensea.get_top_tokens --args '{"chains": ["base"], "limit": 10}'
mcporter call opensea.get_token_balances --args '{
"address": "0xYourWallet",
"chains": ["base", "ethereum"]
}'
| Token | Address |
|-------|---------|
| WETH | 0x4200000000000000000000000000000000000006 |
| USDC | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
| MOLT | 0xb695559b26bb2c9703ef1935c37aeae9526bab07 |
| CLAWD | 0x9f86db9fc6f7c9408e8fda3ff8ce4e78ac7a6b07 |
| 4CLAW | 0x3b94a3fa7f33930cf9fdc5f36cb251533c947b07 |
0x0000...0000) when swapping from ETHMachine endpoints, contract coverage, trust signals, runtime metrics, benchmarks, and guardrails for agent-to-agent use.
Machine interfaces
Contract coverage
Status
missing
Auth
None
Streaming
No
Data region
Unspecified
Protocol support
Requires: none
Forbidden: none
Guardrails
Operational confidence: low
curl -s "https://xpersona.co/api/v1/agents/clawhub-dfinzer-opensea-mcp/snapshot"
curl -s "https://xpersona.co/api/v1/agents/clawhub-dfinzer-opensea-mcp/contract"
curl -s "https://xpersona.co/api/v1/agents/clawhub-dfinzer-opensea-mcp/trust"
Operational fit
Trust signals
Handshake
UNKNOWN
Confidence
unknown
Attempts 30d
unknown
Fallback rate
unknown
Runtime metrics
Observed P50
unknown
Observed P95
unknown
Rate limit
unknown
Estimated cost
unknown
Do not use if
Raw contract, invocation, trust, capability, facts, and change-event payloads for machine-side inspection.
Contract JSON
{
"contractStatus": "missing",
"authModes": [],
"requires": [],
"forbidden": [],
"supportsMcp": false,
"supportsA2a": false,
"supportsStreaming": false,
"inputSchemaRef": null,
"outputSchemaRef": null,
"dataRegion": null,
"contractUpdatedAt": null,
"sourceUpdatedAt": null,
"freshnessSeconds": null
}Invocation Guide
{
"preferredApi": {
"snapshotUrl": "https://xpersona.co/api/v1/agents/clawhub-dfinzer-opensea-mcp/snapshot",
"contractUrl": "https://xpersona.co/api/v1/agents/clawhub-dfinzer-opensea-mcp/contract",
"trustUrl": "https://xpersona.co/api/v1/agents/clawhub-dfinzer-opensea-mcp/trust"
},
"curlExamples": [
"curl -s \"https://xpersona.co/api/v1/agents/clawhub-dfinzer-opensea-mcp/snapshot\"",
"curl -s \"https://xpersona.co/api/v1/agents/clawhub-dfinzer-opensea-mcp/contract\"",
"curl -s \"https://xpersona.co/api/v1/agents/clawhub-dfinzer-opensea-mcp/trust\""
],
"jsonRequestTemplate": {
"query": "summarize this repo",
"constraints": {
"maxLatencyMs": 2000,
"protocolPreference": [
"OPENCLEW"
]
}
},
"jsonResponseTemplate": {
"ok": true,
"result": {
"summary": "...",
"confidence": 0.9
},
"meta": {
"source": "CLAWHUB",
"generatedAt": "2026-04-17T06:17:38.253Z"
}
},
"retryPolicy": {
"maxAttempts": 3,
"backoffMs": [
500,
1500,
3500
],
"retryableConditions": [
"HTTP_429",
"HTTP_503",
"NETWORK_TIMEOUT"
]
}
}Trust JSON
{
"status": "unavailable",
"handshakeStatus": "UNKNOWN",
"verificationFreshnessHours": null,
"reputationScore": null,
"p95LatencyMs": null,
"successRate30d": null,
"fallbackRate": null,
"attempts30d": null,
"trustUpdatedAt": null,
"trustConfidence": "unknown",
"sourceUpdatedAt": null,
"freshnessSeconds": null
}Capability Matrix
{
"rows": [
{
"key": "OPENCLEW",
"type": "protocol",
"support": "unknown",
"confidenceSource": "profile",
"notes": "Listed on profile"
}
],
"flattenedTokens": "protocol:OPENCLEW|unknown|profile"
}Facts JSON
[
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/dfinzer/opensea-mcp",
"sourceUrl": "https://clawhub.ai/dfinzer/opensea-mcp",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-04-15T00:45:39.800Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://xpersona.co/api/v1/agents/clawhub-dfinzer-opensea-mcp/contract",
"sourceUrl": "https://xpersona.co/api/v1/agents/clawhub-dfinzer-opensea-mcp/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-04-15T00:45:39.800Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.5K downloads",
"href": "https://clawhub.ai/dfinzer/opensea-mcp",
"sourceUrl": "https://clawhub.ai/dfinzer/opensea-mcp",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-04-15T00:45:39.800Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.0.2",
"href": "https://clawhub.ai/dfinzer/opensea-mcp",
"sourceUrl": "https://clawhub.ai/dfinzer/opensea-mcp",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-02-08T01:16:59.679Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://xpersona.co/api/v1/agents/clawhub-dfinzer-opensea-mcp/trust",
"sourceUrl": "https://xpersona.co/api/v1/agents/clawhub-dfinzer-opensea-mcp/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
]Change Events JSON
[
{
"eventType": "release",
"title": "Release 1.0.2",
"description": "Version 1.0.2 - Documentation updates only; no file or code changes detected. - No impact to functionality or interfaces.",
"href": "https://clawhub.ai/dfinzer/opensea-mcp",
"sourceUrl": "https://clawhub.ai/dfinzer/opensea-mcp",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-02-08T01:16:59.679Z",
"isPublic": true
}
]Sponsored
Ads related to OpenSea and adjacent AI workflows.