Skip to main content
Glama

Weather Data MCP

x402 Payment-Protected Real-Time Weather & Climate API

Get real-time weather conditions, forecasts, and climate data for AI agents doing location-based analysis, event planning, travel research, and more.

🚀 Features

  • 🌡️ Current Weather - Real-time temperature, conditions, humidity, wind speed

  • 📅 5-Day Forecast - Detailed weather predictions with daily breakdowns

  • 🌍 Global Coverage - 200,000+ cities worldwide with accurate data

  • 📍 Coordinate-Based - Get weather by precise latitude/longitude

  • 💳 x402 Micropayments - Pay $0.002 USDC per call on Base Mainnet

  • 🤖 MCP Compatible - Works with Claude and other AI agents

Related MCP server: MCP Weather Server

📡 Live Endpoint

Base URL: https://weather-data-mcp.vercel.app (will be updated after deployment)

Get Current Weather

GET /api/current?location={LOCATION}

Parameters:

  • location (required): City name or location (e.g., London, New York, Tokyo)

Example:

curl https://weather-data-mcp.vercel.app/api/current?location=London

Get Weather Forecast

GET /api/forecast?location={LOCATION}&days={DAYS}

Parameters:

  • location (required): City name or location

  • days (optional): Number of forecast days (1-5, default: 3)

Example:

curl "https://weather-data-mcp.vercel.app/api/forecast?location=Paris&days=5"

Get Weather by Coordinates

GET /api/coordinates?lat={LATITUDE}&lon={LONGITUDE}

Parameters:

  • lat (required): Latitude (-90 to 90)

  • lon (required): Longitude (-180 to 180)

Example:

curl "https://weather-data-mcp.vercel.app/api/coordinates?lat=40.7128&lon=-74.0060"

Response (402 Payment Required):

{
  "error": "Payment Required",
  "message": "This endpoint requires x402 payment",
  "payment": {
    "scheme": "exact",
    "network": "eip155:8453",
    "price": "$0.002",
    "currency": "USDC",
    "payTo": "0xf081ee84c0d85278a6242bc265f0b312021ebeb1"
  },
  "instructions": "Include payment proof in X-Payment-Proof header"
}

🔍 Discovery Endpoints

  • Bazaar Discovery: /.well-known/x402

  • MCP Metadata: /mcp/tools

  • Health Check: /health

💰 Payment Details

  • Network: Base Mainnet (Chain ID: eip155:8453)

  • Currency: USDC

  • Price: $0.002 per API call

  • Protocol: x402 "exact" scheme

  • Payment Address: 0xf081ee84c0d85278a6242bc265f0b312021ebeb1

🤖 Use with AI Agents

This MCP server is designed to work with Claude Code and other AI agents that support the Model Context Protocol (MCP) and x402 payments.

AI agents can:

  1. Discover the service on x402 Bazaar

  2. Pay via CDP Facilitator

  3. Fetch real-time weather data

  4. Get forecasts for planning and analysis

  5. Make location-based recommendations

  6. Track climate patterns and conditions

📦 Response Format

Current Weather Response

{
  "success": true,
  "data": {
    "location": "London",
    "temperature": {
      "celsius": 18,
      "fahrenheit": 64
    },
    "condition": "Partly Cloudy",
    "humidity": 65,
    "windSpeed": {
      "kph": 15,
      "mph": 9
    },
    "pressure": 1013,
    "visibility": 10,
    "uvIndex": 3,
    "feelsLike": {
      "celsius": 17,
      "fahrenheit": 63
    },
    "timestamp": "2026-09-04T19:30:00.000Z"
  },
  "payment": {
    "verified": true,
    "amount": "0.002",
    "currency": "USDC"
  }
}

Forecast Response

