mcp-server-tempest 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,14 @@
1
+ .env
2
+ NOTES.md
3
+ .ipynb_checkpoints/
4
+
5
+ # Python-generated files
6
+ __pycache__/
7
+ *.py[oc]
8
+ build/
9
+ dist/
10
+ wheels/
11
+ *.egg-info
12
+
13
+ # Virtual environments
14
+ .venv
@@ -0,0 +1 @@
1
+ 3.13
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Brian Connelly
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,254 @@
1
+ Metadata-Version: 2.4
2
+ Name: mcp-server-tempest
3
+ Version: 0.1.0
4
+ Summary: MCP Server for Retrieving Tempest Weather Data
5
+ Author-email: Brian Connelly <bdc@bconnelly.net>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Brian Connelly
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+ License-File: LICENSE
28
+ Classifier: Development Status :: 4 - Beta
29
+ Classifier: License :: OSI Approved :: MIT License
30
+ Classifier: Operating System :: OS Independent
31
+ Classifier: Programming Language :: Python
32
+ Classifier: Programming Language :: Python :: 3
33
+ Classifier: Programming Language :: Python :: 3.13
34
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
35
+ Requires-Python: >=3.13
36
+ Requires-Dist: cachetools>=6.1.0
37
+ Requires-Dist: fastmcp>=2.9.2
38
+ Requires-Dist: pydantic>=2.11.7
39
+ Requires-Dist: weatherflow4py>=1.4.1
40
+ Description-Content-Type: text/markdown
41
+
42
+ # WeatherFlow Tempest MCP Server
43
+
44
+ A Model Context Protocol (MCP) server that provides seamless access to WeatherFlow Tempest weather station data.
45
+ This server enables AI assistants and applications to retrieve real-time weather observations, forecasts, and station metadata.
46
+
47
+
48
+ ## 🌤️ Features
49
+
50
+ - **Real-time Weather Data**: Access current conditions from personal weather stations
51
+ - **Weather Forecasts**: Get hourly and daily forecasts with professional meteorological models
52
+ - **Station Management**: Discover and manage multiple weather stations
53
+ - **Device Information**: Detailed metadata about connected weather devices
54
+ - **Intelligent Caching**: Automatic caching with configurable TTL for optimal performance
55
+ - **Multiple Access Methods**: Both tools (interactive queries) and resources (data access)
56
+ - **Comprehensive Data**: Temperature, humidity, pressure, wind, precipitation, solar radiation, UV index, and lightning detection
57
+
58
+
59
+ ## 🚀 Quick Start
60
+
61
+ ### Prerequisites
62
+
63
+ - Python 3.13 or higher
64
+ - WeatherFlow API token (get one at [tempestwx.com/settings/tokens](https://tempestwx.com/settings/tokens))
65
+
66
+ ### Installation
67
+
68
+ While each client has its own way of specifying, you'll generally use the following values:
69
+
70
+ | Field | Value |
71
+ |-------|-------|
72
+ | **Command** | `uvx` |
73
+ | **Arguments** | `mcp-server-tempest` |
74
+ | **Environment** | `WEATHERFLOW_API_TOKEN` = `<YOUR TOKEN>` |
75
+
76
+
77
+ ### Development Version
78
+
79
+ If you'd like to use the latest and greatest, the server can be pulled straight from GitHub.
80
+ Just add an additional `--from` argument:
81
+
82
+
83
+ | Field | Value |
84
+ |-------|-------|
85
+ | **Command** | `uvx` |
86
+ | **Arguments** | `--from`, `git+https://github.com/briandconnelly/mcp-server-tempest`, `mcp-server-tempest` |
87
+ | **Environment** | `WEATHERFLOW_API_TOKEN` = `<YOUR TOKEN>` |
88
+
89
+
90
+ ## 📋 Configuration
91
+
92
+ ### Environment Variables
93
+
94
+ | Variable | Description | Default | Required |
95
+ |----------|-------------|---------|----------|
96
+ | `WEATHERFLOW_API_TOKEN` | Your WeatherFlow API token | - | ✅ Yes |
97
+ | `WEATHERFLOW_CACHE_TTL` | Cache timeout in seconds | 300 | No |
98
+ | `WEATHERFLOW_CACHE_SIZE` | Maximum cache entries | 100 | No |
99
+
100
+
101
+ ## 🛠️ Usage
102
+
103
+ ### Available Tools
104
+
105
+ #### `get_stations()`
106
+ Get a list of all your weather stations and connected devices.
107
+
108
+ ```python
109
+ # Get all available stations
110
+ stations = await client.call_tool("get_stations")
111
+ for station in stations.stations:
112
+ print(f"Station: {station.name} (ID: {station.station_id})")
113
+ print(f"Location: {station.latitude}, {station.longitude}")
114
+ ```
115
+
116
+ #### `get_observation(station_id)`
117
+ Get current weather conditions for a specific station.
118
+
119
+ ```python
120
+ # Get current conditions
121
+ obs = await client.call_tool("get_observation", {"station_id": 12345})
122
+ current = obs.obs[0]
123
+ print(f"Temperature: {current.air_temperature}°")
124
+ print(f"Humidity: {current.relative_humidity}%")
125
+ print(f"Wind: {current.wind_avg} {obs.station_units.units_wind}")
126
+ ```
127
+
128
+ #### `get_forecast(station_id)`
129
+ Get weather forecast and current conditions.
130
+
131
+ ```python
132
+ # Get forecast
133
+ forecast = await client.call_tool("get_forecast", {"station_id": 12345})
134
+
135
+ # Current conditions
136
+ current = forecast.current_conditions
137
+ print(f"Current: {current.air_temperature}°")
138
+ print(f"Conditions: {current.conditions}")
139
+
140
+ # Today's forecast
141
+ today = forecast.forecast.daily[0]
142
+ print(f"High/Low: {today.air_temp_high}°/{today.air_temp_low}°")
143
+ print(f"Rain chance: {today.precip_probability}%")
144
+ ```
145
+
146
+ #### `get_station_id(station_id)`
147
+ Get detailed information about a specific station.
148
+
149
+ ```python
150
+ # Get station details
151
+ station = await client.call_tool("get_station_id", {"station_id": 12345})
152
+ print(f"Station: {station.name}")
153
+ print(f"Elevation: {station.station_meta.elevation}m")
154
+ print(f"Devices: {len(station.devices)}")
155
+ ```
156
+
157
+ #### `clear_cache()`
158
+ Clear the data cache (useful for testing).
159
+
160
+ ```python
161
+ # Clear cache
162
+ await client.call_tool("clear_cache")
163
+ ```
164
+
165
+ ### Available Resources
166
+
167
+ The server also provides resources for data access:
168
+
169
+ - `weather://tempest/stations` - List all stations
170
+ - `weather://tempest/stations/{station_id}` - Station details
171
+ - `weather://tempest/observations/{station_id}` - Current observations
172
+ - `weather://tempest/forecast/{station_id}` - Weather forecast
173
+
174
+
175
+ ## 🌟 Examples
176
+
177
+ ### Basic Weather Check
178
+
179
+ ```python
180
+ # Get your stations
181
+ stations = await client.call_tool("get_stations")
182
+ station_id = stations.stations[0].station_id
183
+
184
+ # Get current conditions
185
+ obs = await client.call_tool("get_observation", {"station_id": station_id})
186
+ current = obs.obs[0]
187
+
188
+ print(f"🌡️ Temperature: {current.air_temperature}°{obs.station_units.units_temp}")
189
+ print(f"💧 Humidity: {current.relative_humidity}%")
190
+ print(f"💨 Wind: {current.wind_avg} {obs.station_units.units_wind}")
191
+ print(f"🌧️ Precipitation: {current.precip_accum_local_day} {obs.station_units.units_precip}")
192
+ ```
193
+
194
+ ### Weather Forecast
195
+
196
+ ```python
197
+ # Get forecast
198
+ forecast = await client.call_tool("get_forecast", {"station_id": station_id})
199
+
200
+ # Today's weather
201
+ today = forecast.forecast.daily[0]
202
+ print(f"📅 Today: {today.conditions}")
203
+ print(f"🌡️ High: {today.air_temp_high}° / Low: {today.air_temp_low}°")
204
+ print(f"🌧️ Rain chance: {today.precip_probability}%")
205
+
206
+ # Next few hours
207
+ for hour in forecast.forecast.hourly[:6]:
208
+ time = datetime.fromtimestamp(hour.time)
209
+ print(f"🕐 {time.strftime('%H:%M')}: {hour.air_temperature}° - {hour.conditions}")
210
+ ```
211
+
212
+ ### Station Information
213
+
214
+ ```python
215
+ # Get station details
216
+ station = await client.call_tool("get_station_id", {"station_id": station_id})
217
+
218
+ print(f"🏠 Station: {station.name}")
219
+ print(f"📍 Location: {station.latitude}°, {station.longitude}°")
220
+ print(f"⛰️ Elevation: {station.station_meta.elevation}m")
221
+ print(f"🕐 Timezone: {station.timezone}")
222
+
223
+ # Check device status
224
+ for device in station.devices:
225
+ if device.serial_number:
226
+ status = "🟢 Online" if device.device_meta else "🔴 Offline"
227
+ print(f"📡 {device.device_type}: {status}")
228
+ ```
229
+
230
+
231
+ ## 🤝 Contributing
232
+
233
+ 1. Fork the repository
234
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
235
+ 3. Commit your changes (`git commit -m 'Add amazing feature'`)
236
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
237
+ 5. Open a Pull Request
238
+
239
+
240
+ ## 📄 License
241
+
242
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
243
+
244
+ ## 🙏 Acknowledgments
245
+
246
+ - [WeatherFlow](https://weatherflow.com/) for providing the Tempest weather station and API
247
+ - [Model Context Protocol](https://modelcontextprotocol.io/) for the MCP specification
248
+ - [FastMCP](https://github.com/jlowin/fastmcp) for the MCP server framework
249
+
250
+ ## 📞 Support
251
+
252
+ - **Issues**: [GitHub Issues](https://github.com/yourusername/mcp-server-tempest/issues)
253
+ - **Documentation**: [WeatherFlow API Docs](https://weatherflow.github.io/Tempest/api/)
254
+ - **Community**: [WeatherFlow Community](https://community.weatherflow.com/)
@@ -0,0 +1,213 @@
1
+ # WeatherFlow Tempest MCP Server
2
+
3
+ A Model Context Protocol (MCP) server that provides seamless access to WeatherFlow Tempest weather station data.
4
+ This server enables AI assistants and applications to retrieve real-time weather observations, forecasts, and station metadata.
5
+
6
+
7
+ ## 🌤️ Features
8
+
9
+ - **Real-time Weather Data**: Access current conditions from personal weather stations
10
+ - **Weather Forecasts**: Get hourly and daily forecasts with professional meteorological models
11
+ - **Station Management**: Discover and manage multiple weather stations
12
+ - **Device Information**: Detailed metadata about connected weather devices
13
+ - **Intelligent Caching**: Automatic caching with configurable TTL for optimal performance
14
+ - **Multiple Access Methods**: Both tools (interactive queries) and resources (data access)
15
+ - **Comprehensive Data**: Temperature, humidity, pressure, wind, precipitation, solar radiation, UV index, and lightning detection
16
+
17
+
18
+ ## 🚀 Quick Start
19
+
20
+ ### Prerequisites
21
+
22
+ - Python 3.13 or higher
23
+ - WeatherFlow API token (get one at [tempestwx.com/settings/tokens](https://tempestwx.com/settings/tokens))
24
+
25
+ ### Installation
26
+
27
+ While each client has its own way of specifying, you'll generally use the following values:
28
+
29
+ | Field | Value |
30
+ |-------|-------|
31
+ | **Command** | `uvx` |
32
+ | **Arguments** | `mcp-server-tempest` |
33
+ | **Environment** | `WEATHERFLOW_API_TOKEN` = `<YOUR TOKEN>` |
34
+
35
+
36
+ ### Development Version
37
+
38
+ If you'd like to use the latest and greatest, the server can be pulled straight from GitHub.
39
+ Just add an additional `--from` argument:
40
+
41
+
42
+ | Field | Value |
43
+ |-------|-------|
44
+ | **Command** | `uvx` |
45
+ | **Arguments** | `--from`, `git+https://github.com/briandconnelly/mcp-server-tempest`, `mcp-server-tempest` |
46
+ | **Environment** | `WEATHERFLOW_API_TOKEN` = `<YOUR TOKEN>` |
47
+
48
+
49
+ ## 📋 Configuration
50
+
51
+ ### Environment Variables
52
+
53
+ | Variable | Description | Default | Required |
54
+ |----------|-------------|---------|----------|
55
+ | `WEATHERFLOW_API_TOKEN` | Your WeatherFlow API token | - | ✅ Yes |
56
+ | `WEATHERFLOW_CACHE_TTL` | Cache timeout in seconds | 300 | No |
57
+ | `WEATHERFLOW_CACHE_SIZE` | Maximum cache entries | 100 | No |
58
+
59
+
60
+ ## 🛠️ Usage
61
+
62
+ ### Available Tools
63
+
64
+ #### `get_stations()`
65
+ Get a list of all your weather stations and connected devices.
66
+
67
+ ```python
68
+ # Get all available stations
69
+ stations = await client.call_tool("get_stations")
70
+ for station in stations.stations:
71
+ print(f"Station: {station.name} (ID: {station.station_id})")
72
+ print(f"Location: {station.latitude}, {station.longitude}")
73
+ ```
74
+
75
+ #### `get_observation(station_id)`
76
+ Get current weather conditions for a specific station.
77
+
78
+ ```python
79
+ # Get current conditions
80
+ obs = await client.call_tool("get_observation", {"station_id": 12345})
81
+ current = obs.obs[0]
82
+ print(f"Temperature: {current.air_temperature}°")
83
+ print(f"Humidity: {current.relative_humidity}%")
84
+ print(f"Wind: {current.wind_avg} {obs.station_units.units_wind}")
85
+ ```
86
+
87
+ #### `get_forecast(station_id)`
88
+ Get weather forecast and current conditions.
89
+
90
+ ```python
91
+ # Get forecast
92
+ forecast = await client.call_tool("get_forecast", {"station_id": 12345})
93
+
94
+ # Current conditions
95
+ current = forecast.current_conditions
96
+ print(f"Current: {current.air_temperature}°")
97
+ print(f"Conditions: {current.conditions}")
98
+
99
+ # Today's forecast
100
+ today = forecast.forecast.daily[0]
101
+ print(f"High/Low: {today.air_temp_high}°/{today.air_temp_low}°")
102
+ print(f"Rain chance: {today.precip_probability}%")
103
+ ```
104
+
105
+ #### `get_station_id(station_id)`
106
+ Get detailed information about a specific station.
107
+
108
+ ```python
109
+ # Get station details
110
+ station = await client.call_tool("get_station_id", {"station_id": 12345})
111
+ print(f"Station: {station.name}")
112
+ print(f"Elevation: {station.station_meta.elevation}m")
113
+ print(f"Devices: {len(station.devices)}")
114
+ ```
115
+
116
+ #### `clear_cache()`
117
+ Clear the data cache (useful for testing).
118
+
119
+ ```python
120
+ # Clear cache
121
+ await client.call_tool("clear_cache")
122
+ ```
123
+
124
+ ### Available Resources
125
+
126
+ The server also provides resources for data access:
127
+
128
+ - `weather://tempest/stations` - List all stations
129
+ - `weather://tempest/stations/{station_id}` - Station details
130
+ - `weather://tempest/observations/{station_id}` - Current observations
131
+ - `weather://tempest/forecast/{station_id}` - Weather forecast
132
+
133
+
134
+ ## 🌟 Examples
135
+
136
+ ### Basic Weather Check
137
+
138
+ ```python
139
+ # Get your stations
140
+ stations = await client.call_tool("get_stations")
141
+ station_id = stations.stations[0].station_id
142
+
143
+ # Get current conditions
144
+ obs = await client.call_tool("get_observation", {"station_id": station_id})
145
+ current = obs.obs[0]
146
+
147
+ print(f"🌡️ Temperature: {current.air_temperature}°{obs.station_units.units_temp}")
148
+ print(f"💧 Humidity: {current.relative_humidity}%")
149
+ print(f"💨 Wind: {current.wind_avg} {obs.station_units.units_wind}")
150
+ print(f"🌧️ Precipitation: {current.precip_accum_local_day} {obs.station_units.units_precip}")
151
+ ```
152
+
153
+ ### Weather Forecast
154
+
155
+ ```python
156
+ # Get forecast
157
+ forecast = await client.call_tool("get_forecast", {"station_id": station_id})
158
+
159
+ # Today's weather
160
+ today = forecast.forecast.daily[0]
161
+ print(f"📅 Today: {today.conditions}")
162
+ print(f"🌡️ High: {today.air_temp_high}° / Low: {today.air_temp_low}°")
163
+ print(f"🌧️ Rain chance: {today.precip_probability}%")
164
+
165
+ # Next few hours
166
+ for hour in forecast.forecast.hourly[:6]:
167
+ time = datetime.fromtimestamp(hour.time)
168
+ print(f"🕐 {time.strftime('%H:%M')}: {hour.air_temperature}° - {hour.conditions}")
169
+ ```
170
+
171
+ ### Station Information
172
+
173
+ ```python
174
+ # Get station details
175
+ station = await client.call_tool("get_station_id", {"station_id": station_id})
176
+
177
+ print(f"🏠 Station: {station.name}")
178
+ print(f"📍 Location: {station.latitude}°, {station.longitude}°")
179
+ print(f"⛰️ Elevation: {station.station_meta.elevation}m")
180
+ print(f"🕐 Timezone: {station.timezone}")
181
+
182
+ # Check device status
183
+ for device in station.devices:
184
+ if device.serial_number:
185
+ status = "🟢 Online" if device.device_meta else "🔴 Offline"
186
+ print(f"📡 {device.device_type}: {status}")
187
+ ```
188
+
189
+
190
+ ## 🤝 Contributing
191
+
192
+ 1. Fork the repository
193
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
194
+ 3. Commit your changes (`git commit -m 'Add amazing feature'`)
195
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
196
+ 5. Open a Pull Request
197
+
198
+
199
+ ## 📄 License
200
+
201
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
202
+
203
+ ## 🙏 Acknowledgments
204
+
205
+ - [WeatherFlow](https://weatherflow.com/) for providing the Tempest weather station and API
206
+ - [Model Context Protocol](https://modelcontextprotocol.io/) for the MCP specification
207
+ - [FastMCP](https://github.com/jlowin/fastmcp) for the MCP server framework
208
+
209
+ ## 📞 Support
210
+
211
+ - **Issues**: [GitHub Issues](https://github.com/yourusername/mcp-server-tempest/issues)
212
+ - **Documentation**: [WeatherFlow API Docs](https://weatherflow.github.io/Tempest/api/)
213
+ - **Community**: [WeatherFlow Community](https://community.weatherflow.com/)
@@ -0,0 +1,32 @@
1
+ [project]
2
+ name = "mcp-server-tempest"
3
+ version = "0.1.0"
4
+ description = "MCP Server for Retrieving Tempest Weather Data"
5
+ readme = "README.md"
6
+ license = { file = "LICENSE" }
7
+ authors = [
8
+ { name = "Brian Connelly", email = "bdc@bconnelly.net" }
9
+ ]
10
+ classifiers = [
11
+ "Development Status :: 4 - Beta",
12
+ "License :: OSI Approved :: MIT License",
13
+ "Operating System :: OS Independent",
14
+ "Programming Language :: Python",
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python :: 3.13",
17
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
18
+ ]
19
+ requires-python = ">=3.13"
20
+ dependencies = [
21
+ "cachetools>=6.1.0",
22
+ "fastmcp>=2.9.2",
23
+ "pydantic>=2.11.7",
24
+ "weatherflow4py>=1.4.1",
25
+ ]
26
+
27
+ [project.scripts]
28
+ mcp-server-tempest = "mcp_server_tempest:main"
29
+
30
+ [build-system]
31
+ requires = ["hatchling"]
32
+ build-backend = "hatchling.build"
@@ -0,0 +1,9 @@
1
+ from .server import mcp
2
+
3
+
4
+ def main():
5
+ mcp.run()
6
+
7
+
8
+ if __name__ == "__main__":
9
+ main()