Simple MCP Weather Tool
Fetches live weather data from Open-Meteo without an API key and returns structured JSON with location disambiguation, enabling weather queries in LM Studio chat.
README
Simple MCP Weather Tool for LM Studio
Minimal MCP weather server for LM Studio. Fetches live weather from Open-Meteo. No API key required. Returns structured JSON with location disambiguation.
Use it as a drop-in tool in LM Studio chat, or run the optional Python CLI demo.

Features
- MCP stdio server compatible with LM Studio 0.3.17+
- Structured JSON weather output (temperature, conditions, humidity, wind, etc.)
- Location disambiguation via
country_codeand optionalregion - Optional travel-advisor system prompt
- Optional CLI agent demo for developers
Requirements
- Python 3.12+
- LM Studio 0.3.17+ (for chat integration)
- Internet access (Open-Meteo API)
- A local model with tool/function calling support
Install
git clone https://github.com/yourname/simple-mcp-weather.git
cd simple-mcp-weather
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
Use with LM Studio
- Open LM Studio: Program tab, then Install, then Edit mcp.json
- Add the weather server (use absolute paths):
{
"mcpServers": {
"weather": {
"command": "/absolute/path/to/.venv/bin/python",
"args": ["/absolute/path/to/mcp_server.py"]
}
}
}
See mcp.json.example for a template.
- Save. LM Studio will spawn the MCP server automatically.
- In chat, enable tools and select a model that supports function calling.
- Ask a question, for example:
- Is a trip to the Polish seaside a good idea right now?
- Czy wyjazd nad morze w Helu to dobry pomysł?
Recommended system prompt
For travel recommendations instead of raw weather data, paste the contents of prompts/travel_advisor.txt into LM Studio's System Prompt field.
Tool: get_weather
| Parameter | Required | Description |
|---|---|---|
city |
yes | City name, e.g. Gdansk, Hel, Warsaw |
country_code |
no | ISO code, e.g. PL, DE, US. Always provide when known |
region |
no | Admin region to disambiguate similar city names |
Example output
{
"requested_city": "Hel",
"requested_country_code": "PL",
"requested_region": null,
"resolved_city": "Hel",
"resolved_region": "Pomerania",
"country": "Poland",
"country_code": "PL",
"latitude": 54.60384,
"longitude": 18.80351,
"temperature_c": 17.2,
"apparent_temperature_c": 16.2,
"condition": "overcast",
"humidity_percent": 90,
"precipitation_mm": 0.0,
"wind_speed_kmh": 20.0,
"measured_at": "2026-07-13T14:30"
}
Project structure
.
├── mcp_server.py # MCP tool server (LM Studio entry point)
├── mcp.json.example # LM Studio config template
├── prompts/
│ └── travel_advisor.txt # Optional system prompt for chat
├── requirements.txt # Server dependencies
├── requirements-demo.txt # CLI demo dependencies
├── example.env # CLI demo environment template
└── examples/
└── cli-agent/ # Optional Python agent demo
Optional CLI demo
A Python agent that connects to LM Studio via the OpenAI-compatible API and calls the MCP server programmatically.
pip install -r requirements-demo.txt
cp example.env .env
python examples/cli-agent/main.py "Is a trip to Hel, Poland a good idea?"
See examples/cli-agent/README.md for details.
Troubleshooting
| Problem | Fix |
|---|---|
| Wrong city / weather from another country | Pass country_code (e.g. PL) when calling the tool |
| Model ignores the tool | Use a model with function calling; set temperature to ~0.1-0.2 |
| MCP server not loading | Check absolute paths in mcp.json; ensure venv has deps installed |
| Region name mismatch | Translated names (e.g. Pomorskie vs Pomerania) are handled; retry with country_code |
License
MIT. See LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。