Back to MCP directory
publicPublicdnsLocal runtime

weather-forecast-mcp-server

一个基于TypeScript的MCP天气服务演示项目,实现了简单的天气查询功能

article

README

🚀 天气 MCP 服务器

这是一个基于 TypeScript 的 MCP 服务器,实现了一个简单的笔记系统。它通过演示核心 MCP 概念来展示功能,为用户带来便捷的使用体验。

🚀 快速开始

使用方法

  1. 创建 .env 文件后,在其中设置 OPENWEATHER_API_KEY=API_KEY
  2. 执行 npm run build 命令。
  3. 修改 claude_desktop_config.json 文件(在构建后生成的 index.js 文件路径)。
{
  "mcpServers": {
    "weather-server": {
      "command": "node",
      "args": ["/Users/{UserName}/Desktop/{Project-path}/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