- Home
- MCP servers
- Stock Analysis
Stock Analysis
- python
7
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"hasan-syed25-mcp-server-alphavantage": {
"command": "python",
"args": [
"server.py"
],
"env": {
"ALPHA_VANTAGE_API_KEY": "YOUR_API_KEY"
}
}
}
}You have a Python-based MCP Server for Stock Market Analysis. It fetches real-time price data, computes moving averages and RSI, detects trend crossovers, and exposes tools that you can call from an MCP client or an LLM to perform live market analysis. This guide shows you how to install, configure, and run the server so you can query indicators and integrate AI-assisted insights into your trading workflow.
How to use
To use the MCP Server, run it locally and connect your MCP client to execute the available tools. You can fetch intraday data for a symbol, calculate short-term and long-term moving averages, detect trend crossovers such as Golden Cross and Death Cross, and compute RSI to assess momentum. The tools return structured results that you can feed into higher-level analyses or AI prompts for financial decision support.
How to install
Prerequisites: install Python 3.10 or higher, and have an AlphaVantage API key. You will also need an MCP SDK 1.2.0+ and either use uv (recommended) or pip for dependencies.
Step-by-step commands to set up the project locally:
Additional setup details
Create an environment file to store your AlphaVantage API key and prepare your environment for running the server.
ALPHA_VANTAGE_API_KEY=your_api_key_here
Run the MCP Server
Start the server using Python directly or via the MCP tooling for development workflows.
python server.py
mcp dev server.py
Available tools
fetch_intraday_data
Fetches intraday stock price data from AlphaVantage for a given symbol and interval.
calculate_moving_averages
Compute short-term and long-term moving averages from a list of prices.
detect_trend_crossover
Determine if a Golden Cross or Death Cross has occurred based on moving averages.
calculate_rsi
Calculate the Relative Strength Index to measure momentum over a given period.
determine_rsi_condition
Assess RSI value to indicate overbought or oversold conditions.