Skip to main content
Glama
market-pulse-mcp

market-pulse-mcp

by remybanks77

market-pulse-mcp

A small, focused MCP (Model Context Protocol) server that gives an LLM live crypto market data: spot prices, OHLCV candles, order book snapshots, perpetual funding rates, and a handful of technical indicators, computed from scratch. Every data source is a public, keyless exchange API, so there is nothing to configure and no account to create.

Built by Brandon Perez (@remybanks77) as a portfolio piece demonstrating a clean MCP server implementation: typed Python, a small dependency footprint, and indicator math written by hand instead of pulled in from pandas or ta-lib.

What it does

market-pulse-mcp exposes eight tools over the MCP stdio transport. Tool names are namespaced with the server name so they do not collide with the other market-data servers a client may have installed at the same time:

Tool

Description

Source

market_pulse_price(symbol)

Current spot price, best bid/ask, 24h volume

Coinbase Exchange

market_pulse_candles(symbol, granularity, limit)

OHLCV candles

Coinbase Exchange

market_pulse_orderbook(symbol, depth, include_levels)

Best bid/ask, spread in bps, bid/ask imbalance; raw ladder opt-in

Coinbase Exchange

market_pulse_funding_rate(symbol)

Perp funding rate, mark price, open interest

Hyperliquid

market_pulse_indicators(symbol, granularity, limit)

RSI(14), EMA(20/50), ATR(14), realized volatility

Coinbase Exchange (computed locally)

market_pulse_summary(symbols)

Compact multi-asset table combining the above

Coinbase Exchange + Hyperliquid

market_pulse_basis(symbols)

Spot-perp basis in bps, contango/backwardation, funding agreement

Coinbase Exchange + Hyperliquid

market_pulse_supported_assets(venue, search, limit)

Which assets each venue covers, and which support basis

Coinbase Exchange + Hyperliquid

Symbols are plain base tickers: "BTC", "ETH", "SOL". A trailing -USD or /USD is tolerated and stripped, so "BTC-USD" and "BTC" are equivalent.

Related MCP server: MCP Crypto Market Data Server

Install

From PyPI

uvx market-pulse-mcp

uvx fetches and runs the server without installing anything permanently, which is what an MCP client config should point at. pip install market-pulse-mcp works too.

From source

git clone https://github.com/remybanks77/market-pulse-mcp.git
cd market-pulse-mcp
uv venv
uv pip install -e ".[dev]"

With pip

git clone https://github.com/remybanks77/market-pulse-mcp.git
cd market-pulse-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Both install a market-pulse-mcp console script that runs the server over stdio.

Distribution files

server.json is the official MCP registry entry, published with mcp-publisher against the PyPI package. manifest.json and .mcpbignore describe the same server as an MCPB bundle, which is how Smithery distributes stdio servers and how Claude Desktop installs one in a click. The bundle declares server.type: "uv", so dependencies are resolved from pyproject.toml on the user's machine rather than vendored into the archive; that keeps it around 100 KB and works on every platform without shipping compiled wheels.

Configure in Claude Code

Add this to your project's .mcp.json (or run claude mcp add):

{
  "mcpServers": {
    "market-pulse": {
      "command": "market-pulse-mcp",
      "args": []
    }
  }
}

If you did not install into an active virtualenv, point command at the venv's binary directly, for example /path/to/market-pulse-mcp/.venv/bin/market-pulse-mcp.

Configure in Claude Desktop

Add this to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json, Windows: %APPDATA%\Claude\claude_desktop_config.json):

{
  "mcpServers": {
    "market-pulse": {
      "command": "/absolute/path/to/market-pulse-mcp/.venv/bin/market-pulse-mcp"
    }
  }
}

Restart Claude Desktop after saving. The market-pulse server should appear under the hammer/tools icon with its six tools listed.

Example conversation

User: What's BTC doing right now, and is it overbought?

Claude: [calls get_price("BTC")]
        [calls compute_indicators("BTC", granularity="1h", limit=200)]

BTC is at $109,842 (bid $109,838 / ask $109,846). On the 1h chart:
  - RSI(14): 68.4, approaching overbought but not there yet (>70)
  - EMA(20) $109,510 above EMA(50) $108,220: short-term trend is bullish
  - ATR(14): $412, so a typical 1h range is roughly 0.4% of price
  - Realized vol (annualized): 47.9%

Not screaming overbought, but RSI is climbing. Want me to check the order
book for signs of resistance near current price, or pull funding rates to
see how leveraged longs are positioned?

User: Check funding, and give me a quick scan of BTC, ETH, and SOL.

Claude: [calls get_funding_rate("BTC")]
        [calls market_summary(["BTC", "ETH", "SOL"])]

Funding on BTC perps (Hyperliquid): 0.0057% per 8h (about 6.2% annualized).
Mildly long-skewed, nothing extreme.

Quick scan:
  BTC   $109,842   RSI 68.4   bullish   funding +6.2%/yr
  ETH   $3,912      RSI 61.2   bullish   funding +4.8%/yr
  SOL   $198.30     RSI 54.9   flat      funding +2.1%/yr

All three trending up on the hourly with positive funding. Nothing at a
extreme RSI level right now.

Design notes

Why hand-rolled indicator math instead of pandas or ta-lib. The whole point of this server is to be a small, auditable dependency: mcp and httpx, nothing else. Pulling in pandas for four indicator formulas would be a much heavier dependency than the actual server logic. market_pulse_mcp/indicators.py implements SMA, EMA, Wilder's RSI, Wilder's ATR, and annualized realized volatility (from log returns) directly on plain Python lists, with each formula unit-tested against hand-derived fixture values so the math itself is verified, not just the wiring around it.

Why Coinbase and Hyperliquid specifically. Both expose full market data without an API key: Coinbase Exchange's public REST endpoints (api.exchange.coinbase.com) cover ticker, candles, and order book; Hyperliquid's public info API (api.hyperliquid.xyz/info) covers perp funding and mark prices in a single metaAndAssetCtxs request. That keeps this project genuinely zero-config: clone it, install it, run it, no signup.

Rate-limit handling and caching. Coinbase's public tier rate-limits aggressively (a few requests per second). exchanges.py wraps every request in a small retry-with-exponential-backoff loop that retries on HTTP 429 and 5xx responses (up to 3 attempts, doubling the backoff each time) and fails fast on other 4xx errors, since those indicate a bad request rather than a transient condition. Repeat reads are absorbed by short TTL caches (5s tickers, 20s candles, 10s perp universe) rather than by slowing calls down, and concurrent callers asking for the same key collapse into a single upstream request instead of N of them.

Concurrency. market_summary and get_basis fan out across symbols with asyncio.gather over one process-wide pooled HTTP client, rather than opening a fresh connection per call and walking symbols one at a time. Hyperliquid's metaAndAssetCtxs returns the entire perp universe on every request regardless of what was asked for, so it is fetched once per cache window and indexed by coin instead of being re-downloaded and discarded per symbol. An eight-symbol summary went from 2.67s to 0.24s cold, and is served from cache on repeat.

Venue overlap. market_pulse_basis needs an asset quoted on both venues. Coinbase lists roughly 400 USD spot pairs and Hyperliquid roughly 232 perps, overlapping on about 126 assets. Spot-only assets still work for price, candles, order book and indicators; perp-only assets still work for funding. Rather than leaving a model to discover that by watching symbols fail one at a time, market_pulse_supported_assets reports the partition and can be filtered to any one slice of it.

Context cost as a design constraint. Every field a tool returns is a field the calling model pays for. market_pulse_orderbook used to return depth price levels per side by default, which at its maximum meant 100 [price, size] pairs pushed into the context to answer a question that the spread and imbalance almost always answer; the ladder is now behind include_levels. For the same reason 404s are reported as "not listed on Coinbase spot" rather than echoing back a request URL and a JSON error body.

Error handling philosophy. Every tool catches exceptions from the exchange clients and indicator math and returns {"error": "..."} instead of letting a traceback propagate through the MCP transport. That gives the calling model a readable message it can act on (retry, ask the user for a different symbol, etc.) instead of an opaque tool failure.

Tests

pytest                    # offline tests only (default; see pyproject.toml)
pytest -m integration     # also hit live Coinbase / Hyperliquid APIs

The offline suite (tests/test_indicators.py, tests/test_exchanges.py) is fully deterministic: indicator values are checked against fixtures worked out by hand (see the comments in each test), and exchange helper functions (symbol normalization, granularity resolution) are pure functions with no network access. The integration suite (tests/test_integration.py) is marked @pytest.mark.integration and skipped by default, since it depends on live prices and external uptime; run it explicitly when you want to confirm the client code still matches the real API shapes.

Project layout

market_pulse_mcp/
  server.py       # MCPServer-based server: tool definitions, stdio entry point
  exchanges.py    # Coinbase + Hyperliquid HTTP clients, symbol/granularity helpers
  indicators.py   # RSI, EMA, ATR, realized volatility (stdlib only)
tests/
  test_indicators.py   # offline, fixture-based
  test_exchanges.py    # offline, pure-function tests
  test_integration.py  # live API tests, opt-in via -m integration

License

MIT, see LICENSE.

Available Tools

8 tools
market_pulse_basisA
Read-onlyIdempotent

Compare Coinbase spot against the Hyperliquid perpetual for each asset: spot-perp basis in basis points, the current funding rate, and what the two together say about positioning.

Positive basis means the perp trades above spot (contango), which usually pairs with positive funding and crowded long positioning; negative basis (backwardation) with negative funding points the other way. Basis and funding disagreeing is the interesting case, so both are always reported rather than collapsed into one score.

Args: symbols: List of base tickers, e.g. ["BTC", "ETH", "SOL"]. Each must be listed on Coinbase spot and as a Hyperliquid perp; assets missing from either venue come back with an error on that row.

Inputs: symbols (required). Returns: object

market_pulse_candlesA
Read-onlyIdempotent

Get OHLCV candles for a crypto asset from Coinbase.

