Weather MCP Server logo

Weather MCP Server

by szypetike

The Weather MCP Server is a Model Context Protocol (MCP) server designed to provide weather information for cities around the world. It can fetch real-time data or use mock data as a fallback.

View on GitHub

Last updated: N/A

What is Weather MCP Server?

The Weather MCP Server is a Node.js application that acts as a Model Context Protocol (MCP) server, providing weather data for various cities. It can retrieve real-time weather information from the OpenWeather API or use mock data if an API key is not provided or if the API request fails.

How to use Weather MCP Server?

To use the server, clone the repository, install dependencies using npm install, and build the server with npm run build. You can run it locally using npm start. For use with Claude or other MCP-compatible AI assistants, configure the MCP settings as shown in the README, providing the path to the built server and optionally an OpenWeather API key.

Key features of Weather MCP Server

  • Get current weather for any city

  • Provides temperature, weather conditions, humidity, wind information, and more

  • Fallback to mock data if API request fails

  • Supports OpenWeather API

Use cases of Weather MCP Server

  • Providing weather information to AI assistants

  • Integrating weather data into applications

  • Testing and development without relying on a real API

  • Educational purposes for learning about MCP servers

FAQ from Weather MCP Server

What is an MCP server?

An MCP (Model Context Protocol) server provides contextual information to AI models, enabling them to perform tasks more effectively.

Do I need an OpenWeather API key?

No, you can use the server without an API key. It will use mock data in this case.

How do I get an OpenWeather API key?

Sign up at OpenWeather, navigate to your account's 'API keys' section, and generate a new API key.

What data does the server provide?

The server provides temperature, weather conditions, humidity, wind information, and more for a given city.

What happens if the API request fails?

If the API request fails, the server will automatically use mock data.