Enables high-quality text-to-speech conversion using Deepgram's Aura voices, with personality-matched speakers for generating natural-sounding MP3 weather reports.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Weather MCP Serverwhat's the forecast for 90210 this weekend?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 |
| Latest Claude 3.7 (default) | Most advanced reasoning & creativity |
| Claude 3.5 Sonnet | Balanced performance & creativity |
| Latest 3.5 Sonnet | Always up-to-date 3.5 |
| Claude 3 Haiku | Fast, efficient generation |
| 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
# Start Mastra development environment with hot reload
npm run dev
# Run the standalone weather agent
npm run start:agent
# Test the agent
npm run test-agentThe 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
pnpm install @mastra/core@latest @mastra/voice-deepgram@latest @ai-sdk/anthropic@latestEnvironment Setup
Copy environment template:
cp .env.example .envConfigure your API keys and model:
ANTHROPIC_API_KEY=your_anthropic_api_key_here
ANTHROPIC_MODEL=claude-3-7-sonnet-20250219
DEEPGRAM_API_KEY=your_deepgram_api_key_hereGet API Keys:
Anthropic Console for Claude models
Deepgram Console for TTS
Run the Agent
npm run startThe 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
npm run test-agentTest both professional and groovy styles with different ZIP codes.
Test Different Models
# Test with Claude 3.7 Sonnet (default)
ANTHROPIC_MODEL=claude-3-7-sonnet-20250219 tsx src/claude-weather-generator.ts
# Test with Claude 3.5 Sonnet
ANTHROPIC_MODEL=claude-3-5-sonnet-20241022 tsx src/claude-weather-generator.ts
# Test with Claude Haiku (fast)
ANTHROPIC_MODEL=claude-3-haiku-20240307 tsx src/claude-weather-generator.tsπ― How It Works
1. Weather Data Collection
// Uses existing weather tool
const weatherData = await getWeatherByZip({ zipCode: "90210" });2. Configurable AI Generation
// Get model from environment
const ANTHROPIC_MODEL = process.env.ANTHROPIC_MODEL || 'claude-3-7-sonnet-20250219';
// Claude creates unique narrative with chosen model
const result = await generateText({
model: anthropic(ANTHROPIC_MODEL),
temperature: 0.8, // High creativity
messages: [{ role: 'user', content: personalityPrompt }]
});3. Voice-Matched TTS
// Different Deepgram voices for each personality
const voice = new DeepgramVoice({
speaker: tone === 'sports' ? 'orion-en' : 'asteria-en'
});π Model Switching Examples
Development vs Production
# Development - Fast responses
ANTHROPIC_MODEL=claude-3-haiku-20240307
# Production - Best quality
ANTHROPIC_MODEL=claude-3-7-sonnet-20250219Cost Optimization
# Budget-conscious
ANTHROPIC_MODEL=claude-3-haiku-20240307
# Premium experience
ANTHROPIC_MODEL=claude-3-opus-20240229π File Structure
src/
βββ mastra/
β βββ agents/
β β βββ weather-agent.ts # Main agent with configurable Claude
β βββ scripts/
β β βββ test-weather-agent.ts # Testing with model display
β βββ tools/weather.ts # Weather API integration
βββ claude-weather-generator.ts # Standalone Claude testing
βββ ...
files/ # Generated MP3s
βββ weather-professional-20240115T143045-a1b2c3d4.mp3
βββ weather-groovy-20240115T143210-e5f6g7h8.mp3π¨ 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_MODELenvironment variableDefault: 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
// For development/testing (fast)
process.env.ANTHROPIC_MODEL = 'claude-3-haiku-20240307';
// For production (best quality)
process.env.ANTHROPIC_MODEL = 'claude-3-7-sonnet-20250219';
// For creative writing (most creative)
process.env.ANTHROPIC_MODEL = 'claude-3-opus-20240229';Add New Personalities
const toneStyles = {
// Add your custom personality
pirate: {
personality: "seafaring pirate captain giving weather from the ship deck",
examples: ["Ahoy mateys, the weather be"],
characteristics: ["Nautical terminology", "Adventurous spirit"]
}
};π¨ 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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.