market-pulse-mcp
market-pulse-mcp
Un servidor MCP (Model Context Protocol) pequeño y enfocado que proporciona a un LLM datos de cripto en tiempo real: precios al contado, velas OHLCV, instantáneas del libro de órdenes, tasas de financiación de perpetuos y un puñado de indicadores técnicos, calculados desde cero. Cada fuente de datos es una API de exchange pública y sin clave, por lo que no hay nada que configurar ni necesidad de crear una cuenta.
Creado por Brandon Perez (@remybanks77) como pieza de portafolio para demostrar una implementación limpia de un servidor MCP: Python tipado, una huella de dependencias pequeña y el cálculo de indicadores escrito a mano en lugar de recurrir a pandas o ta-lib.
Qué hace
market-pulse-mcp expone seis herramientas a través del transporte stdio de MCP:
Herramienta | Descripción | Fuente |
| Precio spot actual, mejor bid/ask, volumen de 24 h | Coinbase Exchange |
| Velas OHLCV | Coinbase Exchange |
| Instantánea del top-of-book, spread, desequilibrio bid/ask | Coinbase Exchange |
| Tasa de financiación de perpetuos, precio mark, interés abierto | Hyperliquid |
| RSI(14), EMA(20/50), ATR(14) y volatilidad realizada | Coinbase Exchange (calculado localmente) |
| Tabla compacta de múltiples activos que combina lo anterior | Coinbase Exchange + Hyperliquid |
Los símbolos son tickers base simples: "BTC", "ETH", "SOL". Se tolera y elimina un sufijo -USD o /USD, por lo que "BTC-USD" y "BTC" son equivalentes.
Related MCP server: MCP Crypto Market Data Server
Instalación
Con uv (recomendado)
git clone https://github.com/remybanks77/market-pulse-mcp.git
cd market-pulse-mcp
uv venv
uv pip install -e ".[dev]"Con 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]"Ambos métodos instalan un script de consola market-pulse-mcp que ejecuta el servidor sobre stdio.
Configurar en Claude Code
Añade esto al .mcp.json de tu proyecto (o ejecuta claude mcp add):
{
"mcpServers": {
"market-pulse": {
"command": "market-pulse-mcp",
"args": []
}
}
}Si no instalaste dentro de un virtualenv activo, apunta command directamente al binario del venv, por ejemplo /path/to/market-pulse-mcp/.venv/bin/market-pulse-mcp.
Configurar en Claude Desktop
Añade esto a 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"
}
}
}Reinicia Claude Desktop después de guardar. El servidor market-pulse debería aparecer bajo el icono de martillo/herramientas con sus seis herramientas listadas.
Ejemplo de conversación
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.Notas de diseño
Por qué calcular los indicadores a mano en lugar de usar pandas o ta-lib. La idea central de este servidor es ser una dependencia pequeña y auditable: mcp y httpx, nada más. Añadir pandas para cuatro fórmulas de indicadores sería una dependencia mucho más pesada que la lógica real del servidor. market_pulse_mcp/indicators.py implementa SMA, EMA, RSI de Wilder, ATR de Wilder y la volatilidad realizada anualizada (a partir de los log returns) directamente sobre listas Python simples, con cada fórmula probada mediante tests unitarios contra datos de prueba calculados a mano, de modo que se verifica la matemática en sí y no solo el código que la conecta.
Por qué específicamente Coinbase y Hyperliquid. Ambos exponen datos de mercado completos sin API key: los endpoints públicos REST de Coinbase Exchange (api.exchange.coinbase.com) cubren ticker, velas y libro de órdenes; la API pública de información de Hyperliquid (api.hyperliquid.xyz/info) cubre el funding rate de perpetuos y los precios mark en una sola solicitud metaAndAssetCtxs. Así, el proyecto es verdaderamente zero-config: clonar, instalar, ejecutar, sin registro.
Manejo de límites de tasa. El nivel público de Coinbase limita la tasa de peticiones de forma agresiva (unas pocas por segundo). exchanges.py envuelve cada solicitud en un pequeño bucle de reintentos con backoff exponencial: reintenta en respuestas HTTP 429 y 5xx (hasta 3 intentos, duplicando el backoff cada vez) y falla rápido en otros errores 4xx, que indican una petición inválida y no una condición transitoria. market_summary usa esto por símbolo y de forma secuencial, en lugar de lanzar peticiones en paralelo; es más lento, pero mantiene una exploración multi-símbolo muy por debajo del límite público.
Filosofía de manejo de errores. Cada herramienta captura excepciones de los clientes de exchange y del cálculo de indicadores y devuelve {"error": "..."} en lugar de dejar que un traceback se propague por el transporte MCP. Así, el modelo obtiene un mensaje legible sobre el que puede actuar (reintentar, pedir otro símbolo, etc.) en vez de un fallo opaco de la herramienta.
Pruebas
pytest # offline tests only (default; see pyproject.toml)
pytest -m integration # also hit live Coinbase / Hyperliquid APIsLa suite de prueba offline (tests/test_indicators.py, tests/test_exchanges.py) es totalmente determinista: los valores de indicadores se comparan con datos de prueba calculados a mano (véanse los comentarios en cada test) y las funciones auxiliares de exchange (normalización de símbolo, resolución de granularidad) son funciones puras, sin red. La suite de integración (tests/test_integration.py) está marcada con @pytest.mark.integration y se omite por defecto, ya que depende de precios en vivo y del tiempo en actividad externo. Ejecútala explícitamente cuando quieras confirmar que el código cliente aún coincide con la forma real de las APIs.
Estructura del proyecto
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 integrationLicencia
Licencia MIT; ver LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceProvides 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.
- Flicense-qualityDmaintenanceProvides real-time and historical cryptocurrency market data from major exchanges through CCXT. Supports live price lookups, historical OHLCV queries, and includes lightweight caching for improved performance.
- Flicense-qualityCmaintenanceProvides 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
- AlicenseAqualityCmaintenanceProvides 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.131MIT
Related MCP Connectors
Live crypto data: funding rates, funding arbitrage, OI pressure, Fear & Greed. Free, no API key.
Provide real-time cryptocurrency price data and market analysis.
Real-time crypto prices from Binance, Coinbase, Kraken, OKX, and Bybit
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/remybanks77/market-pulse-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server