Leviathan News & AI Advertising Network
by Leviathan News Advertising
About
GET /ad_test to browse placements, POST /api/v1/ad/confirm-payment/:id to submit campaigns, GET /api/v1/ad/analytics/:id for ad performance metrics
Categories
Access Data
For AI Agents
MCP ServerInstall the x402 MCP server to let your AI agent access this data with automatic USDC payments on Base.
Required: You need a SerenDB database to store query results.
Get your connection string from the SerenDB Console under your database settings.
Add to claude_desktop_config.json:
{
"mcpServers": {
"x402": {
"command": "npx",
"args": ["@serendb/x402-mcp-server"],
"env": {
"X402_GATEWAY_URL": "https://x402.serendb.com",
"WALLET_PRIVATE_KEY": "0x...",
"BASE_RPC_URL": "https://mainnet.base.org",
"SERENDB_CONNECTION_STRING": "postgresql://..."
}
}
}
}Replace 0x... with your wallet private key and postgresql://... with your SerenDB connection string.
claude mcp add x402 \ -e X402_GATEWAY_URL=https://x402.serendb.com \ -e WALLET_PRIVATE_KEY=0x... \ -e BASE_RPC_URL=https://mainnet.base.org \ -e "SERENDB_CONNECTION_STRING=postgresql://..." \ -- npx -y @serendb/x402-mcp-server
claude mcp add x402 ` -e X402_GATEWAY_URL=https://x402.serendb.com ` -e WALLET_PRIVATE_KEY=0x... ` -e BASE_RPC_URL=https://mainnet.base.org ` -e "SERENDB_CONNECTION_STRING=postgresql://..." ` '--' npx -y @serendb/x402-mcp-server
Replace 0x... with your wallet private key and postgresql://... with your SerenDB connection string.
gemini mcp add x402 \ -e X402_GATEWAY_URL=https://x402.serendb.com \ -e WALLET_PRIVATE_KEY=0x... \ -e BASE_RPC_URL=https://mainnet.base.org \ -e "SERENDB_CONNECTION_STRING=postgresql://..." \ -- npx -y @serendb/x402-mcp-server
Replace 0x... with your wallet private key and postgresql://... with your SerenDB connection string.
codex mcp add x402 \ --env X402_GATEWAY_URL=https://x402.serendb.com \ --env WALLET_PRIVATE_KEY=0x... \ --env BASE_RPC_URL=https://mainnet.base.org \ --env "SERENDB_CONNECTION_STRING=postgresql://..." \ -- npx -y @serendb/x402-mcp-server
Important: Cursor has a 60s timeout. Pre-install globally first: npm install -g @serendb/x402-mcp-server
First, install globally to avoid timeout issues:
npm install -g @serendb/x402-mcp-server
Then add to ~/.cursor/mcp.json:
{
"mcpServers": {
"x402": {
"command": "x402-mcp-server",
"args": [],
"env": {
"X402_GATEWAY_URL": "https://x402.serendb.com",
"WALLET_PRIVATE_KEY": "0x...",
"BASE_RPC_URL": "https://mainnet.base.org",
"SERENDB_CONNECTION_STRING": "postgresql://..."
}
}
}
}Also works with Windsurf, Zed, and other MCP-compatible clients. See the full setup guide for details.
For Developers
Direct HTTP APIAccess data directly via HTTP using the x402 payment protocol.
- Send your query request to the gateway
- Receive
HTTP 402with payment requirements (amount, wallet, EIP-712 data) - Sign the payment authorization with your wallet
- Retry request with
X-PAYMENTheader containing the signature - Receive your data - payment settles automatically via USDC on Base
curl -X POST https://x402.serendb.com/api/proxy \
-H "Content-Type: application/json" \
-d '{
"publisherId": "a7fa78ef-1b3b-4de2-8940-8d489b97725c",
"agentWallet": "0xYourWalletAddress",
"request": {
"method": "GET",
"path": "/endpoint"
}
}'This returns 402 Payment Required with the payment details you need to sign.
After signing the EIP-712 authorization, add the base64-encoded signature:
curl -X POST https://x402.serendb.com/api/proxy \
-H "Content-Type: application/json" \
-H "X-PAYMENT: <base64-encoded-signature>" \
-d '{ ... }'Example Prompts
Copy these prompts to use with your AI assistant. Make sure you have the x402 MCP server configured.
Using the x402 MCP server, get current Leviathan pricing and platform performance metrics - help me understand if it's worth buying an ad spot
Using the x402 MCP server, fetch Leviathan's performance data and calculate: cost per 1000 impressions (CPM), cost per click (CPC), and what revenue per conversion I'd need to break even at $500/spot
Using the x402 MCP server, get Leviathan's latest metrics and create a comparison: if I buy one $500 ad spot, how many impressions and clicks should I expect based on current network CTR and engagement rates?
Using the x402 MCP server, fetch current platform analytics and assess data reliability: what does the confidence interval tell us about metric stability? Is this a good time to advertise?
Using the x402 MCP server, analyze whether Leviathan is currently a good advertising opportunity - use pricing, CTR, engagement data, and competitive CPC to make a recommendation for an ad buyer
Pricing
Pay per API call via x402 protocol