Token导航 LogoToken导航TokenDH.com
MCP Server Building logo
地图位置未说明官方级别未说明来源级核验

MCP Server Building

MCP Server

一个基于Python和FastMCP构建的轻量级MCP服务器,通过国家气象服务API提供天气警报和预报。

工具数

2

提示词数

0

GitHub Stars

0

资源数

0
天气警报天气预报PythonClaudeFastMCPClaude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

sabariganesan25

提供方

sabariganesan25

最后核验

2026/5/17 20:22

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

✨ MCP Weather Server

A lightweight MCP server built with Python and FastMCP, providing

weather alerts and forecasts via the National Weather Service API.


🛠️ 1. Project Setup

✔️ Step 1 — Install uv

powershell -ExecutionPolicy Bypass -Command "irm https://astral.sh/uv/install.ps1 | iex"

✔️ Step 2 — Create and Set Up the Project

Copy code
uv init weather
cd weather
uv venv
.\.venv\Scripts\Activate.ps1
uv add "mcp[cli]" httpx

✔️ Step 3 — Add the MCP Server Code Create a file named weather.py (or main.py if you prefer) and paste your MCP weather server implementation.

✔️ Step 4 — Run the Server bash Copy code uv run weather.py If the server stays active without errors, it is running correctly ✅.

💬 2. Configure Claude for Desktop Open the Claude config file:

text Copy code %APPDATA%\Claude\claude_desktop_config.json Add (or merge) the following configuration:

json Copy code { "mcpServers": { "weather": { "command": "uv", "args": [ "--directory", "D:/Build-mcp/weather", "run", "weather.py" ] } } } 🔁 After saving, restart Claude Desktop so it picks up the new MCP server.

🔍 3. Testing the Server When everything is wired correctly, Claude should show these tools:

get_alerts

get_forecast

Example Queries You can ask Claude things like:

What are the active weather alerts in Texas?

Give the forecast for 38.5816, -121.4944

If Claude responds using the tools (you’ll see tool calls in the UI), your MCP server is working as expected 🎉.

📸 4. Screenshots

📌 5. Status ✅ MCP Weather Server Created

✅ Connected to Claude Desktop

✅ Tools Tested (get_alerts, get_forecast)

✅ Screenshots Added

📂 Tech Stack 🐍 Python

⚙️ FastMCP / MCP CLI

⛅ National Weather Service API

💻 Claude Desktop (MCP client)

目录标签

目录标签

天气警报天气预报PythonClaudeFastMCP本地部署MCP服务器

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

2

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP