- Home
- MCP servers
- Stock Research
Stock Research
- python
0
GitHub Stars
python
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"sauravmehto-mcpserverstock": {
"command": "python",
"args": [
"-m",
"mcp_server.main"
],
"env": {
"CLAUDE_API_KEY": "YOUR_KEY",
"TRANSPORT_MODE": "stdio",
"FINNHUB_API_KEY": "YOUR_KEY",
"ALPHA_VANTAGE_API_KEY": "YOUR_KEY"
}
}
}
}You can run a production-grade MCP server for stock intelligence that combines Alpha Vantage and Finnhub data, provides deterministic indicators and scoring, and delivers Claude-driven narrative analysis constrained to computed data. It supports local stdio transport for Claude Desktop usage and remote HTTP transport forRender-backed deployments, enabling flexible, scriptable stock research workflows.
How to use
You run the MCP server locally to chat with Claude via stdio, or remotely via HTTP. In stdio mode, Claude Desktop communicates with the server through a local process, while in HTTP mode you expose endpoints that your clients can call over the network. You will use the server to query stock indicators, metrics, and narratives based on the computed data and trusted data providers.
To use the server with Claude Desktop locally, ensure you set the transport mode to stdio and start the server. For remote usage, configure the transport to HTTP, supply host and port, and run so clients can connect to the endpoints you expose.
How to install
Prerequisites you need before installation: Python 3.11+, a Python virtual environment tool, and internet access to install dependencies.
Step-by-step setup commands you should run in a fresh directory:
python -m venv .venv
. .venv/Scripts/activate
pip install -r requirements.txt
copy .env.example .env
Additional setup notes
You will provide API keys for Claude, Alpha Vantage, and Finnhub. Create or update an environment file with these keys and choose a transport mode according to your deployment target.
Configuration and run guidance
Local development and runtime commands are shown in the following examples. Use the stdio transport for Claude Desktop usage and the HTTP transport for remote usage.
Claude Desktop config demonstrates how to mount the MCP server as a local process with the required environment variables.
{
"mcpServers": {
"stock_research": {
"command": "python",
"args": ["-m", "mcp_server.main"],
"env": {
"TRANSPORT_MODE": "stdio",
"CLAUDE_API_KEY": "YOUR_KEY",
"ALPHA_VANTAGE_API_KEY": "YOUR_KEY",
"FINNHUB_API_KEY": "YOUR_KEY"
}
}
}
}
Run (Claude Desktop local via stdio)
Set the transport to stdio and start the server with the following command.
# Set in your environment or within your launcher
TRANSPORT_MODE=stdio
# Start the MCP server
python -m mcp_server.main
Run (Render remote via HTTP)
For remote HTTP usage, configure the transport to HTTP and specify how you want to stream responses. Then run the server to expose endpoints suitable for SSE or streamable modes.
# Set in your environment
TRANSPORT_MODE=http
HTTP_TRANSPORT=sse # or streamable
HOST=0.0.0.0
PORT=8000
# Start the MCP server
python -m mcp_server.main
Render deployment notes
If you deploy to Render, ensure you provide the transport and host configuration in the environment and use the MCP URL endpoints that correspond to your chosen transport mode.
Tests
Run the test suite to verify indicators, metrics, and scoring logic.
pytest -q
Available tools
stock_research_report
Primary tool for generating stock research reports using integrated data from Alpha Vantage and Finnhub with narrative analysis.
analyze_stock
Tool to analyze a stock using multiple indicators and scoring metrics.
get_price
Fetches the latest price for a given ticker.
get_ohlcv
Retrieves open/high/low/close/volume data for a symbol.
get_technicals
Obtains technical indicators such as RSI and MACD.
get_fundamentals
Gathers fundamental financial data for stocks.
get_news_sentiment
Assesses sentiment from stock-related news.
get_stock_price
Returns current price data for a symbol.
get_quote
Retrieves market quotes for a symbol.
get_company_profile
Fetches company profile details.
get_candles
Provides candlestick data for charting.
get_stock_news
Retrieves latest stock news articles.
get_rsi
Calculates the Relative Strength Index for a symbol.
get_macd
Calculates the MACD indicator.
get_key_financials
Fetches key financial statements and metrics.