StockMCP
@leogue
About StockMCP
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
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"stock-mcp": {
"command": "npx",
"args": [
"mcp-remote",
"https://stockmcp.leoguerin.fr/api/mcp",
"--header",
"--allow-http"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is StockMCP?
StockMCP is a comprehensive Model Context Protocol (MCP) server for real‑time stock market data, leveraging Yahoo Finance as its primary data source. It exposes a JSON‑RPC 2.0 interface ideal for AI applications, financial analysis tools, and trading bots.
How to use StockMCP?
You can use the free hosted endpoint (https://stockmcp.leoguerin.fr/api/mcp) immediately with no API key, or run the server locally via Docker or Python (uv sync / pip install -e .). Configure MCP clients (Claude Desktop, Cursor, etc.) to point to the endpoint and use tools/list for discovery and tools/call for execution.
Key features of StockMCP
- 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
Use cases of StockMCP
- Retrieving current market data for investment dashboards
- Feeding historical price and fundamental data into AI models
- Automating trading bot decisions with analyst forecasts
- Performing dividend quality analysis for income portfolios
- Generating growth projections for company research reports
FAQ from StockMCP
What data sources does StockMCP use?
It uses Yahoo Finance (yfinance) as the primary data source – free tier with reasonable rate limits. Optionally, Alpha Vantage can be enabled for enhanced earnings estimates; a free API key is required for that feature.
Does StockMCP require an API key?
The hosted endpoint at https://stockmcp.leoguerin.fr/api/mcp requires no API key. When self‑hosting, an Alpha Vantage API key is optional and only needed for extended features; the server falls back gracefully if it’s missing.
How can I run StockMCP locally?
You can run it with Docker (docker build -t stockmcp . && docker run -p 3001:3001 stockmcp) or via Python (uv sync or pip install -e ., then python src/main.py). The server listens on port 3001 by default.
Which MCP clients are supported?
StockMCP works with any MCP‑compatible client. Explicit configurations are provided for Claude Desktop and Cursor.
Where is data stored and what are the transport/auth details?
Data is retrieved in real‑time from Yahoo Finance and optionally Alpha Vantage; no data is stored locally unless you add caching. Transport is HTTP with JSON‑RPC 2.0. No authentication is needed for the hosted endpoint; self‑hosted instances can be secured per your infrastructure.
More Finance & Commerce MCP servers
₿itcoin & Lightning Network MCP Server
AbdelStarkBitcoin & Lightning Network MCP Server.
AKShare One MCP Server
zwldarrenMCP server that provides access to Chinese stock market data using akshare-one
Financial Modeling Prep MCP (Model Context Protocol)
imbenrabiA Model Context Protocol (MCP) implementation for Financial Modeling Prep, enabling AI assistants to access and analyze financial data, stock information, company fundamentals, and market insights.
Crypto Indicators MCP Server
kukapayAn MCP server providing a range of cryptocurrency technical analysis indicators and strategies.
Polygon.io MCP Server
polygon-ioAn MCP server for Massive.com Financial Market Data
Comments