Alpaca Trading & Market Data API
by Alpaca
Commission-free stock and crypto trading API. Real-time market data, trade execution, portfolio management for US equities and cryptocurrencies.
by CoinMarketCap
Real-time cryptocurrency market data including prices, market cap, volume, and global metrics for 10,000+ coins. Endpoints: listings, quotes, OHLCV, exchanges, and global market stats.
Install 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.
Access data directly via HTTP using the x402 payment protocol.
HTTP 402 with payment requirements (amount, wallet, EIP-712 data)X-PAYMENT header containing the signaturecurl -X POST https://x402.serendb.com/api/proxy \
-H "Content-Type: application/json" \
-d '{
"publisherId": "46116003-cdb8-414d-bdca-c80ec7ff95b5",
"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 '{ ... }'Copy these prompts to use with your AI assistant. Make sure you have the x402 MCP server configured.
Using the x402 MCP server, query CoinMarketCap to show the top 20 cryptocurrencies ranked by market cap. For each, display: rank, name, symbol, current price (USD), market cap, and 24-hour price change. Which coins dominate the crypto market?
Using the x402 MCP server, analyze market cap concentration in CoinMarketCap: show the top 10 coins and their market cap dominance percentages. Calculate the total dominance of these top 10. How concentrated is the crypto market?
Using the x402 MCP server, identify high-volume trading opportunities in CoinMarketCap: find the top 15 coins by 24-hour trading volume. For each show: name, volume, market cap, and volume-to-market-cap ratio. Which coins have the most liquidity relative to their size?
Using the x402 MCP server, compare coin categories in CoinMarketCap: analyze stablecoins (USDT, USDC, DAI, BUSD) vs layer-1 blockchains (BTC, ETH, SOL, BNB, ADA) vs layer-2 solutions. Compare total market cap, number of coins, and average size per category. Where is capital concentrated?
Using the x402 MCP server, find emerging opportunities in CoinMarketCap: identify coins that appear in the top 100 but aren't in the top 50. Show their market cap, rank, 24hr change, and growth potential. Which mid-cap coins are worth watching?
Pay per API call via x402 protocol
by Alpaca
Commission-free stock and crypto trading API. Real-time market data, trade execution, portfolio management for US equities and cryptocurrencies.
by AlphaGrowth Crypto Leads
Comprehensive crypto investment intelligence: 82K+ projects, 70K+ VC investments with amounts and investors, 123K+ DAO treasury snapshots, 942K+ protocol revenue records, and 14M+ historical price data points. Tables: serendb_project, serendb_investment, serendb_daotreasury, serendb_projectrevenue, serendb_coingeckoprice. Updated daily.
by Trading Strategy
Comprehensive vault performance and yield database with 1000+ vaults across 20+ chains and dozens of digital asset management protocols. Includes returns, Sharpe, volatility, fees, and risk ratings.