A Model Context Protocol (MCP) server that provides real-time stock price data using the Alpha Vantage API.
- Get Current Price: Fetch real-time stock quotes.
- Caching: Redis-based caching to reduce API calls (5-second TTL).
- Dockerized: specific setup for easy deployment.
- Docker
- Alpha Vantage API Key (Free)
-
Clone the repository
-
Configure Environment Copy
.env.exampleto.envand add your API Key:cp .env.example .env
Edit
.envand setALPHA_VANTAGE_API_KEY. -
Run with Docker
docker-compose up --build
To test the server locally with the MCP Inspector:
# Install dependencies
pip install -r requirements.txt
# Start Redis (independent of Docker Compose if testing locally)
docker run -d -p 6379:6379 redis:alpine
# Run Inspector
npx @modelcontextprotocol/inspector python FinanceMCP.py