SM

sterlingchin/mcp-weather-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

18 stars 13 forks 质量 54 趋势 22

现成实施"示范背景议定书"(MCP),以实时天气数据能力延伸克洛德.

概览

现成实施"示范背景议定书"(MCP),以实时天气数据能力延伸克洛德. 模型背景协议(MCP)是一个开放的通信框架,允许克洛德等AI模型与外部工具互动. 这使克洛德能够访问实时数据,处理文件,并与外部服务交互——大多数LLMs出框时没有的能力. 更多了解MCP: - MCP官方文档 - 从MCP开始 - Postmans MCP开发者社区 1. :一个功能充分的执行,使克洛德能够获取实时天气数据 3. :将自己的MCP项目4作为起点.

概述(AI 翻译)

现成实施"示范背景议定书"(MCP),以实时天气数据能力延伸克洛德.

□ 什么是MCP吗?

模型背景协议(MCP)是一个开放的通信框架,允许克洛德等AI模型与外部工具互动. 这使克洛德能够访问实时数据,处理文件,并与外部服务交互——大多数LLMs出框时没有的能力.

更多了解 MCP :

  • MCP正式文件
  • 从MCP开始
  • Postmans MCP开发者社区

□ 此仓库包含什么

该寄存器提供:

  1. ** 完成MCP气象服务器**: 使克洛德能够获取实时天气数据的全面运作实施
  2. ** 模板代码**:将自己的MCP项目用作起点
  3. ** 说明实例**: 连接到 Claude 桌面的模板配置文件

□ 特性

MCP气象服务器执行两个主要工具:

  • 别忘了说: 按纬度/经度调整任何地点的当前天气条件和预测
  • ** 计时器**: 请检查access-date=中的日期值 (帮助)

一旦连接,克洛德可以:

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

MCP Weather Server

A ready-to-use implementation of the Model Context Protocol (MCP) that extends Claude with real-time weather data capabilities.

What is MCP?

Model Context Protocol (MCP) is an open communication framework that allows AI models like Claude to interact with external tools. This enables Claude to access real-time data, process files, and interact with external services - capabilities not available to most LLMs out of the box.

Learn more about MCP:

What This Repository Contains

This repository provides:

  1. Complete MCP Weather Server: A fully functional implementation that gives Claude access to real-time weather data
  2. Template Code: Use as a starting point for your own MCP projects
  3. Configuration Examples: Sample configuration files for connecting to Claude Desktop

Features

The MCP Weather Server implements two primary tools:

  • get-forecast: Retrieve current weather conditions and forecasts for any location by latitude/longitude
  • get-alerts: Check for active weather alerts in any US state

Once connected, Claude can:

  • Answer questions about current weather conditions
  • Provide detailed weather forecasts
  • Alert users to severe weather warnings
  • Make recommendations based on weather data

Quick Start

Prerequisites

  • Node.js 16+ and npm
  • Claude Desktop
  • Basic knowledge of TypeScript/JavaScript

Installation

  1. Clone this repository:

    git clone https://github.com/SterlingChin/mcp-weather-server.git
    cd mcp-weather-server
    
  2. Install dependencies:

    npm install
    
  3. Build the project:

    npm run build
    

Connecting to Claude Desktop

  1. Open your Claude Desktop configuration file:

    • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %AppData%\Claude\claude_desktop_config.json
  2. Add the following configuration (update the path to point to your repository):

    {
      "mcpServers": {
        "weather": {
          "command": "node",
          "args": [
            "/absolute/path/to/your/mcp-weather-server/build/index.js"
          ]
        }
      }
    }
    
  3. Restart Claude Desktop

  4. Look for the hammer icon in Claude Desktop, indicating that MCP tools are available

Testing Your Implementation

Try asking Claude these questions:

  • “What’s the weather like in San Francisco right now?”
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "weather": { "command": "node", "args": [ "/absolute/path/to/your/mcp-weather-server/build/index.js" ] } } }