by calvernaz
Provides access to Alpha Vantage stock market data via an MCP server, supporting stdio and HTTP streaming modes with optional OAuth 2.1 authentication.
Enables clients to retrieve real‑time and historical stock market data from the Alpha Vantage API through a Model Context Protocol (MCP) server. The server can run locally in stdio mode for desktop tools or as a streamable HTTP service, optionally protected by OAuth 2.1.
ALPHAVANTAGE_API_KEY
.git clone https://github.com/calvernaz/alphavantage.git
cd alphavantage
alphavantage
# or explicitly
alphavantage --server stdio
alphavantage --server http --port 8080
export OAUTH_AUTHORIZATION_SERVER_URL="https://your-auth-server.com/realms/your-realm"
export OAUTH_RESOURCE_SERVER_URI="https://your-mcp-server.com"
# optional JWT or introspection settings …
alphavantage --server http --port 8080 --oauth
deploy/aws-stateless-mcp-lambda
script for a serverless, auto‑scaling setup.Q: Do I need a paid Alpha Vantage plan? A: No. A free API key is sufficient for typical usage; higher rate limits require a paid plan.
Q: Can I run the server behind a reverse proxy? A: Yes. When using HTTP mode, any standard reverse proxy (nginx, CloudFront, API Gateway) works.
Q: Which OAuth token validation method should I choose?
A: Use jwt
if you control the public key; otherwise introspection
works with providers like Keycloak.
Q: How does the server handle rate limits? A: The server forwards requests directly to Alpha Vantage; you must respect the provider's rate‑limit policy.
Q: Is the server compatible with Windows? A: Yes, the Python/uv based CLI runs on Windows, macOS, and Linux.
A MCP server for the stock market data API, Alphavantage API.
MCP Server URL: https://mcp.alphavantage.co
ALPHAVANTAGE_API_KEY
git clone https://github.com/calvernaz/alphavantage.git
The AlphaVantage server can run in two different modes:
This is the standard MCP server mode used for tools like Claude Desktop.
alphavantage
# or explicitly:
alphavantage --server stdio
This mode provides real-time updates via HTTP streaming.
alphavantage --server http --port 8080
This mode adds OAuth 2.1 authentication to the HTTP server, following the MCP specification for secure access.
alphavantage --server http --port 8080 --oauth
When using the --oauth
flag, the server requires OAuth 2.1 configuration via environment variables:
Required Environment Variables:
export OAUTH_AUTHORIZATION_SERVER_URL="https://your-auth-server.com/realms/your-realm"
export OAUTH_RESOURCE_SERVER_URI="https://your-mcp-server.com"
Optional Environment Variables:
# Token validation method (default: jwt)
export OAUTH_TOKEN_VALIDATION_METHOD="jwt" # or "introspection"
# For JWT validation
export OAUTH_JWT_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----"
export OAUTH_JWT_ALGORITHM="RS256" # default
# For token introspection validation
export OAUTH_INTROSPECTION_ENDPOINT="https://your-auth-server.com/realms/your-realm/protocol/openid-connect/token/introspect"
export OAUTH_INTROSPECTION_CLIENT_ID="your-client-id"
export OAUTH_INTROSPECTION_CLIENT_SECRET="your-client-secret"
# Optional: Required scopes (space-separated)
export OAUTH_REQUIRED_SCOPES="mcp:access mcp:read"
# Optional: Enable session binding for additional security (default: true)
export OAUTH_SESSION_BINDING_ENABLED="true"
The OAuth implementation provides:
/.well-known/oauth-protected-resource
)For testing with Keycloak:
# Keycloak OAuth configuration
export OAUTH_AUTHORIZATION_SERVER_URL="https://keycloak.example.com/realms/mcp-realm"
export OAUTH_RESOURCE_SERVER_URI="https://mcp.example.com"
export OAUTH_TOKEN_VALIDATION_METHOD="introspection"
export OAUTH_INTROSPECTION_ENDPOINT="https://keycloak.example.com/realms/mcp-realm/protocol/openid-connect/token/introspect"
export OAUTH_INTROSPECTION_CLIENT_ID="mcp-server"
export OAUTH_INTROSPECTION_CLIENT_SECRET="your-keycloak-client-secret"
export OAUTH_REQUIRED_SCOPES="mcp:access"
# Start server with OAuth
alphavantage --server http --port 8080 --oauth
When OAuth is enabled, MCP clients must:
GET /.well-known/oauth-protected-resource
Authorization: Bearer <access-token>
Options:
--server
: Choose between stdio
(default) or http
server mode--port
: Specify the port for the Streamable HTTP server (default: 8080)--oauth
: Enable OAuth 2.1 authentication (requires --server http
)Deploy the AlphaVantage MCP Server on AWS Lambda using the stateless MCP pattern for production-ready, scalable deployment.
cd deploy/aws-stateless-mcp-lambda
export ALPHAVANTAGE_API_KEY=your_api_key_here
./deploy.sh
Features:
📖 Full Documentation: See AWS Deployment Guide for complete setup instructions, testing, monitoring, and troubleshooting.
Add this to your claude_desktop_config.json
:
NOTE Make sure you replace the <DIRECTORY-OF-CLONED-PROJECT>
with the directory of the cloned project.
{
"mcpServers": {
"alphavantage": {
"command": "uv",
"args": [
"--directory",
"<DIRECTORY-OF-CLONED-PROJECT>/alphavantage",
"run",
"alphavantage"
],
"env": {
"ALPHAVANTAGE_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
{
"mcpServers": {
"alphavantage": {
"command": "uv",
"args": [
"--directory",
"<DIRECTORY-OF-CLONED-PROJECT>/alphavantage",
"run",
"alphavantage",
"--server",
"http",
"--port",
"8080"
],
"env": {
"ALPHAVANTAGE_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
Watch a quick demonstration of the Alpha Vantage MCP Server in action:
We welcome contributions from the community! To get started, check out our contribution guide for setup instructions, development tips, and guidelines.
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by goat-sdk
Enables AI agents to send and receive payments, purchase goods and services, execute investment strategies, tokenize assets, and obtain financial insights by leveraging blockchains, stablecoins, and wallets.
by financial-datasets
Provides access to income statements, balance sheets, cash flow statements, stock prices, market news, and cryptocurrency data through MCP tools for AI assistants.
by alpacahq
Enables large language models to trade stocks and options, retrieve real‑time and historical market data, and manage portfolios using plain English commands through a local or remote MCP server.
by XeroAPI
Provides a bridge between the Model Context Protocol and Xero's API, enabling standardized access to Xero accounting and business features.
by stefanoamorelli
Provides an MCP server that connects AI models to SEC EDGAR filings, enabling real‑time retrieval of company filings, financial statements, and insider‑trading data with exact XBRL precision and verifiable filing references.
by ariadng
Enables AI LLMs to execute trades on the MetaTrader 5 platform through the Model Context Protocol.
by kukapay
Integrates the Freqtrade cryptocurrency trading bot with MCP, exposing its REST API as tools for AI agents to perform automated trading operations.
by kukapay
Provides a comprehensive set of cryptocurrency technical analysis indicators and ready‑to‑use trading strategies through an MCP interface, enabling AI agents and applications to generate buy, hold, or sell signals.
by OctagonAI
Provides AI-powered financial research and analysis by integrating with the Octagon Market Intelligence API, enabling extraction of insights from public filings, earnings call transcripts, financial metrics, stock market data, and private market transactions within Claude Desktop and other popular MCP clients.