Args: symbol: Base ticker, e.g. "BTC", "ETH", "SOL". granularity: One of "1m", "5m", "15m", "1h", "6h", "1d". limit: Number of candles to return (max 300).

Inputs: symbol (required), limit, granularity. Returns: object

market_pulse_funding_rateA
Read-onlyIdempotent

Get the current perpetual futures funding rate for a crypto asset from Hyperliquid, along with mark price and open interest.

Args: symbol: Base ticker, e.g. "BTC", "ETH", "SOL".

Inputs: symbol (required). Returns: object

market_pulse_indicatorsA
Read-onlyIdempotent

Compute technical indicators (RSI-14, EMA-20/50, ATR-14, annualized realized volatility) for a crypto asset from recent Coinbase candles. All math is implemented from scratch on the standard library; see market_pulse_mcp/indicators.py.

Args: symbol: Base ticker, e.g. "BTC", "ETH", "SOL". granularity: Candle granularity: one of "1m", "5m", "15m", "1h", "6h", "1d". Determines both the indicator timeframe and the annualization factor used for realized volatility. limit: Number of candles to pull (more history gives a more stable EMA-50; at least 15 candles are required for RSI-14/ATR-14).

Inputs: symbol (required), limit, granularity. Returns: object

market_pulse_orderbookA
Read-onlyIdempotent

Get an order book snapshot for a crypto asset from Coinbase: best bid and ask, spread in basis points, and a bid/ask volume imbalance metric computed over the top depth levels.

Args: symbol: Base ticker, e.g. "BTC", "ETH", "SOL". depth: Number of price levels per side to aggregate over (max 50). include_levels: Return the raw price/size ladder as well. Off by default because the ladder is depth pairs per side and the summary fields above answer most questions; turn it on only to walk the book or size an order against real resting liquidity.

Inputs: symbol (required), depth, include_levels. Returns: object

market_pulse_priceA
Read-onlyIdempotent

Get the current spot price for a crypto asset from Coinbase.

Args: symbol: Base ticker, e.g. "BTC", "ETH", "SOL". A trailing "-USD" or "/USD" is tolerated and stripped.

Inputs: symbol (required). Returns: object

market_pulse_summaryA
Read-onlyIdempotent

Compact multi-asset summary table combining price, spread, funding rate, and RSI/trend for each symbol in one call. Useful for a quick market scan without calling the individual tools per asset.

Args: symbols: List of base tickers, e.g. ["BTC", "ETH", "SOL"].

Inputs: symbols (required). Returns: object

market_pulse_supported_assetsA
Read-onlyIdempotent

List which crypto assets this server can actually answer for, and on which venue. Call this before a scan rather than discovering coverage by watching individual symbols fail.

Coverage is not uniform. Coinbase quotes the spot side and Hyperliquid the perp side, and the two venues list different assets: some are spot-only (price, candles, order book, indicators work; funding does not), some are perp-only (funding works; nothing Coinbase-sourced does), and only assets on both venues support basis.

Args: venue: Which slice to return. "both" (default) is the spot-and-perp intersection, i.e. exactly the assets basis works for. "spot" is every Coinbase USD market, "perp" every Hyperliquid perp, "spot_only" and "perp_only" the two exclusive sets. search: Optional case-insensitive substring filter, e.g. "SOL". limit: Maximum symbols to return. Counts are always exact and are reported regardless of how many symbols the list itself was truncated to.

Inputs: limit, venue, search. Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool targets a distinct market-data concept: spot price, OHLCV candles, order book, funding rate, indicators, multi-asset summary, spot-perp basis, and asset coverage. The summary and basis tools aggregate other data but are clearly positioned as multi-asset scans, so an agent can pick the right granularity without confusion.

    Naming Consistency5/5

    All eight tools follow the same market_pulse_<resource> pattern, e.g. market_pulse_price, market_pulse_candles, market_pulse_funding_rate. There is no mixing of conventions or vague verbs, making the set predictable even though names are noun-based rather than verb_noun.

    Tool Count5/5

    Eight tools is a well-scoped size for a market-data server. Each tool earns its place: price/candles/orderbook/funding provide raw data, indicators add derived analysis, summary and basis offer synthetic views, and supported_assets avoids dead-end queries.

    Completeness5/5

    The surface covers the full read-only workflow for crypto market pulse: quote, candles, order book, funding, technical indicators, cross-venue basis, and coverage discovery. There are no obvious dead ends; the only possible additions like historical funding or trade tape are non-essential for the stated purpose.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides real-time and historical cryptocurrency market data from 100+ exchanges including prices, OHLCV data, market statistics, and order books through the CCXT library with intelligent caching.
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides real-time and historical cryptocurrency market data using ccxt, enabling users to fetch live prices, historical candlestick data, and stream real-time ticker updates across multiple exchanges.
      14
      -
    • A
      license
      A
      quality
      C
      maintenance
      Provides live cryptocurrency market data from over 100 exchanges, enabling AI agents to fetch prices, order books, funding rates, and more for trading analysis and arbitrage opportunities.
      13
      2
      MIT