Skip to content

TuanKiri/weather-mcp-server

一个轻量级的 Model Context Protocol (MCP) 服务器,使 AI 助手(如 Claude)能够检索和解释实时天气数据。

License

MIT license 40 stars 4 forks

Weather API MCP Server

license go version go report Report Bug | Request Feature

一个轻量级的 Model Context Protocol (MCP) 服务器,使 AI 助手(如 Claude)能够检索和解释实时天气数据。

demo example

Installing on Claude Desktop

要将你的 MCP 服务器与 Claude Desktop 结合使用,请将其添加到你的 Claude 配置中:

{
 "mcpServers": {
  "weather-mcp-server": {
   "command": "/path/to/weather-mcp-server",
   "args": [],
   "env": {
    "WEATHER_API_KEY": "your-api-key"
   }
  }
 }
}

你可以从 weatherapi 的个人帐户中获取你的 API 密钥。

Build from source

你可以使用 gocmd/github-mcp-server 目录中构建二进制文件。

go build -o weather-mcp-server ./cmd/weather-mcp-server

Tools

Project Structure

该项目被组织成几个关键目录:

├── cmd
│  └── weather-mcp-server
├── internal
│  └── server
│    ├── handlers # MCP handlers
│    ├── services # Business logic layer
│    │  ├── core # Core application logic
│    │  └── mock # Mock services for testing
│    ├── tools # MCP tools
│    └── view # Templates for displaying messages
└── pkg

Contributing

欢迎提交 issue 或 pull request 来改进项目。 提前感谢您的帮助! 请遵循 contribution guidelines

License

此 MCP 服务器在 MIT 许可下获得许可。

About

一个轻量级的 Model Context Protocol (MCP) 服务器,使 AI 助手(如 Claude)能够检索和解释实时天气数据。

Topics

go golang mcp mcp-server

Resources

Readme

License

MIT license

Security policy

Security policy

Languages