Skip to main content
Glama

Stock Ticker MCP Server

instructions.txt6.33 kB
Stock Ticker MCP Server - Installation and Configuration Instructions ===================================================================== PREREQUISITES ------------ - Ubuntu 24.04.3 LTS or compatible Linux distribution - Docker installed and running - Alpha Vantage API key (get free key at: https://www.alphavantage.co/support/#api-key) - Claude AI with MCP support enabled STEP 1: BUILD DOCKER IMAGE -------------------------- 1.1. Navigate to the project directory: cd ~/Projects/stock_ticker_mcp 1.2. Build the Docker image: docker build -t stock-ticker-mcp . 1.3. Verify the image was created successfully: docker images | grep stock-ticker-mcp Expected output: You should see the stock-ticker-mcp image listed with a recent timestamp. STEP 2: CONFIGURE CLAUDE AI FOR UBUNTU TO ACCESS THIS MCP SERVER ---------------------------------------------------------------- 2.1. Add the MCP server to Claude's configuration using the local stdio transport: claude mcp add stock-ticker python ~/Projects/stock_ticker_mcp/stock_ticker_mcp.py 2.2. Alternative: Add with Docker container (if you prefer containerized execution): claude mcp add --transport stdio stock-ticker-docker \ docker run --rm -i --env ALPHA_VANTAGE_API_KEY stock-ticker-mcp 2.3. Set your Alpha Vantage API key as an environment variable: claude mcp add stock-ticker python ~/Projects/stock_ticker_mcp/stock_ticker_mcp.py \ --env ALPHA_VANTAGE_API_KEY=your_api_key_here Replace "your_api_key_here" with your actual Alpha Vantage API key. 2.4. Verify the server was added successfully: claude mcp list Expected output: You should see "stock-ticker" listed among your configured MCP servers. 2.5. Test the MCP server connection: claude mcp get stock-ticker Expected output: Server details and status information should be displayed. STEP 3: HOW TO START THE SERVER FROM COMMAND LINE ------------------------------------------------- 3.1. METHOD 1 - Direct Python execution (requires dependencies installed locally): 3.1.1. Install Python dependencies: cd ~/Projects/stock_ticker_mcp pip install -r requirements.txt 3.1.2. Set your API key environment variable: export ALPHA_VANTAGE_API_KEY=your_api_key_here 3.1.3. Start the server: python stock_ticker_mcp.py Expected output: The server should start and display FastMCP startup messages. 3.2. METHOD 2 - Docker container execution (recommended): 3.2.1. Run the Docker container with your API key: docker run -d \ --name stock-ticker-mcp-container \ --env ALPHA_VANTAGE_API_KEY=N611620MU2BDS828 \ -p 8000:8000 \ stock-ticker-mcp 3.2.2. Verify the container is running: docker ps | grep stock-ticker-mcp Expected output: You should see the container running with status "Up". 3.2.3. Check container logs: docker logs stock-ticker-mcp-container Expected output: FastMCP server startup messages and no error messages. 3.3. METHOD 3 - Interactive Docker execution (for testing): 3.3.1. Run container interactively: docker run -it \ --env ALPHA_VANTAGE_API_KEY=your_api_key_here \ -p 8000:8000 \ stock-ticker-mcp 3.3.2. The server will start in the foreground, showing all log output. Use Ctrl+C to stop the server. VERIFICATION AND TESTING ------------------------ 4.1. Test the server is responding: curl http://localhost:8000/health Expected output: Health check response (if health endpoint is implemented) 4.2. Test with Claude AI: Open Claude and ask: "What's the current price of Apple stock?" Expected result: Claude should use the stock-ticker MCP server to fetch and display current AAPL stock price. 4.3. Test historical data: Ask Claude: "What was Microsoft's stock price on January 15, 2024?" Expected result: Claude should return historical MSFT data for that specific date. TROUBLESHOOTING -------------- 5.1. If "API key not configured" error: - Verify ALPHA_VANTAGE_API_KEY environment variable is set correctly - Check that the API key is valid at Alpha Vantage website - Ensure no extra spaces or quotes in the API key 5.2. If "API call frequency limit reached" error: - You've exceeded the free tier limit of 25 requests per day - Wait until the next day or upgrade to a paid Alpha Vantage plan - Check your API usage at Alpha Vantage dashboard 5.3. If container won't start: - Check Docker is running: sudo systemctl status docker - Verify image exists: docker images | grep stock-ticker-mcp - Check for port conflicts: sudo netstat -tulpn | grep 8000 - Review container logs: docker logs stock-ticker-mcp-container 5.4. If Claude can't connect to MCP server: - Verify MCP server is listed: claude mcp list - Check server status: claude mcp get stock-ticker - Restart Claude AI application - Verify MCP configuration file permissions 5.5. If getting "Invalid symbol" errors: - Verify stock symbol exists and is actively traded - Use correct symbol format (e.g., "AAPL" not "Apple") - Check symbol on financial websites like Yahoo Finance MAINTENANCE ---------- 6.1. Stop the Docker container: docker stop stock-ticker-mcp-container 6.2. Remove the container: docker rm stock-ticker-mcp-container 6.3. Update the server: - Make code changes - Rebuild image: docker build -t stock-ticker-mcp . - Restart container with new image 6.4. Monitor API usage: - Visit Alpha Vantage dashboard to check daily request count - Consider upgrading to paid plan for higher limits 6.5. View server logs: docker logs -f stock-ticker-mcp-container SECURITY NOTES ------------- - Never commit API keys to version control - Use environment variables for sensitive configuration - Regularly rotate API keys - Monitor for unauthorized API usage - Keep Docker images updated with security patches SUPPORT ------- For issues with: - Alpha Vantage API: https://www.alphavantage.co/support/ - FastMCP: https://github.com/pydantic/fastmcp - Docker: https://docs.docker.com/ - Claude MCP: Claude AI documentation

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tonkatsutoast/stock-ticker-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server