market-pulse-mcp
Provides live cryptocurrency market data including spot prices, OHLCV candles, order books, funding rates, and technical indicators via public exchange APIs.
README
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 six tools over the MCP stdio transport:
| Tool | Description | Source |
|---|---|---|
get_price(symbol) |
Current spot price, best bid/ask, 24h volume | Coinbase Exchange |
get_candles(symbol, granularity, limit) |
OHLCV candles | Coinbase Exchange |
get_orderbook(symbol, depth) |
Top-of-book snapshot, spread, bid/ask imbalance | Coinbase Exchange |
get_funding_rate(symbol) |
Perp funding rate, mark price, open interest | Hyperliquid |
compute_indicators(symbol, granularity, limit) |
RSI(14), EMA(20/50), ATR(14), realized volatility | Coinbase Exchange (computed locally) |
market_summary(symbols) |
Compact multi-asset table combining the above | 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.
Install
With uv (recommended)
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.
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. 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. market_summary calls into this per symbol sequentially rather than firing requests concurrently, which is slower but keeps a multi-symbol scan well under the public rate limit.
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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.