MCP.so
登录

Weather MCP Server

@szypetike

关于 Weather MCP Server

A Model Context Protocol server that provides weather information

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "weather-server": {
      "command": "node",
      "args": [
        "path/to/weather-server/build/index.js"
      ],
      "env": {
        "OPENWEATHER_API_KEY": "your-api-key-here"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is Weather MCP Server?

A Model Context Protocol (MCP) server that provides current weather information for cities worldwide, using the OpenWeather API or fallback mock data. It is designed for use with MCP-compatible AI assistants like Claude.

How to use Weather MCP Server?

Install Node.js v14+, clone the repository, run npm install and npm run build, then start with npm start. Configure as an MCP tool by adding a JSON entry to your MCP settings, optionally providing an OpenWeather API key via the OPENWEATHER_API_KEY environment variable.

Key features of Weather MCP Server

  • Returns temperature, humidity, wind, and other current conditions.
  • Automatically falls back to mock data if no API key is provided or the API request fails.
  • Requires only Node.js and an optional API key.
  • Provides a single tool: get_current_weather.
  • Works with any city name as input.

Use cases of Weather MCP Server

  • AI assistant answering "What's the weather in London?" with real-time data.
  • Development and testing of MCP workflows without an API key.
  • Demonstrating weather lookups during demos or tutorials.

FAQ from Weather MCP Server

How does Weather MCP Server differ from alternatives?

The README does not mention any alternatives.

What are the runtime requirements?

Node.js v14 or higher and npm or yarn.

Where does the weather data come from?

Real-time data from the OpenWeather API if an API key is provided. Otherwise, mock data for predefined cities (London, New York, Tokyo, Paris, Sydney) and default mock data for other cities.

What happens if the API request fails?

The server falls back to mock data and indicates the source in the response.

How do I obtain an OpenWeather API key?

Sign up at openweathermap.org and generate an API key from your account’s API keys section.

常见问题

How does Weather MCP Server differ from alternatives?

The README does not mention any alternatives.

What are the runtime requirements?

Node.js v14 or higher and npm or yarn.

Where does the weather data come from?

Real-time data from the OpenWeather API if an API key is provided. Otherwise, mock data for predefined cities (London, New York, Tokyo, Paris, Sydney) and default mock data for other cities.

What happens if the API request fails?

The server falls back to mock data and indicates the source in the response.

How do I obtain an OpenWeather API key?

Sign up at openweathermap.org and generate an API key from your account’s API keys section.

评论

媒体与设计 分类下的更多 MCP 服务器