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.

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