MCP -AlphaVantage
MCP server from Hasan-Syed25/MCP-Server-AlphaVantage
claude mcp add --transport stdio hasan-syed25-mcp-server-alphavantage python server.py \ --env ALPHA_VANTAGE_API_KEY="your_api_key_here"
How to use
This MCP server provides stock market analysis capabilities by integrating real-time stock data from AlphaVantage and exposing a set of tools for AI-assisted analysis. You can fetch intraday price data, compute moving averages to identify trends, detect trend crossovers such as Golden Cross and Death Cross, and calculate RSI to gauge momentum and potential overbought or oversold conditions. These tools are designed to be invoked by an LLM or an external client through the MCP interface to streamline data-driven decision making in stock market analysis.
How to install
Prerequisites:
- Python 3.10+ installed
- MCP SDK 1.2.0+ installed
- AlphaVantage API key (sign up at AlphaVantage)
- Basic understanding of Python and stock market indicators
Installation steps:
-
Install dependencies uv (recommended): uv add mcp[cli] httpx
Or install via pip: pip install mcp httpx
-
Obtain AlphaVantage API key:
- Sign up at https://www.alphavantage.co
- Save your API key for later use
-
Clone the repository and set up: git clone https://github.com/your-username/mcp-stock-analysis.git cd mcp-stock-analysis
-
Configure environment variables Create a .env file (or set in your environment) with: ALPHA_VANTAGE_API_KEY=your_api_key_here
-
Run the server To start the server directly: python server.py
Or install and run via MCP: mcp install server.py
-
Development mode (optional): mcp dev server.py
Additional notes
Tips and notes:
- Ensure ALPHA_VANTAGE_API_KEY is set in the environment where the server runs; the tools rely on this key to fetch data from AlphaVantage.
- The server exposes tools for intraday data fetching, moving average calculations, trend crossover detection, and RSI assessment. You can integrate these tools with LLM prompts to fetch data and interpret indicators in real time.
- AlphaVantage API has rate limits. Plan requests accordingly and consider caching or batching requests in your client/LLM workflow.
- If you modify the server or environment, restart the MCP server to pick up changes.
- If using with a production LLM, monitor API key usage and implement error handling for API rate limits and timeouts.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP