📈 StockMCP
A comprehensive Model Context Protocol (MCP) server for real-time stock market data using Yahoo Finance
Agenten stärken
Installation vom Herausgeber. Kein PlugMCP-Endpunkt.
Host a copy with our keys and logs.
Noch kein paketiertes Release in der Registry. Folgen Sie der README des Repositorys.
Remote-URL oder ein Befehl auf Ihrem Rechner? Worin sich die beiden Installationen unterscheiden
Auf PlugMCP ausführen
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
StartenVom Herausgeber
A comprehensive Model Context Protocol (MCP) server for real-time stock market data using Yahoo Finance
A Model Context Protocol (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
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# 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
A Model Context Protocol (MCP) server providing real-time stock market data and financial analysis through Yahoo Finance API. Built with FastAPI and designed for AI applications requiring comprehens
Übersicht
A Model Context Protocol (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
Tools
Noch keine Tool-Liste. Remote-Server erhalten eine nach dem ersten Health-Check.
FAQ
Kopieren Sie auf dieser Seite die stdio-Konfiguration für Cursor, Claude Desktop, Claude Code oder VS Code. Sie nutzt die Installation des Herausgebers, keinen PlugMCP-Proxy.
In diesem Eintrag ist keine erforderliche Umgebungsvariable aufgeführt.
StockMCP läuft lokal über stdio.
Zuletzt geprüft: 2026-10-27. A Model Context Protocol (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