Skip to main content
Glama
AlphaVantage MCP Server

AlphaVantage MCP Server

AlphaVantage MCP Server

A Model Context Protocol (MCP) server that provides comprehensive market data and fundamental analysis through the AlphaVantage API. Designed for integration with Claude Desktop and other MCP-compatible clients.

Requirements

  • Python 3.10 - 3.12

  • uv package manager

  • AlphaVantage API key (get one free)

Related MCP server: Stocks MCP Server

Installation

# Clone the repository
git clone <repo-url>
cd alphavantage_mcp

# Install dependencies
uv sync

Configuration

Set your AlphaVantage API key as an environment variable:

# macOS/Linux
export ALPHA_VANTAGE_API_KEY=your_key_here

# Windows (Command Prompt)
set ALPHA_VANTAGE_API_KEY=your_key_here

# Windows (PowerShell)
$env:ALPHA_VANTAGE_API_KEY="your_key_here"

Or create a .env file in the project directory:

ALPHA_VANTAGE_API_KEY=your_alphavantage_api_key

Server Configuration (Optional)

Variable

Description

Default

ALPHAVANTAGE_DEBUG

Enable debug mode

false

ALPHAVANTAGE_PORT

Server port

8002

ALPHAVANTAGE_LOG_LEVEL

Log level (DEBUG, INFO, WARNING, ERROR)

INFO

Running the Server

# Direct execution
uv run alphavantage-mcp-server

# Using launch script (macOS/Linux)
./launch-alphavantage.sh

# Using launch script (Windows)
launch-alphavantage.bat

Usage with Claude Desktop

Add to your Claude Desktop configuration file:

Platform

Config Location

macOS

~/Library/Application Support/Claude/claude_desktop_config.json

Windows

%APPDATA%\Claude\claude_desktop_config.json

Linux

~/.config/Claude/claude_desktop_config.json

Option 1: Using launch script (recommended)

{
  "mcpServers": {
    "alphavantage-data": {
      "command": "/path/to/alphavantage_mcp/launch-alphavantage.sh",
      "env": {
        "ALPHA_VANTAGE_API_KEY": "your_key"
      }
    }
  }
}

Option 2: Using absolute path to uv

First, find your uv path: which uv

{
  "mcpServers": {
    "alphavantage-data": {
      "command": "/Users/yourname/.local/bin/uv",
      "args": ["run", "alphavantage-mcp-server"],
      "cwd": "/path/to/alphavantage_mcp",
      "env": {
        "ALPHA_VANTAGE_API_KEY": "your_key"
      }
    }
  }
}

Note: GUI applications like Claude Desktop don't inherit your shell's PATH, so using absolute paths is more reliable than relying on uv being in PATH.

On Windows, use backslashes: "cwd": "C:\\path\\to\\alphavantage_mcp"

Available Tools

Fundamental Data

Tool

Description

Parameters

get_company_overview

Company fundamentals including PE ratio, market cap, EPS, margins, and more

symbol

get_income_statement

Annual income statement data (last 20 periods)

symbol

get_balance_sheet

Annual balance sheet data (last 20 periods)

symbol

get_cash_flow

Annual cash flow statements (last 20 periods)

symbol

get_earnings

Quarterly or annual earnings data

symbol, period (quarterly/annual)

Market Data

Tool

Description

Parameters

get_daily_prices

Daily OHLCV data

symbol, outputsize (compact=100 days, full=20+ years)

get_intraday_prices

Intraday price data

symbol, timeframe (TimeFrame enum), outputsize

News & Sentiment

Tool

Description

Parameters

get_market_news

Market news with sentiment analysis

tickers (list), topics (list), time_from, time_to, limit

Technical Analysis

Tool

Description

Parameters

get_technical_indicators

Calculate technical indicators

symbol, indicator (TechnicalIndicator enum), timeframe (TimeFrame enum), time_period

Supported indicators (TechnicalIndicator enum):

  • RSI - Relative Strength Index

  • MACD - Moving Average Convergence Divergence

  • BOLLINGER_BANDS - Bollinger Bands

  • SMA - Simple Moving Average

  • EMA - Exponential Moving Average

  • STOCHASTIC - Stochastic Oscillator

  • ADX - Average Directional Index

  • WILLIAMS_R - Williams %R

Supported timeframes (TimeFrame enum):

  • MINUTE - 1 minute

  • FIVE_MINUTES - 5 minutes

  • FIFTEEN_MINUTES - 15 minutes

  • THIRTY_MINUTES - 30 minutes

  • HOUR - 1 hour

  • DAILY - Daily

  • WEEKLY - Weekly

  • MONTHLY - Monthly

Examples

Get company fundamentals:

"Get the company overview for AAPL"

Analyze price trends:

"Show me the daily prices for TSLA over the last 100 days"

Technical analysis:

"Calculate the RSI for MSFT with a 14-day period"

Market news:

"Get recent news about NVDA with sentiment analysis"

Development

# Install with dev dependencies
uv sync --extra dev

# Run the server directly
uv run alphavantage-mcp-server

# Run tests
uv run pytest

