AlphaVantage MCP Server
Provides comprehensive market data, fundamental analysis, and technical indicators through the AlphaVantage API. It enables users to fetch financial statements, stock prices, and market news with sentiment analysis for detailed financial research.
README
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)
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 IndexMACD- Moving Average Convergence DivergenceBOLLINGER_BANDS- Bollinger BandsSMA- Simple Moving AverageEMA- Exponential Moving AverageSTOCHASTIC- Stochastic OscillatorADX- Average Directional IndexWILLIAMS_R- Williams %R
Supported timeframes (TimeFrame enum):
MINUTE- 1 minuteFIVE_MINUTES- 5 minutesFIFTEEN_MINUTES- 15 minutesTHIRTY_MINUTES- 30 minutesHOUR- 1 hourDAILY- DailyWEEKLY- WeeklyMONTHLY- 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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。