weatherstack-mcp-server

MCP-Forge/weatherstack-mcp-server

3.1

If you are the rightful owner of weatherstack-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This is an MCP server for integrating with the Weatherstack API, enabling AI agents to access various weather data using natural language input.

Tools

Functions exposed to the LLM to take actions

query_current_weather

Gets the current weather for a specified location using the Weatherstack API.

Parameters: query (str): The location to retrieve weather data for. Supported formats: - City name (e.g. "New York") - ZIP code (UK, Canada, US) (e.g. "99501") - Latitude,Longitude coordinates (e.g. "40.7831,-73.9712") - IP address (e.g. "153.65.8.20") - Special keyword "fetch:ip" to auto-detect requester IP units (str, optional): The unit system to use. Defaults to "m". - "m" for Metric - "s" for Scientific - "f" for Fahrenheit

Returns: Union[dict, CallToolResult]: A dictionary containing the current weather data, or a CallToolResult with an error message if the request fails.

query_daily_historical_weather

Gets daily historical weather data for a specified location and list of dates using the Weatherstack API.

Parameters: query (str): The location to retrieve weather data for. Supported formats: - City name (e.g. "New York") - ZIP code (UK, Canada, US) (e.g. "99501") - Latitude,Longitude coordinates (e.g. "40.7831,-73.9712") - IP address (e.g. "153.65.8.20") - Special keyword "fetch:ip" to auto-detect requester IP historical_dates (list[str]): A list of historical dates in 'YYYY-MM-DD' format. units (str, optional): The unit system to use. Defaults to "m". - "m" for Metric - "s" for Scientific - "f" for Fahrenheit

Returns: Union[dict, CallToolResult]: A dictionary containing the historical weather data, or a CallToolResult with an error message if the request fails.

query_hourly_historical_weather

Gets hourly historical weather data for a specified location and list of dates using the Weatherstack API.

Parameters: query (str): The location to retrieve weather data for. Supported formats: - City name (e.g. "New York") - ZIP code (UK, Canada, US) (e.g. "99501") - Latitude,Longitude coordinates (e.g. "40.7831,-73.9712") - IP address (e.g. "153.65.8.20") - Special keyword "fetch:ip" to auto-detect requester IP historical_dates (list[str]): A list of historical dates in 'YYYY-MM-DD' format. units (str, optional): The unit system to use. Defaults to "m". - "m" for Metric - "s" for Scientific - "f" for Fahrenheit interval (int, optional): The interval for hourly data aggregation. Defaults to 3. Supported values: - 1 for hourly - 3 for 3-hourly (default) - 6 for 6-hourly - 12 for 12-hourly (day/night) - 24 for daily average

Returns: Union[dict, CallToolResult]: A dictionary containing the historical weather data, or a CallToolResult with an error message if the request fails.

query_forecast

Gets weather forecast data for a specified location and number of days using the Weatherstack API.

Parameters: query (str): The location to retrieve forecast data for. Supported formats: - City name (e.g. "New York") - ZIP code (UK, Canada, US) (e.g. "99501") - Latitude,Longitude coordinates (e.g. "40.7831,-73.9712") - IP address (e.g. "153.65.8.20") - Special keyword "fetch:ip" to auto-detect requester IP forecast_days (int): The number of days to retrieve forecast data for. Maximum allowed is 21.

Returns: Union[dict, CallToolResult]: A dictionary containing the forecast weather data, or a CallToolResult with an error message if the request fails.

query_marine_weather

Gets live marine/sailing weather data and up to 7 days of forecast for a specified location (by latitude and longitude) using the Weatherstack API.

This tool accesses today's live marine weather forecast as well as forecasts for up to 7 days into the future for the given coordinates. It is useful for sailing, fishing, boating, and coastal activity planning.

Parameters: lat (float): The latitude of the location to retrieve marine weather data for. lon (float): The longitude of the location to retrieve marine weather data for. units (str, optional): The unit system to use. Defaults to "m". - "m" for Metric - "s" for Scientific - "f" for Fahrenheit interval (int, optional): Optional interval for forecast data granularity, if supported by the API.

Returns: Union[dict, CallToolResult]: A dictionary containing the marine weather data, or a CallToolResult with an error message if the request fails.

Prompts

Interactive templates invoked by user choice

No prompts

Resources

Contextual data attached and managed by the client

No resources