StockMCP

by leogue

344 downloads
Not rated
GitHub

About

A MCP server providing real-time stock market data and financial analysis through Yahoo Finance API. Built with FastAPI and designed for AI applications requiring comprehensive financial data access

Details

Author
leogue
Downloads
344
Categories
Finance

- Real‑time quotes, fundamentals, and historical OHLCV data
- Dividend analysis with quality metrics and consistency scoring
- Analyst forecasts (price targets, consensus ratings, EPS)
- Forward growth projections (revenue, EPS, FCF with CAGR)
- Optional Alpha Vantage integration for enhanced earnings estimates
- Docker‑ready and supports custom port mapping

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name StockMCP
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

You can use the free hosted endpoint (https://stockmcp.leoguerin.fr/api/mcp) immediately with no API key, or run the server locally via Docker or Python (uv sync / pip install -e .). Configure MCP clients (Claude Desktop, Cursor, etc.) to point to the endpoint and use tools/list for discovery and tools/call for execution.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "stockmcp": {
            "stock-mcp": {
                "command": "npx",
                "args": [
                    "mcp-remote",
                    "https://stockmcp.leoguerin.fr/api/mcp",
                    "--header",
                    "--allow-http"
                ]
            }
        }
    }
}

McpServers

{
    "stock-mcp": {
        "command": "npx",
        "args": [
            "mcp-remote",
            "https://stockmcp.leoguerin.fr/api/mcp",
            "--header",
            "--allow-http"
        ]
    }
}

📈 StockMCP

> A comprehensive Model Context Protocol (MCP) server for real-time stock market data using Yahoo Finance Python 3.10+ FastAPI License: MIT Tests StockMCP provides a powerful, JSON-RPC 2.0 compliant interface for accessing comprehensive stock market data, built on the Model Context Protocol standard. Perfect for AI applications, financial analysis tools, and trading bots.

🌐 Free Hosted Endpoint

Use StockMCP immediately without any setup! We provide a free hosted endpoint at: - Endpoint: https://stockmcp.leoguerin.fr/api/mcp - No API key required - Just add to your MCP client configuration

Claude Desktop Configuration

For immediate access, use this configuration in your claude_desktop_config.json: ``json { "mcpServers": { "stock-mcp": { "command": "npx", "args": [ "mcp-remote", "https://stockmcp.leoguerin.fr/api/mcp", "--header", "--allow-http" ] } } } ` Configuration file locations: - macOS: ~/Library/Application Support/Claude/claude_desktop_config.json - Windows: %APPDATA%\\Claude\\claude_desktop_config.json

🛠️ Available Tools

| Tool Name | Description | |-----------|-------------| |
get_realtime_quote | Retrieve current market data including price, volume, market cap, and key financial ratios | | get_fundamentals | Access comprehensive financial statements (income, balance sheet, cash flow) and calculated ratios | | get_price_history | Get historical OHLCV data with optional total return calculation including reinvested dividends | | get_dividends_and_actions | Analyze dividend payment history and corporate actions with quality metrics and consistency scoring | | get_analyst_forecasts | Get analyst price targets, consensus ratings (Buy/Hold/Sell), and EPS forecasts from professional analysts | | get_growth_projections | Forward growth projections for revenue, earnings (EPS), and free cash flow with 1-year, 3-year, and 5-year CAGR estimates |

🚀 Quick Start

API Key Setup

1. Get a free Alpha Vantage API key: Visit https://www.alphavantage.co/support/#api-key 2. Configure environment:
`bash # Copy the example environment file cp .env.example .env # Edit .env and add your API key ALPHAVANTAGE_KEY=your-actual-api-key-here `

Using Docker (Recommended)

``bash
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.