Back to MCP directory
publicPublicdnsLocal runtime

mcp-server-learn

一个基于Node.js的MCP天气服务演示项目,提供美国各州天气警报和位置天气预报功能。

article

README

🚀 MCP 天气服务器

该项目是一个 Model Context Protocol (MCP) 服务器的演示实现,为用户提供与天气相关的实用工具。服务器公开了两个实用工具,能够帮助用户获取所需的天气信息。

🚀 快速开始

本 MCP 天气服务器使用 Node.js 构建,实现了 MCP 工具以获取天气数据,并且借助美国国家气象局 API 来确保提供准确且最新的天气信息。

✨ 主要特性

  • 使用 Node.js 构建,具备良好的性能和扩展性。
  • 实现 MCP 工具,可获取天气数据。
  • 集成美国国家气象局 API,保证天气信息准确、及时。

📦 安装指南

先决条件

  • 系统上已安装 Node.js。
  • 对 MCP 概念和工具有一定了解。

通过 Smithery 安装

要通过 Smithery 自动为 Claude Desktop 安装 mcp-server-learn,可执行以下命令:

npx -y @smithery/cli install @adarshem/mcp-server-learn --client claude

手动安装

  1. 克隆仓库:
git clone <repository-url>
cd weather
  1. 使用 pnpm 安装依赖(如项目中配置的):
pnpm install
  1. 构建项目:
pnpm build

📚 详细文档

配置

更新 VSCode 的 settings.json 文件以添加此 MCP 服务器:

{
    "mcpServers": {
        "weather": {
            "command": "node",
            "args": [
                "/ABSOLUTE/PATH/TO/PARENT/FOLDER/weather/build/index.js"
            ]
        }
    }
}

资源

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client