StockMCP
About
A MCP server providing real-time stock market data and financial analysis through Yahoo Finance API. Built with FastAPI and designed for AI applications requiring comprehensive financial data access
Explore
- Real‑time quotes, fundamentals, and historical OHLCV data
- Dividend analysis with quality metrics and consistency scoring
- Analyst forecasts (price targets, consensus ratings, EPS)
- Forward growth projections (revenue, EPS, FCF with CAGR)
- Optional Alpha Vantage integration for enhanced earnings estimates
- Docker‑ready and supports custom port mapping
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
StockMCPCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
For immediate access, use this configuration in your claude_desktop_config.json:
``json`
{
"mcpServers": {
"stock-mcp": {
"command": "npx",
"args": [
"mcp-remote",
"https://stockmcp.leoguerin.fr/api/mcp",
"--header",
"--allow-http"
]
}
}
}
~/Library/Application Support/Claude/claude_desktop_config.json
Configuration file locations:
- macOS: %APPDATA%\\Claude\\claude_desktop_config.json
- Windows:
1. Get a free Alpha Vantage API key: Visit https://www.alphavantage.co/support/#api-key
2. Configure environment:
bashhttp://localhost:3001/api/mcp
cp .env.example .envcp .env.example .env
uv sync
StockMCP implements the Model Context Protocol (MCP) for seamless integration with AI applications. Once running, the server provides:
- Endpoint:tools/list
- Protocol: JSON-RPC 2.0 over HTTP
- Discovery: Useto get available toolstools/call
- Execution: Useto execute tools with parametershttp://localhost:3001/docs
For detailed API examples and JSON schemas, access the interactive documentation atwhen the server is running.
The container exposes the API on port 3001 by default. You can customize this:
docker run -p 3001:3001 -e LOG_LEVEL=DEBUG stockmcp
The server can be configured through environment variables:
- LOG_LEVEL - Logging level (DEBUG, INFO, WARNING, ERROR)HOST
- - Server host (default: 0.0.0.0)PORT` - Server port (default: 3001)
-
get_realtime_quote
Retrieve current market data including price, volume, market cap, and key financial ratios
get_fundamentals
Access comprehensive financial statements (income, balance sheet, cash flow) and calculated ratios
get_price_history
Get historical OHLCV data with optional total return calculation including reinvested dividends
get_dividends_and_actions
Analyze dividend payment history and corporate actions with quality metrics and consistency scoring
get_analyst_forecasts
Get analyst price targets, consensus ratings (Buy/Hold/Sell), and EPS forecasts from professional analysts
get_growth_projections
Forward growth projections for revenue, earnings (EPS), and free cash flow with 1-year, 3-year, and 5-year CAGR estimates
| Tool Name | Description |
|-----------|-------------|
| get_realtime_quote | Retrieve current market data including price, volume, market cap, and key financial ratios |
| get_fundamentals | Access comprehensive financial statements (income, balance sheet, cash flow) and calculated ratios |
| get_price_history | Get historical OHLCV data with optional total return calculation including reinvested dividends |
| get_dividends_and_actions | Analyze dividend payment history and corporate actions with quality metrics and consistency scoring |
| get_analyst_forecasts | Get analyst price targets, consensus ratings (Buy/Hold/Sell), and EPS forecasts from professional analysts |
| get_growth_projections | Forward growth projections for revenue, earnings (EPS), and free cash flow with 1-year, 3-year, and 5-year CAGR estimates |
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"stockmcp": {
"stock-mcp": {
"command": "npx",
"args": [
"mcp-remote",
"https://stockmcp.leoguerin.fr/api/mcp",
"--header",
"--allow-http"
]
}
}
}
}
McpServers
{
"stock-mcp": {
"command": "npx",
"args": [
"mcp-remote",
"https://stockmcp.leoguerin.fr/api/mcp",
"--header",
"--allow-http"
]
}
}
🌐 Free Hosted Endpoint
Use StockMCP immediately without any setup! We provide a free hosted endpoint at: - Endpoint:https://stockmcp.leoguerin.fr/api/mcp
- No API key required - Just add to your MCP client configuration
Claude Desktop Configuration
For immediate access, use this configuration in yourclaude_desktop_config.json:
``json
{
"mcpServers": {
"stock-mcp": {
"command": "npx",
"args": [
"mcp-remote",
"https://stockmcp.leoguerin.fr/api/mcp",
"--header",
"--allow-http"
]
}
}
}
`
Configuration file locations:
- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- Windows: %APPDATA%\\Claude\\claude_desktop_config.json
🛠️ Available Tools
| Tool Name | Description |
|-----------|-------------|
| get_realtime_quote | Retrieve current market data including price, volume, market cap, and key financial ratios |
| get_fundamentals | Access comprehensive financial statements (income, balance sheet, cash flow) and calculated ratios |
| get_price_history | Get historical OHLCV data with optional total return calculation including reinvested dividends |
| get_dividends_and_actions | Analyze dividend payment history and corporate actions with quality metrics and consistency scoring |
| get_analyst_forecasts | Get analyst price targets, consensus ratings (Buy/Hold/Sell), and EPS forecasts from professional analysts |
| get_growth_projections | Forward growth projections for revenue, earnings (EPS), and free cash flow with 1-year, 3-year, and 5-year CAGR estimates |
🚀 Quick Start
API Key Setup
1. Get a free Alpha Vantage API key: Visit https://www.alphavantage.co/support/#api-key
2. Configure environment:
`bash
# Copy the example environment file
cp .env.example .env
# Edit .env and add your API key
ALPHAVANTAGE_KEY=your-actual-api-key-here
`
Using Docker (Recommended)
``bashSign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



