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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。