Skip to main content
Glama
Kraken MCP Connector

Kraken MCP Connector

Kraken MCP Connector

Server MCP remoto che espone i dati di mercato pubblici di Kraken (spot) come connettore personalizzato per Claude. Stesso ruolo del connettore Crypto.com già presente nel catalogo di claude.ai, ma ospitato da noi.

  • Trasporto Streamable HTTP (endpoint /mcp), stateless, nessuna sessione da mantenere.

  • Nessuna chiave API: usa solo gli endpoint pubblici di Kraken. Sola lettura.

  • Funziona anche in locale via stdio (Claude Desktop, Claude Code).

  • Pronto per Docker, Fly.io, Render, Railway o qualsiasi host Node 20+.

Tool esposti

Tool

Cosa restituisce

Endpoint Kraken

get_ticker

Bid/ask, ultimo prezzo, volume, VWAP, high/low 24h, variazione % dall'apertura

/0/public/Ticker

get_tickers

Più coppie in una chiamata, oppure tutto il mercato filtrato per valuta quote e ordinato per volume

/0/public/Ticker

get_candlestick

Candele OHLCV (1m … 2w), fino a 720 per chiamata

/0/public/OHLC

get_book

Order book fino a 500 livelli per lato, con spread

/0/public/Depth

get_trades

Ultimi scambi (fino a 1000), con cursore last

/0/public/Trades

get_spread

Campioni recenti di spread bid/ask

/0/public/Spread

get_instruments

Elenco coppie, filtrabile per testo, base o quote

/0/public/AssetPairs

get_instrument

Dettaglio di una coppia: decimali, minimo ordine, tick, commissioni, leva

/0/public/AssetPairs

get_assets

Asset conosciuti da Kraken

/0/public/Assets

get_system_status

Stato dell'exchange e ora del server

/0/public/SystemStatus, /0/public/Time

Le coppie si possono scrivere come BTC/USD, BTCUSD, XBTUSD, XXBTZUSD o in stile Crypto.com BTC_USDT: il server prova le varianti e, se Kraken risponde "Unknown asset pair", riprova con i codici storici (XBT, XDG).

I prezzi sono restituiti come stringhe, esattamente come li manda Kraken, per non introdurre arrotondamenti.

Related MCP server: polymarket-book-mcp

Avvio locale

npm install
npm run dev            # http://127.0.0.1:3000/mcp
curl http://127.0.0.1:3000/healthz

Test (usano un finto Kraken locale, non serve rete):

npm test

Smoke test contro il vero Kraken, a server avviato:

npm run smoke                                  # locale
npm run smoke -- https://TUO-HOST/mcp          # deployment

Deploy

Il server ascolta su PORT (default 3000) e HOST (default 0.0.0.0). Tutte le variabili sono in .env.example.

Docker (qualsiasi host)

docker build -t kraken-mcp-connector .
docker run --rm -p 3000:3000 kraken-mcp-connector

Fly.io

# cambia `app` in fly.toml con un nome libero, poi:
fly launch --no-deploy --copy-config
fly deploy
fly status      # l'URL sarà https://<app>.fly.dev/mcp

Render

"New +" → "Blueprint", scegli questo repo: render.yaml crea il servizio dal Dockerfile. L'URL sarà https://<servizio>.onrender.com/mcp.

Railway

"New project" → "Deploy from GitHub repo": Railway rileva il Dockerfile. Genera un dominio pubblico dalle impostazioni del servizio e usa https://<dominio>/mcp.

Collegarlo a Claude

claude.ai (connettore personalizzato)

  1. Verifica che https://TUO-HOST/healthz risponda {"ok":true}.

  2. Su claude.ai: Customize → Connectors → "+" → Add custom connector.

  3. Nome: Kraken. URL: https://TUO-HOST/mcp. Lascia vuoti i campi OAuth.

  4. Salva e attiva il connettore nella chat.

Sui piani Team ed Enterprise il connettore va prima aggiunto all'organizzazione da un Owner, poi ogni utente lo abilita.

Nota: l'interfaccia di claude.ai non permette di impostare header personalizzati, quindi per claude.ai il server va lasciato senza MCP_BEARER_TOKEN. I dati sono comunque pubblici.

Claude Code

claude mcp add --transport http kraken https://TUO-HOST/mcp
# con token (se MCP_BEARER_TOKEN è impostato sul server):
claude mcp add --transport http kraken https://TUO-HOST/mcp --header "Authorization: Bearer IL-TUO-TOKEN"

Claude Desktop (stdio, senza deploy)

npm run build

Poi in claude_desktop_config.json:

{
  "mcpServers": {
    "kraken": {
      "command": "node",
      "args": ["/percorso/assoluto/kraken-mcp-connector/dist/stdio.js"]
    }
  }
}

Variabili d'ambiente

Variabile

Default

Note

PORT

3000

Porta HTTP

HOST

0.0.0.0

Interfaccia di ascolto

KRAKEN_API_URL

https://api.kraken.com

Cambiala solo per test o proxy

KRAKEN_MIN_INTERVAL_MS

