This is a Next.js project bootstrapped with create-onchain.
Basedrop exposes a Model Context Protocol server at /api/mcp so AI agents can interact with on-chain drop data without writing smart contract code.
POST https://basedrop-chi.vercel.app/api/mcp
| Tool | Description |
|---|---|
list_drops |
List up to 20 most recent drops (Base Mainnet, live data) |
get_drop |
Get details for a specific drop by dropId |
get_analytics |
Platform stats: total drops, claims, USDC distributed |
get_leaderboard |
Top 10 creators and claimers by USDC volume |
Add to your MCP client config:
{
"mcpServers": {
"basedrop": {
"transport": "http",
"url": "https://basedrop-chi.vercel.app/api/mcp"
}
}
}Or call directly:
curl -X POST https://basedrop-chi.vercel.app/api/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
curl -X POST https://basedrop-chi.vercel.app/api/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"list_drops","arguments":{}}}'Agent discovery: /.well-known/agent-card.json
Basedrop implements the x402 protocol to enable AI agents and autonomous clients to pay for API access using USDC — no API keys, no subscriptions.
| Route | Price | Network | Description |
|---|---|---|---|
GET /api/analytics |
$0.005 USDC | Base Sepolia | Analytics data |
Note: The public
x402.org/facilitatorcurrently supports Base Sepolia (eip155:84532). Mainnet support requires a self-hosted facilitator.
Any x402-compatible client can call these endpoints autonomously. The server returns HTTP 402 Payment Required with the payment details; the client pays on-chain, then retries with the payment header.
import { wrapFetch } from "@x402/fetch";
const fetch402 = wrapFetch(fetch, walletClient);
const data = await fetch402("https://basedrop-chi.vercel.app/api/analytics");Payment is settled on Base Sepolia using the exact EVM scheme with the x402.org facilitator.
First, install dependencies:
npm installNext, run the development server:
npm run devOpen http://localhost:3000 with your browser to see the result.
To learn more about OnchainKit, see our documentation.
To learn more about Next.js, see the Next.js documentation.
// deploy trigger 2 Tem 2026 Per +03 14:38:46