# Type checking
uv run mypy .

# Format code
uv run black .

API Rate Limits

The free AlphaVantage API tier allows 25 requests per day. Consider upgrading to a premium plan for higher limits.

Security Notes

  • Never commit API keys to version control

  • Use environment variables or secure secret management for API keys

  • The server validates all inputs to prevent injection attacks

Available Tools

9 tools
get_balance_sheetB

Get company balance sheet data.

        Args:
            symbol: Stock symbol to get balance sheet for (e.g., AAPL, MSFT)
        

Inputs: symbol (required). Returns: Base MCP response.

get_cash_flowB

Get company cash flow statement data.

        Args:
            symbol: Stock symbol to get cash flow for (e.g., AAPL, MSFT)
        

Inputs: symbol (required). Returns: Base MCP response.

get_company_overviewC

Get company fundamentals and overview.

        Args:
            symbol: Stock symbol to get overview for (e.g., AAPL, MSFT)
        

Inputs: symbol (required). Returns: Response for company data request.

get_daily_pricesB

Get daily OHLCV data.

        Args:
            symbol: Stock symbol (e.g., AAPL, MSFT)
            outputsize: 'compact' (last 100 days) or 'full' (20+ years)
        

Inputs: symbol (required), outputsize. Returns: Response for bars request.

get_earningsB

Get quarterly or annual earnings data.

        Args:
            symbol: Stock symbol to get earnings for (e.g., AAPL, MSFT)
            period: 'quarterly' or 'annual' (default: quarterly)
        

Inputs: symbol (required), period. Returns: Base MCP response.

get_income_statementC

Get company income statement data.

        Args:
            symbol: Stock symbol to get income statement for (e.g., AAPL, MSFT)
        

Inputs: symbol (required). Returns: Base MCP response.

get_intraday_pricesB

Get intraday price data.

        Args:
            symbol: Stock symbol (e.g., AAPL, MSFT)
            timeframe: Time frame (MINUTE, FIVE_MINUTES, FIFTEEN_MINUTES, THIRTY_MINUTES, HOUR)
            outputsize: 'compact' (last 100 data points) or 'full' (30+ days)
        

Inputs: symbol (required), timeframe, outputsize. Returns: Response for bars request.

get_market_newsB

Get latest market news and sentiment.

        Args:
            tickers: List of stock symbols (e.g., ["AAPL", "MSFT"])
            topics: List of topics (e.g., ["technology", "earnings"])
            time_from: Start time in YYYYMMDDTHHMM format
            time_to: End time in YYYYMMDDTHHMM format
            limit: Maximum number of articles to return (1-50, default: 10)
        

Inputs: tickers, topics, time_from, time_to, +1 more. Returns: Response for news request.

get_technical_indicatorsB

Get technical indicators (RSI, MACD, Bollinger Bands, etc.).

        Args:
            symbol: Stock symbol (e.g., AAPL, MSFT)
            indicator: Technical indicator (RSI, MACD, BBANDS, SMA, EMA, STOCH, ADX, WILLR)
            timeframe: Time frame for the data (MINUTE, FIVE_MINUTES, FIFTEEN_MINUTES, THIRTY_MINUTES, HOUR, DAILY, WEEKLY, MONTHLY)
            time_period: Time period for the indicator calculation (default: 14)
        

Inputs: symbol (required), indicator (required), timeframe, time_period. Returns: Response for technical indicator request.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific financial data types (balance sheet, cash flow, prices, news, indicators). The descriptions clearly differentiate between financial statements, price data, news, and technical analysis, with no overlapping functionality that would cause confusion.

    Naming Consistency5/5

    All tools follow a consistent 'get_[resource]' naming pattern with snake_case throughout. The pattern is predictable and readable, making it easy to understand what each tool retrieves without examining descriptions.

    Tool Count5/5

    With 9 tools, this server is well-scoped for financial data retrieval. Each tool serves a distinct purpose in the AlphaVantage domain, covering financial statements, price data, news, and technical indicators without being overwhelming or sparse.

    Completeness4/5

    The toolset provides comprehensive coverage for financial data retrieval including statements, price data, news, and technical indicators. Minor gaps might include portfolio management or trading operations, but for a data-focused server, it covers the core financial analysis workflows effectively.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Provides comprehensive financial market data and news through the Finnhub API. Enables real-time stock quotes, company profiles, financial metrics, analyst recommendations, and market news access.
      1
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides real-time access to financial market data including stock quotes, company information, cryptocurrency exchange rates, historical options chains, and time series data through the Alpha Vantage API.
      -
    • A
      license
      C
      quality
      D
      maintenance
      Provides access to real-time and historical stock market data through the Alpha Vantage API, enabling financial analysis and market data queries through natural language.
      100
      25 PyPI
      74
      Apache 2.0
    • F
      license
      Not graded
      quality
      C
      maintenance
      Provides comprehensive stock intelligence and technical analysis by integrating Alpha Vantage and Finnhub data. It enables users to generate detailed research reports and retrieve real-time market metrics, indicators, and news sentiment.
      -