
A stateless streamable HTTP MCP server for interacting with the official source of government spending data.

StockMCP is a JSON-RPC 2.0 compliant Model Context Protocol server that provides access to stock market data, built on Yahoo Finance data sources.
StockMCP: an MCP server for stock market data is cataloged as an MCP server attributed to leogue. StockMCP is a JSON-RPC 2.0 compliant Model Context Protocol server that provides access to stock market data, built on Yahoo Finance data sources. It is categorized under finance crypto. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for StockMCP: an MCP server for stock market data are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
No. The free hosted endpoint requires no API key; Alpha Vantage is only an optional secondary source for extended features.
It serves the Model Context Protocol over HTTP using JSON-RPC 2.0.
README.md · 376842e3ffb7 · Fetched 2026-11-13 11:16:14 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
A comprehensive Model Context Protocol (MCP) server for real-time stock market data using Yahoo Finance
StockMCP provides a powerful, JSON-RPC 2.0 compliant interface for accessing comprehensive stock market data, built on the Model Context Protocol standard. Perfect for AI applications, financial analysis tools, and trading bots.
Use StockMCP immediately without any setup! We provide a free hosted endpoint at:
https://stockmcp.leoguerin.fr/mcpFor immediate access, use this configuration in your claude_desktop_config.json:
{
"mcpServers": {
"stock-mcp": {
"command": "npx",
"args": [
"mcp-remote",
"https://stockmcp.leoguerin.fr/mcp",
"--header",
"--allow-http"
]
}
}
}
Configuration file locations:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\\Claude\\claude_desktop_config.json| 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 |
# Copy the example environment file
cp .env.example .env
# Edit .env and add your API key
ALPHAVANTAGE_KEY=your-actual-api-key-here
# Clone the repository
git clone https://github.com/yourusername/StockMCP.git
cd StockMCP
# Configure your API key (see API Key Setup above)
cp .env.example .env
# Edit .env with your Alpha Vantage API key
# Build and run with Docker
docker build -t stockmcp .
docker run -p 3001:3001 --env-file .env stockmcp
# Install dependencies with uv (fastest)
uv sync
# Or with pip
pip install -e .
# Configure your API key (see API Key Setup above)
cp .env.example .env
# Edit .env with your Alpha Vantage API key
# Run the server
python src/main.py
# Server runs on http://localhost:3001/mcp
Once your server is running, integrate it with MCP clients:
Edit the configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonAdd this configuration:
{
"mcpServers": {
"stock-mcp": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:3001/mcp",
"--header",
"--allow-http"
]
}
}
}
Add to your MCP configuration:
{
"stock-mcp": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:3001/mcp",
"--header",
"--allow-http"
]
}
}
For any MCP-compatible client, use:
http://localhost:3001/mcptools/list methodStockMCP implements the Model Context Protocol (MCP) for seamless integration with AI applications. Once running, the server provides:
http://localhost:3001/mcptools/list to get available toolstools/call to execute tools with parametersFor detailed API examples and JSON schemas, access the interactive documentation at http://localhost:3001/mcp/docs when the server is running.
StockMCP/
├── src/
│ ├── main.py # FastAPI server and endpoints
│ ├── models.py # Pydantic models for MCP and stock data
│ ├── mcp_handlers.py # MCP protocol request handlers
│ ├── tools.py # Tools package entry point
│ └── tools/ # Modular tools implementation
│ ├── market_data.py # Real-time quotes, history, fundamentals
│ ├── analysis.py # Forecasts and growth projections
│ └── registry.py # Tool registration and execution
├── tests/ # Comprehensive test suite (100 tests)
├── Dockerfile # Container configuration
├── pyproject.toml # Project dependencies and configuration
└── README.md # This file
# Run all tests
uv run pytest
# Run with verbose output
uv run pytest -v
# Run specific test file
uv run pytest tests/test_api.py
# Run with coverage
uv run pytest --cov=src
Core Dependencies:
Development Dependencies:
# Build the image
docker build -t stockmcp .
# Run the container
docker run -p 3001:3001 stockmcp
# Run in background
docker run -d -p 3001:3001 --name stockmcp-server stockmcp
The container exposes the API on port 3001 by default. You can customize this:
# Custom port mapping
docker run -p 8080:3001 stockmcp
# With environment variables
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)Primary Data Source: Yahoo Finance (yfinance)
Secondary Data Source: Alpha Vantage (optional)
Production Recommendations:
We welcome contributions! Here's how to get started:
git checkout -b feature/amazing-feature)uv run pytest)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ for the financial data community by Léo Guerin
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for StockMCP: an MCP server for stock market data from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/stockmcp)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

A stateless streamable HTTP MCP server for interacting with the official source of government spending data.

A hosted, remote MCP server for Fortnox that lets AI assistants answer questions from a company's bookkeeping and propose changes for approval before writing them.

OptimistFi is a read-only remote MCP server that provides perpetual futures market data, perps prop firm rules and pricing, and US equity investment research.