Get the FREE Ultimate OpenClaw Setup Guide →

MCP -AlphaVantage

MCP server from Hasan-Syed25/MCP-Server-AlphaVantage

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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:

  1. Install dependencies uv (recommended): uv add mcp[cli] httpx

    Or install via pip: pip install mcp httpx

  2. Obtain AlphaVantage API key:

  3. Clone the repository and set up: git clone https://github.com/your-username/mcp-stock-analysis.git cd mcp-stock-analysis

  4. Configure environment variables Create a .env file (or set in your environment) with: ALPHA_VANTAGE_API_KEY=your_api_key_here

  5. Run the server To start the server directly: python server.py

    Or install and run via MCP: mcp install server.py

  6. 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

Sponsor this space

Reach thousands of developers