Stock-MCP
Enables AI assistants like GitHub Copilot to access live stock market data, company information, technical analysis, news, and portfolio analytics.
README
š 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.
-
Fork the repository
-
Create a new feature branch
git checkout -b feature/new-feature
- Commit your changes
git commit -m "Added new feature"
- Push
git push origin feature/new-feature
- 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
ā Support
If you found this project useful,
please consider giving it a ā on GitHub.
It helps others discover the project and motivates future development.
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.