-
Notifications
You must be signed in to change notification settings - Fork 0
Setup and Installation
Anupam Sinha edited this page Sep 8, 2026
·
1 revision
- Python 3.10+ (tested on 3.13, macOS/Linux)
- pip
- An MCP client (ZCode, Claude Desktop, etc.)
- Optional: Alpha Vantage API key (free at https://www.alphavantage.co/support/#api-key)
- Optional: MongoDB (for the decision journal; falls back to a local JSON file)
git clone https://github.com/AnupamSinha/stock_market_mcp.git
cd stock_market_mcp
pip install -r requirements.txtDependencies: mcp (the MCP SDK) and yfinance. macOS users: if HTTPS calls fail
with an SSL error, pip install certifi (the server uses it automatically when present).
Create .env in the project root (loaded automatically; real env vars take precedence):
ALPHA_VANTAGE_API_KEY=your_key_here
# Optional overrides:
ALPHA_VANTAGE_BASE_URL=https://www.alphavantage.co/query
MONGODB_URI=mongodb://localhost:27017
MONGODB_DB_NAME=stock_dataEverything except alpha_vantage_overview works with zero configuration.
server.py runs on stdio — you don't start it by hand; your MCP client launches it.
{
"mcp": {
"servers": {
"stock_market_mcp": {
"command": "python3",
"args": ["/absolute/path/to/stock_market_mcp/server.py"]
}
}
}
}- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"stock_market_mcp": {
"command": "python3",
"args": ["/absolute/path/to/stock_market_mcp/server.py"]
}
}
}Restart the client and start a new conversation. Tools appear as mcp__stock_market_mcp__*.
python3 - <<'EOF'
import asyncio, json
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
async def main():
async with stdio_client(StdioServerParameters(command="python3", args=["server.py"])) as (r, w):
async with ClientSession(r, w) as s:
await s.initialize()
print("TOOLS:", [t.name for t in (await s.list_tools()).tools])
print("PROMPTS:", [p.name for p in (await s.list_prompts()).prompts])
asyncio.run(main())
EOFExpected: 11 tool names and ['bull_bear_debate'].
🧠 Maintained by FoodForBrains — educational analysis only, not financial advice.
🧠 FoodForBrains
stock_market_mcp
- Home
- Setup-and-Installation
- Tools-Reference
- Architecture
- APIs-and-Data-Sources
- Decision-Journal
- Backtesting
- TradingAgents-Inspiration
- Troubleshooting
- FAQ
Educational analysis — not financial advice.