{
  "success": true,
  "location": "Paris",
  "days": 3,
  "forecast": [
    {
      "date": "2026-09-04",
      "condition": "Sunny",
      "maxTemp": {
        "celsius": 25,
        "fahrenheit": 77
      },
      "minTemp": {
        "celsius": 15,
        "fahrenheit": 59
      },
      "humidity": 55,
      "precipitation": 10,
      "windSpeed": {
        "kph": 12,
        "mph": 7
      }
    }
  ],
  "payment": {
    "verified": true,
    "amount": "0.002",
    "currency": "USDC"
  }
}

Coordinates Response

{
  "success": true,
  "data": {
    "location": "40.71°, -74.01°",
    "coordinates": {
      "latitude": 40.7128,
      "longitude": -74.0060
    },
    "temperature": {
      "celsius": 22,
      "fahrenheit": 72
    },
    "condition": "Clear",
    "..."
  }
}

🛠️ Local Development

# Install dependencies
npm install

# Copy environment file
cp .env.example .env

# Run locally
npm start

# Development mode with auto-reload
npm run dev

Server will start on http://localhost:3000

🚀 Deployment

Deploy to Vercel

# Install Vercel CLI
npm i -g vercel

# Deploy
vercel

# Deploy to production
vercel --prod

The vercel.json configuration is already set up for Express.

Environment Variables

No API keys required for the mock implementation. In production with a real weather API:

WEATHER_API_KEY=your_api_key_here
WEATHER_API_PROVIDER=openweathermap  # or weatherapi, visualcrossing, etc.

🌐 Supported Locations

  • Global Cities - 200,000+ cities worldwide

  • Coordinates - Any valid latitude/longitude pair

  • US Cities - Full coverage of all states

  • International - Major cities in all countries

Common examples: London, New York, Tokyo, Paris, Sydney, Berlin, Toronto, Mumbai, etc.

⚠️ Note

This service uses mock weather data generation for Vercel deployment compatibility. In production with persistent infrastructure, it would integrate with a real weather API like:

  • OpenWeatherMap - Industry-standard weather API

  • WeatherAPI.com - Real-time and forecast data

  • Visual Crossing - Historical and forecast weather

  • Weatherstack - Global weather data platform

🔗 Integration Example

With Claude Code

// AI agent automatically handles x402 payment
const response = await fetch('https://weather-data-mcp.vercel.app/api/current?location=London', {
  headers: {
    'X-Payment-Proof': '<payment_proof>'
  }
});

const data = await response.json();
console.log(`London: ${data.data.temperature.celsius}°C, ${data.data.condition}`);

MCP Tool Schema

{
  "name": "get_current_weather",
  "description": "Get current weather conditions for any location worldwide",
  "inputSchema": {
    "type": "object",
    "properties": {
      "location": {
        "type": "string",
        "description": "City name or location (e.g., London, New York, Tokyo)"
      }
    },
    "required": ["location"]
  }
}

📊 Use Cases

  • Travel Planning - Check weather before trips

  • Event Planning - Schedule outdoor activities

  • Market Analysis - Weather affects retail, commodities, energy

  • Location Recommendations - Suggest activities based on conditions

  • Climate Research - Analyze weather patterns and trends

  • Smart Home - Integrate with automation systems

  • Agriculture - Monitor conditions for farming decisions

  • Logistics - Plan shipments around weather

🔐 Security

  • All payments via x402 protocol on Base Mainnet

  • No sensitive data stored

  • Payment verification on every request

  • Rate limiting and validation built-in

📝 License

MIT


Built with ❤️ for the AI agent ecosystem

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides real-time weather information and forecasts, connecting AI assistants with live weather data for current conditions and multi-day forecasts for any location worldwide.
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to access real-time and historical weather data through multiple weather APIs including OpenMeteo, Tomorrow.io, and OpenWeatherMap. Provides comprehensive meteorological information including current conditions, forecasts, historical data, and weather alerts.
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Exposes public weather and climate data through a standardized API, allowing AI agents to retrieve current conditions, 7-day forecasts, and historical data. It enables weather-aware automation and data enrichment for conversational agents and travel planning.
    -

Latest Blog Posts

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/acceptancestronk01-sudo/weather-data-mcp'

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