alpaca-market-mcp
MCP server for technical analysis with Alpaca market data. Computes Bollinger Bands, Moving Averages, Stochastics, candlestick patterns, and evaluates 11 trading strategies - all server-side, no Python execution needed on the client.
Installation
# Via uvx (recommended)
uvx alpaca-market-mcp
# Via pip
pip install alpaca-market-mcp
Configuration
Claude Desktop / Claude.ai
Add to your MCP config:
{
"mcpServers": {
"alpaca-market": {
"command": "uvx",
"args": ["alpaca-market-mcp"],
"env": {
"ALPACA_API_KEY": "your-api-key",
"ALPACA_SECRET_KEY": "your-secret-key"
}
}
}
}
Claude Code
Add to .mcp.json:
{
"mcpServers": {
"alpaca-market": {
"command": "uvx",
"args": ["alpaca-market-mcp", "--feed", "iex"],
"env": {
"ALPACA_API_KEY": "your-api-key",
"ALPACA_SECRET_KEY": "your-secret-key"
}
}
}
}
Environment Variables
| Variable | Required | Description |
|---|---|---|
ALPACA_API_KEY |
Yes | Alpaca API key |
ALPACA_SECRET_KEY |
Yes | Alpaca secret key |
CLI Options
alpaca-market-mcp [OPTIONS]
Options:
--transport [stdio|streamable-http|sse] Transport protocol (default: stdio)
--host TEXT Host to bind (HTTP only)
--port INTEGER Port to bind (HTTP only)
--feed [iex|sip|otc] Data feed (default: iex)
--env-file PATH Load env vars from file
Tools
analyze_ticker
Full multi-timeframe technical analysis (15min, 1h, 1d). Returns Bollinger Bands, Moving Averages (SMA 20/40/100/200), candlestick patterns, volume, and Stochastics.
check_strategy
Evaluate the 11 trading strategies from the options course. Returns condition-by-condition pass/fail with CUMPLIDA/PARCIAL/NO CUMPLIDA status.
get_indicators
Get a specific indicator's values for a single timeframe. Supports: bb, sma, ema, stoch, rsi, macd, atr, volume, candles.
scan_tickers
Scan multiple tickers for trading signals and active strategies.
get_stock_bars_with_indicators
Historical OHLCV bars with indicator columns attached.
Indicators
| Indicator | Weight | Parameters |
|---|---|---|
| Bollinger Bands | 50% | Period 20, Std 2.0 |
| Moving Averages | 25% | SMA 20, 40, 100, 200 |
| Candlestick Patterns | 15% | Body ratio classification |
| Volume | 5% | SMA(20) ratio |
| Worden Stochastics | 5% | K=14, D=3, Smooth=3 |
11 Trading Strategies
| # | Strategy | Action |
|---|---|---|
| 1 | Cambio tendencia al alza (BB Hora) | CALL |
| 2 | Cambio tendencia a la baja (BB Hora) | PUT |
| 3 | Rebote punto medio bajista (BB Dia) | PUT |
| 4 | Rebote punto medio alcista (BB Dia) | CALL |
| 5 | Salido BB sin volatilidad al alza (15 Min) | PUT |
| 6 | Efecto iman bajista (MA Hora + BB 15 Min) | CALL |
| 7 | Efecto iman alcista (MA Hora + BB 15 Min) | PUT |
| 8 | Cambio tendencia al alza (BB 15 Min) | CALL |
| 9 | Cambio tendencia a la baja (BB 15 Min) | PUT |
| 10 | Lateral a alcista mediano plazo (MAs) | CALL |
| 11 | Lateral a bajista mediano plazo (MAs) | PUT |
Development
# Install dev dependencies
uv pip install -e ".[dev]"
# Run tests
uv run pytest
# Lint
uv run ruff check src/
License
MIT
Metadata
Release files for alpaca-market-mcp 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| alpaca_market_mcp-0.2.1.tar.gz | 30.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| alpaca_market_mcp-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 63.7 kB
Release files / alpaca_market_mcp-0.2.1.tar.gz
| Download URL | alpaca_market_mcp-0.2.1.tar.gz |
|---|---|
| Size | 30.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0d36f106a6355aa981d20c1362d5c92c9c18c564b436f92d05c37e8b381695fa
|
|
BLAKE2b-256 checksum How to use checksums |
245b061b6778ba4f30507f428ee1a4ed20316a9c5325eda4e26234fbc6a47f16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / alpaca_market_mcp-0.2.1-py3-none-any.whl
| Download URL | alpaca_market_mcp-0.2.1-py3-none-any.whl |
|---|---|
| Size | 33.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
774beffb8f838b39a7428d0a0d795f2f07c87df245ab50a64a03b504c6bbe43c
|
|
BLAKE2b-256 checksum How to use checksums |
f61d232c4b4f89a6ce3e5a29bc79b5eb9f00ce552efa3f3310d974c2f8a05df4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|