visual-crossing-weather
The Visual Crossing Weather MCP Server provides access to global historical and forecast weather data, offering a comprehensive solution for weather data needs.
The Visual Crossing Weather MCP Server is a powerful tool for accessing both historical weather data and weather forecasts on a global scale. It provides high-performance, cost-effective access to a wide range of weather metrics, including temperature, rainfall, wind speed (including gusts), snow, perceived temperature, humidity, and pressure. This server is designed to cater to a variety of needs, from occasional use to enterprise-level public deployments, offering a comprehensive solution for all weather data requirements. With the ability to handle multiple locations in a single request, it maximizes efficiency and minimizes cost for users.
Features
- Global Weather Data: Access both historical and forecast weather data from around the world.
- Detailed Weather Metrics: Retrieve information on temperature, rainfall, wind speed, snow, perceived temperature, humidity, and pressure.
- Flexible Time Intervals: Historical data is available at hourly and daily levels, while forecasts can be accessed at hourly, daily, and 12-hour intervals.
- Multi-location Requests: Make API calls that include multiple locations to enhance efficiency.
- Enterprise-ready: Suitable for both small-scale and large-scale deployments.
MCP Tools
- Weather Forecast Data: Provides access to weather forecast information. Forecasts are available for up to seven days at hourly, 12-hour, and daily summary levels.
- Historical Weather Record: Suitable for retrieving hourly or daily historical weather records.
Usage with Different Platforms
python
python
import requests
url = 'https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/'
location = 'New York,NY'
api_key = 'YOUR_API_KEY'
response = requests.get(f'{url}{location}?key={api_key}')
weather_data = response.json()
print(weather_data)
javascript
javascript
const fetch = require('node-fetch');
const url = 'https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/';
const location = 'New York,NY';
const apiKey = 'YOUR_API_KEY';
fetch(`${url}${location}?key=${apiKey}`)
.then(response => response.json())
.then(data => console.log(data));