Local Weather MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Local Weather MCP ServerWhat's the current weather in London?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
本地 Dify 可用的 MCP Server(HTTP)
这是一个最小可用的 MCP Server,提供 2 个工具:
health:连通性检查get_weather(location):按城市名查询当前天气
1)安装依赖
如果你有系统 Python:
pip install -r requirements.txt如果你要使用 Codex 内置 Python 运行时:
C:\\Users\\86318\\.cache\\codex-runtimes\\codex-primary-runtime\\dependencies\\python\\python.exe -m pip install -r requirements.txtRelated MCP server: my-weather-server-0706
2)启动 MCP Server
python server.py默认监听:
Host:
0.0.0.0Port:
8787MCP URL:
http://127.0.0.1:8787/mcp
可选环境变量覆盖:
MCP_HOSTMCP_PORTMCP_PATH
示例:
$env:MCP_PORT='8800'; python .\\server.py3)在本地 Dify 接入
在 Dify 的 MCP Server(HTTP)配置里填写:
Server URL:
http://127.0.0.1:8787/mcpName:
local-weatherServer ID:
local_weather
保存后,Dify 应该能自动发现以下工具:
healthget_weather
4)调用示例
在 Agent 或 Workflow 中让模型调用:
healthget_weather,参数location = "Shanghai"
5)常见问题
如果 Dify 运行在 Docker 容器里,
127.0.0.1指向容器本身,不是宿主机。通常改用:
http://host.docker.internal:8787/mcp
如果连接失败:
检查端口
8787是否被占用检查防火墙规则
确认 URL 包含
/mcp路径
This server cannot be deployed
Maintenance
Related MCP Connectors
Global weather via Open-Meteo: forecast, historical, marine, air quality, geocoding, elevation.
The official Model Context Protocol server for Ambee. It gives any MCP-compatible AI assistant — Claude, ChatGPT, Cursor, VS Code, Ollama, and more direct access to live air quality, pollen, and weather data. To get started, including information on signing up and obtaining your Ambee key, check out the Ambee documentation on https://docs.ambeedata.com
Get current weather for any city and create images from your prompts. Streamline planning, reports…
Weather, code search, currency & Solana trust scoring as MCP tools. Free, no API key needed.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides weather information through MCP tools integrated with a FastAPI backend, enabling users to query current weather for single or multiple cities and check API health status.-
- AlicenseAqualityBmaintenanceMCP server that provides current weather for any city using Open-Meteo APIs. It exposes a single tool 'get_weather' returning temperature, humidity, wind, and other weather data.111 npmMIT
- FlicenseNot gradedqualityBmaintenanceProvides weather query capabilities using the Open-Meteo API with a tool for city/coordinate weather and a weather resource URI.1-
- AlicenseNot gradedqualityCmaintenanceProvides real-time weather queries for 12 major Chinese cities and global cities using the wttr.in API, with tools like get_weather and list_supported_cities.1MIT