Back to course

Daily Repetition 6: The 'Weather' Tool (API Keys)

Model Context Protocol (MCP) Server Engineering

Daily Repetition: Tool #6

Most APIs require authentication. We'll use a Weather API (like OpenWeatherMap).

Handling Secrets

Never hardcode API keys. Use .env files and dotenv package.

Assignment: Build a get_weather tool that requires an API key stored in your environment variables.