How vslsoni/mcp-stock works
This is a command-line stock-query system: a user submits a natural-language request, the client asks Gemini to choose a listed MCP tool, and an MCP server executes the stock lookup or comparison and returns text. The server uses Yahoo Finance in the sampled code; the README also describes local CSV fallback, though that behavior is not present in the server excerpt, so the fallback link is shown as unverified. The graph preserves both documented tools and the main client/server stages.
Main entry points: mcp_client.py MCP session · mcp_server.py MCP tool server · stocks_data.csv Fallback stock data
Components 9
Query client
- Interactive CLI
mcp_client.py - Gemini tool selection
mcp_client.py - MCP session
mcp_client.py
MCP stock service
- MCP tool server
mcp_server.py - Single price tool
mcp_server.py - Price comparison tool
mcp_server.py
Market data
- Yahoo Finance
- Fallback stock data
stocks_data.csv
Other components
- Querying user
Connections 12
- Querying user → Interactive CLI: submits query
mcp_client.py - Interactive CLI → MCP session: starts session
mcp_client.py - MCP session → MCP tool server: lists tools
mcp_client.py - MCP session → Gemini tool selection: requests selection
mcp_client.py - Gemini tool selection → MCP session: returns tool choice
mcp_client.py - MCP session → MCP tool server: calls selected tool
mcp_client.py - MCP tool server → Single price tool: registers tool
mcp_server.py - MCP tool server → Price comparison tool: registers tool
mcp_server.py - Single price tool → Yahoo Finance: fetches price
mcp_server.py - Price comparison tool → Yahoo Finance: fetches prices
mcp_server.py - Single price tool → Fallback stock data: falls back to
README.md - Price comparison tool → Fallback stock data: falls back to
README.md