AlphaVantage MCP server

Bridges AlphaVantage's financial data ecosystem by providing real-time access to stock market, forex, cryptocurrency, and fundamental financial metrics for data-driven investment research and analysis.
Back to servers
Setup instructions
Provider
lifejwang11
Release date
Mar 26, 2025
Language
Python

The AlphaVantage MCP Server is a wrapper for the AlphaVantage financial data API service that follows the Model Control Protocol (MCP) framework. It provides access to real-time and historical financial market data including stocks, forex, cryptocurrencies, technical indicators, and fundamental data through a standardized interface.

Installation Options

Using Smithery

The quickest way to install AlphaVantage MCP Server is via Smithery:

npx -y @smithery/cli install @lifejwang11/alphavantage-mcp

Manual Installation

Prerequisites

  • Python 3.12
  • pip package manager

Step-by-Step Installation

  1. Clone the repository:
git clone https://github.com/lifejwang11/alphavantage-mcp
cd alphavantage-mcp
  1. Create and activate a virtual environment:

For Unix/macOS:

python -m venv venv
source venv/bin/activate

For Windows:

python -m venv venv
.\venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Configure your API key as an environment variable:
export ALPHAVANTAGE_API_KEY=your_api_key
  1. Start the server:
python main.py

Using the AlphaVantage MCP Server

Getting an API Key

Before using the server, you need to obtain an API key:

  1. Visit AlphaVantage website
  2. Register for an account
  3. Generate your API key

Available Financial Data

The server provides access to:

  • Stock Market Data: Real-time quotes, historical price data, company information
  • Technical Indicators: Moving averages, RSI, MACD, and more
  • Fundamental Data: Financial statements, earnings reports, company overviews
  • Forex Data: Currency exchange rates
  • Cryptocurrency Data: Digital currency pricing and volume

Usage Notes

  • Be aware of AlphaVantage's API rate limits for your key tier
  • Premium API keys provide higher rate limits for production environments
  • Store your API key securely and never expose it in public repositories
  • Make service calls through the MCP protocol according to the interface specifications

Making API Requests

Once the server is running, you can access financial data via MCP protocol with structured requests. The server will handle authentication with your AlphaVantage API key and return formatted responses.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "alphavantage-mcp" '{"command":"python","args":["main.py"],"env":{"ALPHAVANTAGE_API_KEY":"${ALPHAVANTAGE_API_KEY}"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "alphavantage-mcp": {
            "command": "python",
            "args": [
                "main.py"
            ],
            "env": {
                "ALPHAVANTAGE_API_KEY": "${ALPHAVANTAGE_API_KEY}"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "alphavantage-mcp": {
            "command": "python",
            "args": [
                "main.py"
            ],
            "env": {
                "ALPHAVANTAGE_API_KEY": "${ALPHAVANTAGE_API_KEY}"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later