MCP Stocks Analyzer
Provides real-time stock data, news, company fundamentals, and technical indicators for AI assistants via the Model Context Protocol.
README
MCP Stocks Analyzer
A simple and efficient Model Context Protocol (MCP) server for financial analysis. This tool provides real-time stock data and news aggregation for AI assistants.
Features
- News: Fetch stock news from Google News.
- Prices: Get historical OHLCV data from Yahoo Finance.
- Company info: Read fundamentals and profile data.
- Technical indicators: Compute trend, momentum, volatility, and volume signals.
- MCP-ready: Designed to plug into AI assistants.
Installation
-
Clone the repository:
git clone https://github.com/vashishtavarma/mcp-stocks-analyzer.git cd mcp-stocks-analyzer -
Create and activate a virtual environment:
python -m venv venv # On Windows: venv\Scripts\activate # On macOS/Linux: source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt
Usage
-
Start the MCP server:
python main.py -
Use the available tools from your MCP client:
get_news_from_google(ticker, region='IN', period='7d')get_stock_price(symbol, period, interval)get_company_info(symbol)get_technical_indicators(symbol, period='6mo', interval='1d')
Project Structure
main.py: MCP server entry point that registers tools.src/news.py: News fetching tool.src/price.py: Price history tool.src/company.py: Company info tool.src/indicators.py: Technical indicators tool.
Claude Desktop Setup
To integrate MCP Stocks Analyzer with Claude Desktop, follow these steps:
-
Locate the Configuration File:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- Windows:
-
Add the Server Configuration: Insert the following JSON snippet into the
mcpServersobject in the configuration file:{ "mcpServers": { "stock-analyzer": { "command": "<path>/mcp-stocks-analyzer/venv/bin/python", "args": [ "<path>/mcp-stocks-analyzer/main.py" ] } } }Note for Windows users: Adjust the python path to
...\\venv\\Scripts\\python.exeand use backslashes.Important: Replace
<path>with the absolute path to your project directory. -
Restart Claude Desktop: Restart the application to apply the changes. The MCP Stocks Analyzer tools will now be available in Claude Desktop.
License
This project is licensed under the MIT License. See the LICENSE file for details.
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.