Local Weather Server
FreeNot checkedProvides a health check and a get_weather tool to query current weather by city name via HTTP, designed for integration with Dify.
About
Provides a health check and a get_weather tool to query current weather by city name via HTTP, designed for integration with Dify.
README
这是一个最小可用的 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.txt
2)启动 MCP Server
python server.py
默认监听:
- Host:
0.0.0.0 - Port:
8787 - MCP URL:
http://127.0.0.1:8787/mcp
可选环境变量覆盖:
MCP_HOSTMCP_PORTMCP_PATH
示例:
$env:MCP_PORT='8800'; python .\\server.py
3)在本地 Dify 接入
在 Dify 的 MCP Server(HTTP)配置里填写:
- Server URL:
http://127.0.0.1:8787/mcp - Name:
local-weather - Server 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路径
- 检查端口
Installing Local Weather Server
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/GuardForever/mcp_demoFAQ
Is Local Weather Server MCP free?
Yes, Local Weather Server MCP is free — one-click install via Unyly at no cost.
Does Local Weather Server need an API key?
No, Local Weather Server runs without API keys or environment variables.
Is Local Weather Server hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Local Weather Server in Claude Desktop, Claude Code or Cursor?
Open Local Weather Server on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectCompare Local Weather Server with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
