Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Surf Server

БесплатноНе проверен

Enables access to 86 crypto data endpoints from the Surf API, including market data, wallets, social sentiment, on-chain queries, and more, through dynamically

GitHubEmbed

Описание

Enables access to 86 crypto data endpoints from the Surf API, including market data, wallets, social sentiment, on-chain queries, and more, through dynamically generated MCP tools.

README

MCP server for the Surf crypto data API. Dynamically generates tools from the OpenAPI spec across market data, wallets, social, on-chain queries, and more. It supports stdio for local clients and Streamable HTTP for hosted ChatGPT/Codex integrations.

Quick start

Add to your MCP client config — no clone or install needed:

{
  "mcpServers": {
    "surf": {
      "type": "http",
      "url": "https://mcp.asksurf.ai/mcp"
    }
  }
}

To run the stdio package locally instead:

{
  "mcpServers": {
    "surf": {
      "command": "npx",
      "args": ["-y", "@surf-ai/surf-mcp"],
      "env": {
        "SURF_API_KEY": "your-api-key"
      }
    }
  }
}

Prerequisites

  • Node.js 20+ or Bun
  • Optional: a Surf API key (get one here) for account credits and higher limits. Without a key, Surf's anonymous per-IP allowance applies.

Config file locations

  • Claude Code: .mcp.json in project root or ~/.claude.json
  • Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
  • Cursor: MCP settings in the IDE

Claude Code plugin

This repository is also a Claude Code marketplace. Install the Surf plugin with:

claude plugin marketplace add asksurf-ai/surf-mcp
claude plugin install surf@surf

The plugin connects to the hosted MCP endpoint. Anonymous usage is limited by Surf's per-IP allowance; ChatGPT review should link the dedicated review account through Surf OAuth so calls use that account's quota.

ChatGPT and Codex plugin

The repository contains a Codex/ChatGPT plugin package under plugins/surf, a Claude package under claude-plugin, and repo marketplaces for both hosts. The two thin package directories are separate because the current hosts validate different .mcp.json root shapes; both connect to the hosted MCP endpoint. Codex can add its marketplace directly:

codex plugin marketplace add asksurf-ai/surf-mcp

Register https://mcp.asksurf.ai/mcp/chatgpt in ChatGPT Plugins, then authorize the dedicated review account through OAuth during connection. This endpoint is OAuth-only; /mcp remains the anonymous/API-key endpoint. OpenAI review requires reviewer credentials that work without email codes, SMS codes, magic links, or additional MFA. Keep the account address and private sign-in details in the dashboard's Review details, never in this repository. See docs/chatgpt-plugin-submission.md for the submission checklist and live preflight.

Streamable HTTP deployment

Run the hosted transport locally:

bun run start:http

The server exposes:

  • POST /mcp — stateless MCP Streamable HTTP endpoint
  • POST /mcp/chatgpt — the same endpoint with the ChatGPT tool profile, which leaves out third-party news, web, signal, and X content tools (see src/profiles.ts)
  • GET /healthz — deployment health check
  • GET /.well-known/oauth-protected-resource — OAuth resource metadata (RFC 9728); returns 404 until SURF_OAUTH_AUTHORIZATION_SERVER is configured
  • GET /.well-known/oauth-authorization-server — the authorization server's RFC 8414 metadata, relayed from the issuer
  • GET /.well-known/openid-configuration — the authorization server's OpenID Connect discovery document, relayed from the issuer; hosts that enforce workspace domain restrictions (ChatGPT Enterprise/Team) read the userinfo_endpoint and the openid/email scopes from here

Authentication

Each HTTP request's Authorization header is forwarded verbatim to the Surf data API, so callers presenting their own Surf API key (or a Surf-issued OAuth token, once available) are billed and rate-limited on their own account. Resolution order per request:

  1. The incoming Authorization header, forwarded as-is
  2. The deployment's SURF_API_KEY service key (Bearer scheme)
  3. Anonymous — the Surf API's per-IP allowance applies