250

Distanza minima fra due chiamate a Kraken (limite per IP)

KRAKEN_CACHE_TTL_MS

2000

Riuso di una risposta identica per questo tempo

MCP_BEARER_TOKEN

vuoto

Se impostato, /mcp richiede Authorization: Bearer <token>

ALLOWED_HOSTS

vuoto

Lista di hostname ammessi nell'header Host (protezione DNS rebinding)

Limiti e note

  • Solo endpoint pubblici: niente saldi, ordini o prelievi. Per questo non servono chiavi e non c'è nulla da rubare sul server.

  • Kraken limita le chiamate pubbliche per IP. Il throttle e la cache interni bastano per un uso conversazionale; per carichi alti alza KRAKEN_CACHE_TTL_MS.

  • Il server è stateless: ogni richiesta HTTP crea un'istanza MCP nuova. Si può replicare su più macchine senza coordinamento.

  • Il trasporto SSE legacy non è servito. Claude usa Streamable HTTP.

Struttura

src/kraken.ts   client REST Kraken: normalizzazione coppie, throttle, cache, errori
src/tools.ts    definizione dei tool MCP e formattazione delle risposte
src/http.ts     entry point remoto (Streamable HTTP, /healthz, bearer opzionale)
src/stdio.ts    entry point locale (stdio)
test/           mock di Kraken + test unitari ed end-to-end con il client MCP
scripts/smoke.ts  verifica dal vivo contro api.kraken.com

Licenza

MIT.

Available Tools

10 tools
get_assetsList assetsA
Read-onlyIdempotent

Assets known to Kraken (code, display name, decimals, status). Pass assets to look up specific ones.

Inputs: assets.

get_bookGet order bookB
Read-onlyIdempotent

Order-book snapshot (bids and asks) for a pair, up to 500 levels per side, best prices first.

Inputs: pair (required), depth.

get_candlestickGet candles (OHLC)A
Read-onlyIdempotent

OHLCV candles for a pair. Kraken returns up to 720 candles per call, most recent last. Use since (Unix seconds) to page further back.

Inputs: pair (required), limit, since, interval.

get_instrumentGet instrumentA
Read-onlyIdempotent

Full detail for one pair: precision, minimum order, tick size, fee schedule, leverage.

Inputs: pair (required).

get_instrumentsList instrumentsA
Read-onlyIdempotent

List tradable spot pairs. Filter by substring (search), base or quote asset. Returns compact rows; use get_instrument for fees and full detail.

Inputs: base, limit, quote, search.

get_spreadGet recent spreadsB
Read-onlyIdempotent

Recent best bid/ask spread samples for a pair (time, bid, ask).

Inputs: pair (required), limit, since.

get_system_statusExchange statusA
Read-onlyIdempotent

Kraken system status (online, maintenance, cancel_only, post_only) and server time.

Inputs: no named parameters.

get_tickerGet tickerA
Read-onlyIdempotent

Current snapshot for one pair: best bid/ask, last trade, 24h volume, VWAP, high, low, trade count and percent change since the daily open.

Inputs: pair (required).

get_tickersGet several tickersA
Read-onlyIdempotent

Snapshots for a list of pairs in one call, or for every pair on the exchange when pairs is omitted (optionally filtered by quote asset, sorted by 24h volume).

Inputs: limit, pairs, quote.

get_tradesGet recent tradesA
Read-onlyIdempotent

Most recent public trades for a pair (up to 1000). since is the opaque last cursor from a previous call, or a Unix timestamp in nanoseconds.

Inputs: pair (required), count, since.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool targets a distinct market-data resource or granularity: singular vs. list snapshots, candles, order book, trades, spread samples, instrument list vs. detail, assets, and system status. The singular/plural pairs are clearly differentiated by their descriptions, and no two tools appear to do the same thing.

    Naming Consistency5/5

    All tools use a consistent snake_case get_<noun> pattern, with intentional singular/plural distinctions for snapshot vs. list operations. There are no mixed conventions or vague verbs.

    Tool Count5/5

    Ten tools is well-scoped for a read-only Kraken market-data connector. Each tool earns its place by covering a distinct data type without excessive fragmentation.

    Completeness4/5

    The surface thoroughly covers public market data: tickers, candles, order book, trades, spreads, instruments, assets, and system status. The main gap is the absence of private/account or trading endpoints, which may matter if the connector is intended to cover more than public market data.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Read-only MCP server for Blocksize real-time market data: crypto VWAP, bid/ask, FX, metals and tokenized equities, with pricing, coverage and x402 endpoint lookup. Signed-in users of the Claude, ChatGPT and Cursor connectors get 30,000 free live-data credits every month (1 credit = $0.001); subscriptions from EUR 49/month.
      7
      1
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables MCP clients to retrieve TradingView market data, including historical OHLCV candles, quotes, technical indicators, and screener results over stdio or SSE.
      4
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP clients to read Sierra Chart study outputs, chart discovery, and study metadata/history via read-only tools over Streamable HTTP or stdio.
      MIT