StockMCP
Enables AI assistants to retrieve real-time US stock market data including prices, company info, financials, and news via MCP tools, using Yahoo Finance as the data source.
README
StockMCP
StockMCP is an MCP (Model Context Protocol) server that allows AI assistants such as Claude Desktop and Cursor to retrieve real-time US stock market information through structured tools.
StockMCP provides stock prices, historical data, company information, market data, and financial news through MCP tools that can be used by Claude Desktop, Cursor, and other MCP-compatible AI clients.
Claude Desktop
│
│ MCP
▼
+----------------------+
| StockMCP |
|----------------------|
| stock_price() |
| stock_history() |
| stock_news() |
| company_info() |
| market_status() |
+----------------------+
│
▼
Yahoo Finance
Features
- Real-time stock prices
- Historical OHLCV data
- Company information
- Market capitalization
- Valuation metrics
- Financial news
- Market overview
- AI-ready MCP tools
Available Tools
| Tool | Description |
|---|---|
stock_price() |
Latest stock price |
stock_history() |
Historical OHLCV data |
stock_info() |
Company information |
stock_news() |
Latest financial news |
market_status() |
Market index information |
Supported AI Clients
| Client | Supported |
|---|---|
| Claude Desktop | ✅ |
| Cursor | ✅ |
| VS Code + MCP | Planned |
| Windsurf | Planned |
Quick Start
Requirements
- Python 3.11+
Dependencies:
- MCP
- yfinance
Clone the Repository
git clone https://github.com/byronguo/StockMCP.git
cd StockMCP
Create Virtual Environment
python -m venv .venv
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
Activate it:
Windows:
.venv\Scripts\activate
macOS/Linux:
source .venv/bin/activate
Install Dependencies
pip install -r requirements.txt
Run StockMCP Server
python server.py
Claude Desktop Configuration
{
"mcpServers": {
"stock": {
"command": "python",
"args": [
"C:\\MCP_Claude\\StockMCP\\server.py"
]
}
}
}
Restart Claude Desktop.
Test

Cursor Configuration
Same configuration as Claude Desktop.
Available Tools
stock_price()company_info()market_cap()pe_ratio()ps_ratio()financials()option_chain()news()
Roadmap
v0.1
- stock server
v0.2
-
refactored architecture
-
company
-
market
-
news
-
[x] Stock price
-
[x] Historical data
-
[x] Company information
-
[x] Market data
-
[x] Stock news
Upcoming:
- [ ] Financial statements
- [ ] Options chain
- [ ] Technical indicators
- [ ] AI stock analysis
Topics
mcp claude cursor stock finance ai python yfinance
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.