Environment variables for OAuth discovery and login:

Variable Purpose
SURF_OAUTH_AUTHORIZATION_SERVER Issuer URL of the Surf OAuth authorization server (e.g. https://api.asksurf.ai/muninn/v2/oauth), advertised verbatim as the protected resource's authorization_servers entry — it must equal the issuer in the server's discovery document, since OpenID Connect clients compare the two by exact string match. Unset (default) keeps the metadata endpoints dark.
SURF_MCP_RESOURCE_URL Public URL of this MCP deployment (default https://mcp.asksurf.ai).
SURF_MCP_REQUIRE_AUTH 1/true makes /mcp answer credential-less requests with 401 + WWW-Authenticate, which is what makes MCP clients open the OAuth login in the user's browser. Requires the discovery endpoint to be live.

Deployment modes:

SURF_OAUTH_AUTHORIZATION_SERVER SURF_MCP_REQUIRE_AUTH Behavior
unset unset Anonymous allowance + API key passthrough (current beta)
set unset OAuth discoverable for clients that look for it; anonymous still allowed
set set Credential-less requests are challenged into the OAuth login flow

Scopes: data:read is the base scope of every grant. Requesting openid additionally returns an ID token and enables the userinfo endpoint; email releases the account's verified email through both. When registering the server with a host that supports domain restrictions, request openid email (the data scope is implied).

Build and run the included container:

docker build -t surf-mcp .
docker run --rm -p 3000:3000 -e SURF_API_KEY=your-service-api-key surf-mcp

The limited beta is live at https://mcp.asksurf.ai/mcp. For higher capacity, keep a dedicated, rate-limited SURF_API_KEY in the host's secret manager; never put it in plugin manifests or client-visible responses.

The included Vercel Functions adapter exposes the same endpoints from api/mcp.ts, api/mcp-chatgpt.ts, and api/healthz.ts. Deploy it to a Vercel project when a serverless beta is preferable to the container image.

Tools

The server currently exposes 15 tools, one per API domain. Each tool accepts a command and optional params; the exact commands update automatically with the Surf OpenAPI specification:

Tool Commands Description
surf_dex token-price DEX-pool-weighted token OHLCV data
surf_market price, ranking, etf, futures, options, fear-greed, liquidation-*, onchain-indicator, price-indicator Market overview, rankings, indicators, ETF flows
surf_exchange depth, klines, funding-history, perp, price, markets, long-short-ratio Live exchange data from Binance, OKX, Bybit, etc.
surf_hyperliquid leaderboard, positions, orders, fills, trades, performance Hyperliquid trader, position, order, fill, and P&L data
surf_wallet detail, transfers, history, net-worth, protocols, labels-batch Wallet balances, transfers, DeFi positions
surf_token holders, dex-trades, transfers, tokenomics Token holder analysis, DEX trades, unlocks
surf_x tweets X post and author details by post ID
surf_project detail, defi-metrics, defi-ranking Project profiles, DeFi TVL/fees/revenue
surf_signal detail, projects, token-of-the-day, token-of-week Project signal scores and ranked highlights
surf_onchain sql, tx, gas-price, schema, bridge-ranking, yield-ranking, structured-query On-chain SQL queries, tx lookup, gas prices
surf_search project, wallet, news, web, fund, polymarket, kalshi, airdrop, events, social-people, social-posts Unified search across all data types
surf_prediction_market kalshi-*, polymarket-*, matching-*, category-metrics Polymarket and Kalshi prediction markets
surf_fund detail, portfolio, ranking Crypto VC fund profiles and portfolios
surf_news feed, detail Crypto news from major outlets
surf_web fetch Fetch 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 ..." } })
"Surf's token of the day"      → surf_signal({ command: "token-of-the-day" })

How it works

On startup, the server:

  1. Fetches the OpenAPI spec from https://api.asksurf.ai/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 to the Surf API with native HTTP fetch and optional bearer authentication

The server automatically picks up new API endpoints when the spec is updated — just restart.

Example: AI agent

The repo includes a simple agent that connects Claude to surf-mcp tools in an agentic loop. See examples/agent.ts.

ANTHROPIC_API_KEY=your-key SURF_API_KEY=your-key bun run examples/agent.ts "What's the BTC price and fear & greed index?"

Development

git clone https://github.com/asksurf-ai/surf-mcp.git
cd surf-mcp
bun install
bun run start                # Run the server
bun run start:http           # Run Streamable HTTP on :3000
bun run typecheck            # Type check

Releasing

@surf-ai/surf-mcp is published by .github/workflows/publish.yml through npm trusted publishing: no npm token exists, and each version carries a provenance statement.

  1. Bump version in package.json in a pull request and merge it to main.
  2. Tag that main commit v<version> and push the tag. A stable version (for example v0.2.0) gets npm's latest dist-tag. A prerelease must end in -alpha, -beta or -rc, optionally followed by .N (for example v0.3.0-rc.1), and gets the matching dist-tag.
  3. A maintainer other than the one who pushed the tag approves the npm-publish environment deployment.

The workflow refuses a tag that is not on main, does not match package.json, or has any other prerelease suffix. Before it uploads the tarball, it starts the packed surf-mcp bin under Node and checks that it answers an MCP initialize. npm refuses to move latest to a version lower than the highest one already published.

License

MIT

from github.com/asksurf-ai/surf-mcp

Установка Surf Server

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/asksurf-ai/surf-mcp

FAQ

Surf Server MCP бесплатный?

Да, Surf Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Surf Server?

Нет, Surf Server работает без API-ключей и переменных окружения.

Surf Server — hosted или self-hosted?

Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.

Как установить Surf Server в Claude Desktop, Claude Code или Cursor?

Открой Surf Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

$5

Stripe

Payments, customers, subscriptions

Stripeавтор: Stripe

malamutemayhem/unclick-agent-native-endpoints

110+ tools for AI agents spanning social media, finance, gaming, music, AU-specific services, and utilities. Zero-config local tools plus platform connectors. n

malamutemayhemавтор: malamutemayhem

whiteknightonhorse/APIbase

API hub covering travel (Amadeus, Sabre), Polymarket prediction markets, crypto and weather, paid per call via x402 in USDC.

whiteknightonhorseавтор: whiteknightonhorse

trackerfitness729-jpg/sitelauncher-mcp-server

Deploy live HTTPS websites on subdomains or custom .xyz domains, paid in USDC on Base, with templates for crypto tokens and AI agent profiles.

trackerfitness729-jpgавтор: trackerfitness729-jpg

embeddedlayers/mcp-analytics

Statistical analysis, forecasting and ML on CSV files or live data from Shopify, Stripe, GA4 and more, with interactive HTML reports.

embeddedlayersавтор: embeddedlayers

carrierone/verilexdata-mcp

Pay-per-query x402 datasets: NPI healthcare, SEC filings, OFAC sanctions, crypto whales, Polymarket signals, patents and economic indicators.

carrieroneавтор: carrierone

paracetamol951/P-Link-MCP

HTTP 402 (Payment Required) implementation using Solana.

paracetamol951автор: paracetamol951

tipdotmd/tip-md-x402-mcp-server

Cryptocurrency tipping using the x402 payment protocol and CDP Wallet.

tipdotmdавтор: tipdotmd

laundromatic/shopgraph

Structured product data from the open web — Schema.org + AI extraction for e-commerce enrichment. Pay per call via Stripe. [shopgraph.dev](https://shopgraph.dev

laundromaticавтор: laundromatic

mrslbt/xendit-mcp

Xendit payment gateway for Southeast Asia: invoices, disbursements, balance checks and bank transfers.

mrslbtавтор: mrslbt

Compare Surf Server with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории finance