This MCP server provides a powerful interface for accessing financial market data from the Alpha Vantage API, offering real-time stock quotes, detailed company information, and various financial data endpoints through a standardized protocol.
cd alpha-vantage-mcp
docker build -t mcp/alpha-vantage .
claude_desktop_config.json file:Location:
~/Library/Application\ Support/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.jsonAdd the following configuration, replacing REPLACE_API_KEY with your Alpha Vantage API key:
{
"mcpServers": {
"alphavantage": {
"command": "docker",
"args": [
"run",
"-i",
"-e",
"ALPHA_VANTAGE_API_KEY",
"mcp/alpha-vantage"
],
"env": {
"ALPHA_VANTAGE_API_KEY": "REPLACE_API_KEY"
}
}
}
}
For an automated installation via Smithery:
npx -y @smithery/cli install @berlinbra/alpha-vantage-mcp --client claude
uv install -e .
uv run src/alpha_vantage_mcp/server.py
With inspector:
npx @modelcontextprotocol/inspector uv --directory /Users/{INSERT_USER}/YOUR/PATH/TO/alpha-vantage-mcp run src/alpha_vantage_mcp/server.py
Retrieves the latest stock quote for a specific company.
Input:
{
"symbol": "AAPL"
}
Example Response:
Stock quote for AAPL:
Price: $198.50
Change: $2.50 (+1.25%)
Volume: 58942301
High: $199.62
Low: $197.20
Retrieves detailed company information for a given symbol.
Input:
{
"symbol": "AAPL"
}
Example Response:
Company information for AAPL:
Name: Apple Inc
Sector: Technology
Industry: Consumer Electronics
Market Cap: $3000000000000
Description: Apple Inc. designs, manufactures, and markets smartphones...
Exchange: NASDAQ
Currency: USD
Retrieves real-time cryptocurrency exchange rates with additional market data.
Input:
{
"crypto_symbol": "BTC",
"market": "USD"
}
Example Response:
Cryptocurrency exchange rate for BTC/USD:
From: Bitcoin (BTC)
To: United States Dollar (USD)
Exchange Rate: 43521.45000
Last Updated: 2024-12-17 19:45:00 UTC
Bid Price: 43521.00000
Ask Price: 43522.00000
Retrieves daily time series (OHLCV) data with optional date filtering.
Input:
{
"symbol": "AAPL",
"outputsize": "compact",
"limit": 5
}
Example Response:
Time Series Data for AAPL (Last Refreshed: 2024-12-17 16:00:00):
(Showing 5 most recent data points)
Date: 2024-12-16
Open: $195.09
High: $197.68
Low: $194.83
Close: $197.57
Volume: 55,751,011
---
Date: 2024-12-13
Open: $194.50
High: $196.25
Low: $193.80
Close: $195.12
Volume: 48,320,567
---
Retrieves real-time options chain data with Greeks and implied volatility.
⚠️ PREMIUM SUBSCRIPTION REQUIRED: This endpoint requires Alpha Vantage Premium with either the 600 requests/minute or 1200 requests/minute plan.
Input:
{
"symbol": "AAPL",
"require_greeks": true
}
Retrieves historical options chain data with advanced filtering and sorting capabilities.
Input:
{
"symbol": "AAPL",
"min_strike": 190,
"max_strike": 200,
"contract_type": "call",
"sort_by": "strike"
}
Retrieves comprehensive ETF profile information including holdings and sector allocation.
Input:
{
"symbol": "QQQ"
}
Retrieves cryptocurrency time series data at different intervals.
Input:
{
"symbol": "SOL",
"market": "USD"
}
Retrieves upcoming earnings calendar data for companies.
Input:
{
"horizon": "3month",
"limit": 10
}
Retrieves historical earnings data for a specific company.
Input:
{
"symbol": "AAPL"
}
The server includes comprehensive error handling for various scenarios including:
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "alpha-vantage-mcp" '{"command":"uv","args":["run","src/alpha_vantage_mcp/server.py"],"env":{"ALPHA_VANTAGE_API_KEY":"<insert api key>"}}'
See the official Claude Code MCP documentation for more details.
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.
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": {
"alpha-vantage-mcp": {
"command": "uv",
"args": [
"run",
"src/alpha_vantage_mcp/server.py"
],
"env": {
"ALPHA_VANTAGE_API_KEY": "<insert api key>"
}
}
}
}
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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json2. Add this to your configuration file:
{
"mcpServers": {
"alpha-vantage-mcp": {
"command": "uv",
"args": [
"run",
"src/alpha_vantage_mcp/server.py"
],
"env": {
"ALPHA_VANTAGE_API_KEY": "<insert api key>"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect