使用说明
气象MCP服务器🌤️
该项目是一个为Claude Desktop或其他LLM工具提供实时天气数据的服务器,使用 模型上下文协议(MCP)。它是使用 包子 运行时和 TypeScript.
🚀 安装
-
克隆存储库:
git clone [https://github.com/MehmetAkifEmre/weather-mcp-server.git](https://github.com/MehmetAkifEmre/weather-mcp-server.git) cd weather-mcp-server -
安装依赖项:
bun install -
重要提示:打开index.ts文件并将您自己的OpenWeatherMap API密钥粘贴到API_key变量中。(出于安全原因,提供的占位符密钥无效)
⚡ 用法
要使用MCP检查器测试服务器,请执行以下操作:
npx @modelcontextprotocol/inspector bun index.ts
🛠️ 技术
Runtime: Bun
Language: TypeScript
Protocol: Model Context Protocol (MCP) SDK
Validation: Zod
API: OpenWeatherMap
中等 https://medium.com/@mehmetakifemre/桥接llms和实时数据构建天气mcp服务器-带bun-eaf9b366d599