stock-research-mcp
Provides comprehensive stock research and trading execution for Claude, aggregating data from Alpha Vantage, Finnhub, and Alpaca APIs.
README
Stock Research MCP Server
An MCP (Model Context Protocol) server that provides comprehensive stock research tools for Claude. Aggregates data from Alpha Vantage and Finnhub APIs.
Features
- Real-time quotes and historical price data
- Company profiles and fundamental analysis
- Technical indicators (SMA, EMA, RSI, MACD, Bollinger Bands)
- Support/resistance level calculations
- Analyst ratings and price targets
- News sentiment analysis
- Insider trading activity
- Macro economic indicators
- Deep research reports combining all data sources
- Trading execution via Alpaca (paper and live trading)
Installation
- Clone the repository:
cd stock-research-mcp
- Create a virtual environment and install the package:
uv venv .venv
source .venv/bin/activate
uv pip install -e ".[dev]"
- Configure API keys in
.env:
ALPHA_VANTAGE_API_KEY=your_key_here
FINNHUB_API_KEY=your_key_here
# Alpaca Trading (optional)
ALPACA_API_KEY=your_key_here
ALPACA_SECRET_KEY=your_secret_here
ALPACA_PAPER=true # Set to false for live trading
# Risk Controls (optional)
TRADING_MAX_ORDER_VALUE=5000
TRADING_MAX_POSITION_SIZE=10000
TRADING_ALLOWED_SYMBOLS=AAPL,MSFT,GOOGL # Leave empty for all symbols
Get free API keys at:
- Alpha Vantage: https://www.alphavantage.co/support/#api-key
- Finnhub: https://finnhub.io/register
- Alpaca: https://alpaca.markets/ (free paper trading account)
Usage with Claude Code
Add to your Claude Code MCP configuration:
claude mcp add stock-research -- .venv/bin/python -m stock_research.server
Or use the installed script:
claude mcp add stock-research -- .venv/bin/stock-research-mcp
Or manually add to ~/.claude/mcp.json:
{
"mcpServers": {
"stock-research": {
"command": "/path/to/stock-research-mcp/.venv/bin/stock-research-mcp"
}
}
}
Available Tools
Market Data
get_quote(ticker)- Real-time quoteget_historical_prices(ticker, timeframe, interval)- Historical OHLCV data
Company Analysis
get_company_profile(ticker)- Company overviewget_financials(ticker)- Key financial metrics and ratiosget_earnings(ticker)- Earnings history and surprises
Technical Analysis
get_technical_indicators(ticker, indicators)- SMA, EMA, RSI, MACD, BBandsget_support_resistance(ticker, lookback_days)- Support/resistance levels
Sentiment & Activity
get_news_sentiment(ticker, limit)- News articles with sentimentget_insider_trades(ticker)- Insider buying/sellingget_analyst_ratings(ticker)- Analyst consensus and price targets
Macro
get_macro_context()- Economic indicators (Fed rate, yields, GDP, CPI)
Research
generate_deep_research(ticker, research_type)- Comprehensive research report
Trading (Alpaca)
get_trading_account()- Account info, buying power, equityget_positions()- All open positionsget_position(symbol)- Position for specific symbolplace_market_order(symbol, qty, side)- Market orderplace_limit_order(symbol, qty, side, limit_price)- Limit orderplace_stop_order(symbol, qty, side, stop_price)- Stop orderplace_stop_limit_order(symbol, qty, side, stop_price, limit_price)- Stop-limit orderget_orders(status)- List orders (open/closed/all)cancel_order(order_id)- Cancel specific ordercancel_all_orders()- Cancel all open ordersclose_position(symbol)- Close position for symbolclose_all_positions()- Liquidate all positionsget_trading_config()- View current risk limits
Development
Run tests:
pytest
Example Usage
Once configured, ask Claude:
"Give me a deep research report on NVDA"
"What's the current price and technical setup for AAPL?"
"Show me analyst ratings for MSFT"
"What's the macro environment looking like?"
Trading Examples
"Show me my current positions"
"Buy 10 shares of AAPL at market"
"Place a limit order for 5 shares of MSFT at $400"
"Set a stop loss on my NVDA position at $120"
"What's my account buying power?"
⚠️ Warning: Trading involves real money. Start with paper trading (
ALPACA_PAPER=true) to test your strategies. The server includes risk controls but you are responsible for your trades.
Rate Limits
- Alpha Vantage Free Tier: 25 API calls/day
- Finnhub Free Tier: 60 API calls/minute
The server uses aggressive caching to stay within free tier limits.
License
MIT
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。