Skip to main content
Glama
Madhan-2096

Stock-MCP

by Madhan-2096

πŸ“ˆ Stock-MCP

AI-Powered Stock Market MCP Server for GitHub Copilot

A production-ready Model Context Protocol (MCP) Server built with Python and FastMCP that enables GitHub Copilot Agent Mode to access live stock market data, company information, technical analysis, news, and portfolio analytics through intelligent AI tool calling.


πŸš€ Overview

Stock-MCP transforms GitHub Copilot into an intelligent financial assistant by exposing stock market capabilities as MCP tools.

Instead of relying on static knowledge, Copilot can invoke this server to fetch live financial information and perform real-time analysis.

Example:

User: What is the current stock price of Apple?

↓

GitHub Copilot

↓

MCP Server

↓

Yahoo Finance

↓

Live Price Returned

↓

Copilot explains the result.


✨ Features

  • πŸ“Š Live Stock Price Lookup

  • 🏒 Company Information

  • πŸ“° Latest Financial News

  • πŸ“ˆ Technical Analysis

  • πŸ’Ό Portfolio Valuation

  • πŸ“‰ Portfolio Performance Analysis

  • ⚑ FastMCP-based Tool Registration

  • πŸ€– GitHub Copilot Agent Mode Integration

  • 🐍 Pure Python Implementation

  • πŸ”§ Easily Extendable Architecture


πŸ— Architecture

                    User
                      β”‚
                      β–Ό
            GitHub Copilot Agent
                      β”‚
             Model Context Protocol
                      β”‚
                      β–Ό
              Stock-MCP Server
                      β”‚
      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β”‚               β”‚                β”‚
      β–Ό               β–Ό                β–Ό
 Stock Tool      Company Tool      News Tool
      β”‚               β”‚                β”‚
      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      β”‚
               Yahoo Finance API

πŸ“‚ Project Structure

Stock-MCP/

β”œβ”€β”€ server.py
β”œβ”€β”€ mcp_app.py
β”œβ”€β”€ mcp.json
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ README.md
β”‚
β”œβ”€β”€ tools/
β”‚   β”œβ”€β”€ ping.py
β”‚   β”œβ”€β”€ stock.py
β”‚   β”œβ”€β”€ company.py
β”‚   β”œβ”€β”€ news.py
β”‚   β”œβ”€β”€ technical.py
β”‚   β”œβ”€β”€ portfolio.py
β”‚   └── prediction.py
β”‚
β”œβ”€β”€ services/
β”œβ”€β”€ utils/
β”œβ”€β”€ models/
β”œβ”€β”€ config/
└── tests/

πŸ›  Tech Stack

Technology

Purpose

Python 3.12+

Backend

FastMCP

MCP Framework

MCP SDK

Protocol Support

yfinance

Stock Data

Pandas

Data Processing

NumPy

Numerical Computing

TA

Technical Indicators

Pydantic

Validation

GitHub Copilot

MCP Client


πŸ“¦ Installation

Clone the repository

git clone https://github.com/Madhan-2096/Stock-MCP.git

cd Stock-MCP

Create a virtual environment

python -m venv .venv

Activate it

Windows

.venv\Scripts\activate

Linux / macOS

source .venv/bin/activate

Install dependencies

pip install -r requirements.txt

β–Ά Running the MCP Server

python server.py

Expected Output

Starting MCP Server...

Transport: stdio

Waiting for requests...

πŸ”— Connecting with GitHub Copilot

Create an mcp.json configuration.

Example:

{
  "servers": {
    "stock-market-assistant": {
      "command": "python",
      "args": [
        "server.py"
      ]
    }
  }
}

Reload GitHub Copilot Agent Mode.

Your tools will automatically become available.


🧰 Available MCP Tools

Tool

Description

ping

Health check

get_stock_price

Get latest stock price

get_company_info

Company fundamentals

get_stock_news

Latest market news

technical_analysis

RSI, SMA, EMA, MACD

calculate_portfolio_value

Portfolio valuation

get_portfolio_performance

Portfolio return analysis


πŸ’¬ Example Prompts

Get Stock Price

What is the current price of AAPL?

Company Information

Tell me about Microsoft.

Technical Analysis

Perform technical analysis for TSLA.

News

Show today's news about NVIDIA.

Portfolio

Calculate my portfolio.

AAPL - 10

MSFT - 5

GOOGL - 8

πŸ“Š Current Capabilities

βœ… Live Stock Prices

βœ… Company Information

βœ… Technical Indicators

βœ… Financial News

βœ… Portfolio Valuation

βœ… Portfolio Performance

βœ… GitHub Copilot Integration


🚧 Roadmap

  • Real-Time WebSocket Stock Streaming

  • AI Investment Recommendations

  • Sentiment Analysis

  • Candlestick Pattern Detection

  • Portfolio Optimization

  • Stock Comparison Tool

  • PDF Report Generator

  • Alpha Vantage Integration

  • Finnhub Integration

  • Docker Support

  • GitHub Actions CI/CD


🀝 Contributing

Contributions are welcome.

  1. Fork the repository

  2. Create a new feature branch

git checkout -b feature/new-feature
  1. Commit your changes

git commit -m "Added new feature"
  1. Push

git push origin feature/new-feature
  1. Open a Pull Request


πŸ“œ License

This project is licensed under the MIT License.


πŸ‘¨β€πŸ’» Author

Madhan J R

B.Tech Artificial Intelligence & Data Science

Meenakshi Sundararajan Engineering College

GitHub: https://github.com/Madhan-2096


Related MCP server: Tapetide MCP Server

⭐ Support

If you found this project useful,

please consider giving it a ⭐ on GitHub.

It helps others discover the project and motivates future development.


F
license - not found
-
quality - not tested
C
maintenance

Maintenance

–Maintainers
–Response time
–Release cycle
–Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    C
    maintenance
    Connects AI assistants to real-time Indian stock market data with 34 tools for search, screening, analysis, portfolio tracking, and market insights across all NSE and BSE stocks.
    Last updated
    102
    55
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    Enables AI assistants to access real-time Japanese and global stock market data, including quotes, charts, technical analysis, and market screening.
    Last updated
    14
    MIT

View all related MCP servers

Related MCP Connectors

  • Provide AI assistants with real-time access to official SEC EDGAR filings and financial data. Enab…

  • Global stock research, ML forecasts, valuation signals, screeners & portfolio tracking in Claude

  • Build, backtest, and deploy quantitative trading strategies from your AI agent.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Madhan-2096/Stock-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server