Enables high-quality text-to-speech conversion using Deepgram's Aura voices, with personality-matched speakers for generating natural-sounding MP3 weather reports.
AI-Powered Weather Voice Agent with Configurable Claude Models & Deepgram
A sophisticated Mastra agent that creates uniquely generated weather reports using configurable Claude models for creative prompt generation and Deepgram for high-quality text-to-speech. Each weather report is crafted with AI creativity, ensuring no two reports sound exactly the same.
🌟 Key Features
- 🔧 Configurable AI Models: Switch between different Claude models via environment variables
- 🤖 AI-Generated Content: Uses Claude AI to create unique, natural weather narratives
- 🎭 4 Dynamic Voice Personalities: Each with distinct characteristics and voice matching
- 🎵 High-Quality TTS: Deepgram's Aura voices with personality-matched speakers
- 🌍 Real Weather Data: US National Weather Service API integration
- 🎨 Creative Variety: High temperature setting ensures unique outputs every time
- 🗣️ Natural Speech: Optimized for spoken delivery, no robotic text reading
🔧 Supported Claude Models
Configure via ANTHROPIC_MODEL
environment variable:
Model | Description | Best For |
---|---|---|
claude-3-7-sonnet-20250219 | Latest Claude 3.7 (default) | Most advanced reasoning & creativity |
claude-3-5-sonnet-20241022 | Claude 3.5 Sonnet | Balanced performance & creativity |
claude-3-5-sonnet-latest | Latest 3.5 Sonnet | Always up-to-date 3.5 |
claude-3-haiku-20240307 | Claude 3 Haiku | Fast, efficient generation |
claude-3-opus-20240229 | Claude 3 Opus | Maximum creativity & detail |
🎭 Available Voice Personalities
1. Professional Weather Forecaster
- Personality: Authoritative TV weather presenter
- Voice: Asteria (clear, professional female)
- Style: "Good morning, this is your weather update for..."
2. Groovy Musician
- Personality: Laid-back artist giving weather between songs
- Voice: Luna (warm, friendly tone)
- Style: "Hey there weather cats, the vibe today is..."
3. Gentle Librarian
- Personality: Soft-spoken knowledge keeper
- Voice: Stella (gentle, informative)
- Style: "According to today's meteorological records..."
4. Sports Broadcaster
- Personality: High-energy game announcer
- Voice: Orion (energetic male voice)
- Style: "Coming to you live with today's weather lineup..."
🚀 Quick Start
Development
The npm run dev
command (runs Mastra dev environment on port 4111):
- 🔄 Loads the full Mastra environment with hot reload
- 🤖 Makes the weather agent available via Mastra APIs
- 🔧 Includes MCP server setup for external clients
- 🌐 Serves the Mastra dev UI on http://localhost:4111
- 📊 Shows available agents and servers on startup
Installation
Environment Setup
- Copy environment template:
- Configure your API keys and model:
Get API Keys:
- Anthropic Console for Claude models
- Deepgram Console for TTS
Run the Agent
The agent will show which model it's using and interactively:
- 🏠 Ask for your ZIP code
- 🌤️ Fetch real weather data
- 🎭 Let you choose a personality
- 🤖 Generate unique content with your chosen Claude model
- 🎵 Create MP3 with matched voice
- 📁 Save file with descriptive name
🧪 Testing
Test both professional and groovy styles with different ZIP codes.
Test Different Models
🎯 How It Works
1. Weather Data Collection
2. Configurable AI Generation
3. Voice-Matched TTS
🔄 Model Switching Examples
Development vs Production
Cost Optimization
📁 File Structure
🎨 Model Comparison Examples
Claude 3.7 Sonnet (Most Advanced)
"Good morning, I'm bringing you the latest atmospheric developments for Los Angeles. We're currently experiencing a delightful partly cloudy tapestry with comfortable temperatures maintaining a steady 72 degrees. Gentle southwest breezes at 10 miles per hour are creating perfect conditions, while precipitation chances remain minimal at just 20 percent. It's shaping up to be an absolutely gorgeous day for any outdoor adventures you might have planned."
Claude Haiku (Fast & Efficient)
"Good morning with your Los Angeles weather update. Partly cloudy skies are dominating today with pleasant 72 degree temperatures. Southwest winds at 10 miles per hour keep things comfortable. There's a slight 20 percent chance of rain, but overall conditions look great. Perfect weather for getting outside and enjoying your day."
🔧 Technical Details
AI Model Integration
- Configurable Models: Set via
ANTHROPIC_MODEL
environment variable - Default: Claude 3.7 Sonnet (
claude-3-7-sonnet-20250219
) - Temperature: 0.8 (high creativity)
- Max Tokens: 300 (optimal for weather reports)
- Runtime Display: Shows current model in use
Voice Synthesis
- Provider: Deepgram Aura
- Format: MP3 output
- Quality: High-fidelity neural voices
- Voice Matching: Different speakers per personality
Weather Data
- Source: US National Weather Service API
- Coverage: All US ZIP codes
- Data: Temperature, conditions, wind, precipitation, humidity
🛠️ Customization
Switch Models for Different Use Cases
Add New Personalities
🚨 Error Handling
The agent handles:
- ❌ Missing API keys (clear guidance provided)
- ❌ Invalid models (falls back to default)
- ❌ Invalid ZIP codes (user-friendly error messages)
- ❌ Network issues (retry mechanisms)
- ❌ TTS generation failures (fallback options)
- ❌ File system errors (directory auto-creation)
📊 Performance by Model
Model | Speed | Creativity | Detail | Cost |
---|---|---|---|---|
Claude 3.7 Sonnet | Fast | Highest | Excellent | Moderate |
Claude 3.5 Sonnet | Fast | High | Good | Moderate |
Claude Haiku | Fastest | Good | Basic | Lowest |
Claude Opus | Slower | Highest | Maximum | Highest |
💡 Use Cases
- Development: Use Haiku for rapid testing
- Production: Use 3.7 Sonnet for best quality
- Creative Content: Use Opus for maximum creativity
- Cost Optimization: Switch based on usage patterns
- A/B Testing: Compare different models easily
🔄 Original MCP Server
This extends the original Weather MCP Server. The MCP functionality remains available for Claude Desktop and other MCP clients.
📜 License
Follows Mastra framework licensing terms.
Powered by configurable Claude models for creative generation and Deepgram Aura for natural speech synthesis 🤖🎵 ```
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Provides weather forecast data from the US National Weather Service API through MCP tools. Enables users to get detailed weather forecasts by ZIP code or coordinates using natural language queries.