Labsco
osamadev logo

Stock Market Tracker

β˜… 1

from osamadev

MCP server for advanced financial analysis, stock monitoring, and real-time market intelligence to support buy/sell decisions

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedAccount requiredAdvanced setup

Financial MCP Server

<p align="center"> <a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fosamadev%2Ffinancial_mcp_server%2Fmain%2Fazuredeploy.json"> <img src="https://aka.ms/deploytoazurebutton" alt="Deploy to Azure" height="40" width="180" /> </a> &nbsp; <a href="https://render.com/deploy?repo=https://github.com/osamadev/financial_mcp_server"> <img src="https://render.com/images/deploy-to-render-button.svg" alt="Deploy to Render" height="40" width="180" /> </a> &nbsp; <a href="https://deploy.cloud.run/?git_repo=https://github.com/osamadev/financial_mcp_server"> <img src="https://deploy.cloud.run/button.svg" alt="Run on Google Cloud" height="40" width="180" /> </a> &nbsp; <a href="https://deploy.workers.cloudflare.com/?url=https://github.com/osamadev/financial_mcp_server/tree/main/cloudflare-worker"> <img src="https://deploy.workers.cloudflare.com/button" alt="Deploy to Cloudflare" height="40" width="180" /> </a> </p> <p align="center"><sub>Azure / Render / GCP Cloud Run host the MCP backend Β· Cloudflare deploys the optional HTTPS proxy</sub></p>

A custom Model Context Protocol (MCP) server for advanced financial analysis, stock monitoring, and real-time market intelligence. This server provides a suite of tools and API endpoints for portfolio management, market summaries, stock alerts, and contextual financial insights, designed for seamless integration with Claude Desktop and other MCP-compatible clients.


Key Features

  • Core Stock Toolkit: Quotes, company overview, and price history tools for practical analysis workflows.
  • Portfolio With Live Values: Maintain a watchlist/positions store and return portfolio-level valuation context.
  • Configurable Price Alerts: Set per-ticker above / below thresholds and evaluate triggered alert events.
  • News + Context Layer: Retrieve market news and optional sentiment-rich context summaries for research workflows.
  • Secure Streamable HTTP: Static bearer (MCP_ACCESS_TOKEN) or OAuth JWT validation (MCP_AUTH_MODE=oauth) for public deployments.
  • Cloud-Ready Deployment: Docker + one-click deploys for Azure Container Apps, Render, Google Cloud Run, and Cloudflare Worker proxy.

System Overview

Core Endpoints & Tools

  • get_stock_quote(ticker: str)
    • Returns normalized live quote data (price, change, market cap, volume, exchange, timestamp).
  • get_price_history(ticker: str, period: str, interval: str)
    • Returns chart-ready OHLCV history points for backtesting and trend analysis.
  • get_company_overview(ticker: str)
    • Returns company profile metadata and key valuation fields when available.
  • get_portfolio()
    • Returns positions/watchlist plus live quote enrichment and portfolio market value summary.
  • add_stock(...) / remove_stock(...)
    • Add or remove symbols in the persistent portfolio store.
  • set_stock_alert(ticker, above=None, below=None) / get_portfolio_alerts(ticker=None)
    • Configure and evaluate price-threshold alerts from portfolio-backed rules.
  • get_stock_news(ticker_or_query, max_results=5) and financial_context(query)
    • Provide raw financial headlines and optional LLM-ready context summaries.

Automated Alerting

  • Telegram Integration: Sends formatted alerts and summaries to a configured Telegram chat.
  • Trading Opportunities: Detects and notifies about actionable trading signals.

Contextual Summarization

  • News Summarizer: Uses configurable LLM backends (ollama, openai, or auto) to generate detailed, sentiment-tagged summaries.
  • Prompt Builder: Constructs a market-aware prompt for use in downstream LLMs or assistants.

File Structure

config/
  alerts_config.json         # Main alert configuration (sector/ticker/thresholds)
  tech_alerts_config.json    # Tech sector-specific alerts
services/
  alerts.py                  # Core alert logic
  tech_alerts.py             # Tech sector alert logic
  telegram_alerts.py         # Telegram integration
  market_summary.py          # Market data and news
  summarizer.py              # News summarization (LLM)
  fetcher.py                 # Web data fetching
  context_builder.py         # Prompt/context construction
  intent_parser.py           # Financial entity extraction
  portfolio.py               # Portfolio management
server.py                    # MCP server entry point and API definitions
requirements.txt             # Python dependencies

Using Your Tools in Claude Desktop

After installing and connecting your custom Financial MCP Server, all available tools will automatically appear in Claude Desktop's tool menu. You can enable or disable each tool individually, making it easy to access functionalities such as financial context analysis, market summaries, portfolio management, and stock alerts directly from the Claude interface.

Below is a screenshot showing how the tools from your MCP server will be listed and toggled in Claude Desktop:

Claude Desktop MCP Tools Example

  • Each tool (e.g., financial_context, market_summary, add_stock, etc.) can be enabled or disabled as needed.
  • This seamless integration allows you to interact with your financial analysis server using natural language and tool-based workflows within Claude Desktop.