Skip to main content

MCP Server

The Surf MCP server gives any MCP-compatible AI client (Claude Desktop, Cursor, Windsurf, etc.) direct access to crypto data. It dynamically generates tools from the OpenAPI spec — no code to write, no endpoints to memorize.

Quick Start

Add to your MCP client config:
{
  "mcpServers": {
    "surf": {
      "command": "npx",
      "args": ["-y", "@surf-ai/surf-mcp"],
      "env": {
        "SURF_API_KEY": "your-api-key"
      }
    }
  }
}
Or with Bun (faster startup):
{
  "mcpServers": {
    "surf": {
      "command": "bunx",
      "args": ["@surf-ai/surf-mcp"],
      "env": {
        "SURF_API_KEY": "your-api-key"
      }
    }
  }
}

Prerequisites

Config File Locations

ClientPath
Claude Code.mcp.json in project root or ~/.claude.json
Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
CursorMCP settings in the IDE

Tools

The server exposes 12 tools, one per API domain:
ToolCommandsDescription
surf_marketprice, ranking, etf, futures, options, fear-greed, liquidation-*, onchain-indicator, price-indicatorMarket overview, rankings, indicators, ETF flows
surf_exchangedepth, klines, funding-history, perp, price, markets, long-short-ratioLive exchange data from Binance, OKX, Bybit, etc.
surf_walletdetail, transfers, history, net-worth, protocols, labels-batchWallet balances, transfers, DeFi positions
surf_tokenholders, dex-trades, transfers, tokenomicsToken holder analysis, DEX trades, unlocks
surf_socialdetail, user, user-posts, tweets, mindshare, ranking, smart-followers-historyX (Twitter) social signals and sentiment
surf_projectdetail, defi-metrics, defi-rankingProject profiles, DeFi TVL/fees/revenue
surf_onchainsql, tx, gas-price, schema, bridge-ranking, yield-rankingOn-chain SQL queries, tx lookup, gas prices
surf_searchproject, wallet, news, web, fund, polymarket, kalshi, airdropUnified search across all data types
surf_prediction_marketkalshi-*, polymarket-*, category-metricsPolymarket and Kalshi prediction markets
surf_funddetail, portfolio, rankingCrypto VC fund profiles and portfolios
surf_newsfeed, detailCrypto news from major outlets
surf_webfetchFetch any URL as clean markdown

Usage Examples

Once configured, your AI assistant can use the tools directly:
"What's the BTC price?"        → surf_market({ command: "price", params: { symbol: "BTC" } })
"Check vitalik's wallet"       → surf_wallet({ command: "detail", params: { address: "vitalik.eth" } })
"Search for DeFi projects"     → surf_search({ command: "project", params: { q: "defi lending" } })
"Run an on-chain SQL query"    → surf_onchain({ command: "sql", params: { sql: "SELECT ..." } })
"ETH social sentiment"         → surf_social({ command: "detail", params: { q: "ethereum" } })

How It Works

On startup, the server:
  1. Fetches the OpenAPI spec from https://api.ask.surf/gateway/openapi.json (cached for 24h)
  2. Groups all operations by their API tag
  3. Registers one MCP tool per tag with auto-generated descriptions and command enums
  4. Routes tool calls through @surf-ai/sdk for HTTP transport and auth
The server automatically picks up new API endpoints when the spec is updated — just restart.

Surf Skill vs MCP Server

Surf SkillMCP Server
Installnpx skills add asksurf-ai/surf-skillsJSON config in MCP settings
Works withClaude Code, CodexClaude Desktop, Cursor, Windsurf, any MCP client
AuthSURF_API_KEY env varSURF_API_KEY env var
How it worksTeaches agent to use CLIExposes tools via MCP protocol
Best forCoding agentsGeneral-purpose AI assistants

Resources