Provides access to Base blockchain data through Coinbase Developer Platform's SQL API, enabling agents to query blocks, events, transfers, transactions, and encoded logs. Includes common Base contract addresses, SQL query templates for DeFi and NFT analytics, ENS/Basename resolution, and direct SQL execution against realtime Base chain data.
Can be deployed to Vercel to provide HTTP endpoint access for MCP server functionality, enabling integration with ChatGPT and other clients that require URL-based MCP servers.
🟦 BaseQL MCP Server 🟦

all Base chain data at your agent's fingertips 🔥
about
the SQL API from Coinbase Developer Platform (CDP) indexes all Base chain data across blocks, events, tranfers, transactions, and encoded logs, and lets you (or your agent) submit SQL queries against that rich dataset
this is incredibly powerful because you don't need blockchain data infrastructure like indexers anymore; you simply call SQL API and get hyper-fresh data (<500ms to tip of chain) at blazing-fast latencies (<200ms)
BUT agents need some help to use this powerful tool
the BaseQL MCP Server gives an agent all the info and tools it needs to call SQL API independently, enabling the user to fetch relevant Base chain data using natural language 🎉
what does BaseQL MCP Server include?
agents using BaseQL get:
common Base contract addresses (USDC, WETH, AERO, other common ERC20s, popular NFTs, etc.)
accurate SQL API schema context (correct column names, common mistakes)
pre-built query templates (whale tracking, NFT analytics, gas analysis)
ENS/Basename resolution (forward and reverse lookup)
direct SQL execution via CDP SQL API
built-in best practices (time filtering, performance optimization)
how agents use this
here's an example of what this unlocks for agents:
quickstart
installation
use with Claude Desktop
edit your Claude Desktop config:
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
restart Claude Desktop and ask: "what's the USDC contract address on Base?"
use with ChatGPT
note: with ChatGPT you need to input your MCP Server's URL, so you'll need to deploy it first (e.g. to Vercel)
enable developer mode in ChatGPT:
open ChatGPT settings → apps & connectors → advanced settings
enable developer mode (you should also have this enabled in your soul)
add MCP server:
now go back to apps & connectors
click create top-right
fill in the MCP server details:
name: BaseQL
URL: your deployed URL e.g.
https://your-baseql-mcp.vercel.appdescription: Base data powerrrrr
click save
test:
start new chat in ChatGPT
ask something like: "how many USDC transfers happened on Base in the last hour?"
chatGPT uses your BaseQL MCP to fetch the data & respond
local development
test via HTTP:
tools included
1. get_schema
get complete Base SQL table schemas with correct column names and best practices
example:
returns:
all table schemas (base.transfers, base.transactions, base.events, base.blocks)
critical rules (always filter by time!)
common mistakes (column name corrections)
2. get_contract
get Base contract addresses by symbol
example:
supports:
46 tokens (USDC, WETH, AERO, DEGEN, TYBG, JESSE, etc.)
8 NFT collections (Basenames, Based Fellas, Base Punks, Base Gods, etc.)
Infrastructure (Bridges, EAS, Coinbase Verifications)
Base mainnet only
3. get_query_template
get pre-built SQL query templates
example:
available templates:
whale_transfers- large token movementstrending_tokens- tokens with sudden activitywallet_activity- complete wallet historygas_analysis- gas spending patternsnft_mints- NFT minting activitycoinbase_verified_users- addresses associated with Coinbase accounts (i.e. that have KYC'd at some point)basename_registrations- new .base.eth namesand a bunch more
4. run_sql_query
execute actual SQL queries against Base blockchain
example:
returns: realtime Base data (<500ms from tip of chain)
5. resolve_name
convert ENS/Basename to address
example:
6. get_name_for_address
reverse ENS lookup (address → name)
7. get_names_for_addresses
batch reverse lookup for multiple addresses
use cases for BaseQL MCP Server
DeFi analytics
NFT tracking
market intel
architecture
BaseQL provides:
context (contracts, schemas, templates)
execution (runs queries via CDP)
intelligence (best practices, optimization)
configuration
environment variables
get CDP API credentials from CDP Portal
modes
stdio mode (for Claude Desktop):
uncomment stdio transport in server.ts
uses stdin/stdout
HTTP mode (for testing/custom agents):
comment out stdio transport
runs on PORT (default 4000)
why BaseQL MCP Server is dope
accurate schema
learned the hard way that Base SQL tables have inconsistent column names:
base.transfers→token_address,block_timestampbase.events→address,block_timestampbase.transactions→from_address,timestamp(NOT block_timestamp)
BaseQL documents all these gotchas
guardrails
queries without time filters can scan 100GB+ and fail; BaseQL teaches agents to always filter by time first
curated context
repo of common contract addresses
realtime data
CDP SQL API is < 500ms from tip of chain, so BaseQL queries get near-instant Base data
examples
find USDC whales
track Basename registrations
license
MIT
links
This server cannot be installed