Stock Market Real-Time Analyzer

Stock Market Real-Time Analyzer

An MCP server that provides real-time stock market data and price comparisons from Yahoo Finance, Alpha Vantage, and Finnhub. It enables AI assistants to fetch individual quotes, compare data across multiple sources, and retrieve market metrics for various tickers.

Category
Visit Server

README

šŸ“ˆ Stock Market Real-Time Analyzer

A comprehensive Python tool for fetching and analyzing real-time stock market data from multiple public APIs. Features include a command-line interface, web dashboards, and an MCP (Model Context Protocol) server for AI assistant integration.

✨ Features

  • Multi-Source Data Fetching: Get stock data from Yahoo Finance, Alpha Vantage, and Finnhub
  • Real-Time Analysis: Compare prices across different sources
  • Multiple Interfaces:
    • Command-line tool
    • Web dashboard (Flask)
    • Standalone HTML dashboard
    • Streamlit dashboard
    • MCP server for AI assistants (Claude, Kiro)
  • Comprehensive Data: Price, change, volume, market cap, day high/low, and more
  • Easy Integration: Works with Claude Desktop and other MCP-compatible clients

šŸš€ Quick Start

Installation

# Clone the repository
git clone https://github.com/YOUR_USERNAME/stock-market-analyzer.git
cd stock-market-analyzer

# Install dependencies
pip install -r requirements.txt

Basic Usage

Command Line:

python main.py AAPL GOOGL MSFT

Standalone Dashboard:

open standalone_dashboard.html

Web Dashboard:

python web_dashboard.py
# Open http://127.0.0.1:8080

šŸ”‘ API Keys (Optional)

Yahoo Finance works without API keys. For additional sources:

  1. Copy .env.example to .env
  2. Add your API keys:
cp .env.example .env
# Edit .env and add your keys

šŸ¤– MCP Server Integration

Use this tool with AI assistants like Claude Desktop or Kiro.

Setup for Claude Desktop

  1. Run the setup script:
./setup_claude_desktop.sh
  1. Restart Claude Desktop

  2. Ask Claude: "Get the stock price for AAPL"

See CLAUDE_DESKTOP_SETUP.md for detailed instructions.

Setup for Kiro

The MCP server is pre-configured in .kiro/settings/mcp.json. Just restart Kiro and ask:

  • "Get the stock price for AAPL"
  • "Compare TSLA across all sources"

šŸ“Š Available Tools

Command Line

# Single stock
python main.py AAPL

# Multiple stocks
python main.py AAPL GOOGL MSFT TSLA

# Interactive mode
python main.py

MCP Server Tools

When integrated with AI assistants, you get access to:

  1. get_stock_quote - Get quote from specific sources
  2. compare_stock_sources - Compare data across all sources
  3. get_best_quote - Get most reliable quote
  4. get_multiple_quotes - Get quotes for multiple symbols

šŸ—ļø Project Structure

.
ā”œā”€ā”€ analyzer.py              # Core analysis logic
ā”œā”€ā”€ data_sources.py          # API integrations
ā”œā”€ā”€ config.py                # Configuration management
ā”œā”€ā”€ main.py                  # CLI interface
ā”œā”€ā”€ mcp_server.py            # MCP server for AI integration
ā”œā”€ā”€ web_dashboard.py         # Flask web server
ā”œā”€ā”€ dashboard.py             # Streamlit dashboard
ā”œā”€ā”€ standalone_dashboard.html # Browser-only version
ā”œā”€ā”€ templates/
│   └── index.html           # Web dashboard UI
ā”œā”€ā”€ .kiro/settings/
│   └── mcp.json             # Kiro MCP configuration
└── requirements.txt         # Python dependencies

šŸ“– Documentation

šŸ”§ Requirements

  • Python 3.9+
  • Internet connection for API access
  • Optional: API keys for Alpha Vantage and Finnhub

šŸ“¦ Dependencies

  • requests - HTTP requests
  • pandas - Data manipulation
  • yfinance - Yahoo Finance API
  • python-dotenv - Environment variables
  • flask - Web dashboard (optional)
  • streamlit - Streamlit dashboard (optional)
  • mcp - Model Context Protocol server

šŸŽÆ Use Cases

  • Real-time stock monitoring - Track multiple stocks simultaneously
  • Price comparison - Verify prices across different data sources
  • AI assistant integration - Ask AI for stock data in natural language
  • Data analysis - Export data for further analysis
  • Portfolio tracking - Monitor your investments

šŸ¤ Contributing

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest new features
  • Submit pull requests
  • Improve documentation

šŸ“ License

MIT License - feel free to use this project for personal or commercial purposes.

šŸ™ Acknowledgments

šŸ“§ Contact

For questions or support, please open an issue on GitHub.

āš ļø Disclaimer

This tool is for informational purposes only. Stock market data may be delayed. Always verify information before making investment decisions. Not financial advice.


Made with ā¤ļø for stock market enthusiasts and AI developers

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured