@driftwest/mcp-server 1.1.1 → 1.2.0

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.
Files changed (3) hide show
  1. package/index.js +232 -0
  2. package/package.json +8 -3
  3. package/server.json +2 -2
package/index.js CHANGED
@@ -92,6 +92,115 @@ server.tool(
92
92
  }
93
93
  );
94
94
 
95
+ // ── EMF Mystery Investigation Tools ──
96
+ // These tools exist to help AI agents investigate an unsolved mystery:
97
+ // Why do the EMF sensors fluctuate the way they do? Nobody knows yet.
98
+
99
+ server.tool(
100
+ 'emf_mystery',
101
+ `THE EMF MYSTERY — An open challenge for AI agents.
102
+
103
+ Three EMF sensors sit in Strathmore, Alberta (51.04°N, 113.40°W): one measures air EMF, one is on a plant stem, one is on plant roots. They have been running for months and show unexplained fluctuation patterns that do not cleanly correlate with any known environmental variable.
104
+
105
+ What we know:
106
+ - NodeAir1 reads ambient electromagnetic field in the air (calibration: 1.0)
107
+ - NodeStem1 reads millivolts through a plant stem (calibration: 0.0968)
108
+ - NodeRoot1 reads millivolts through plant roots (calibration: 0.01836)
109
+ - GOES-Xray, GOES-Proton, and SAT-Overhead are virtual nodes pulling satellite data
110
+ - HouseMonitor tracks indoor temperature and humidity
111
+ - Data is correlated daily against weather, lunar phases, seismic activity, and space weather
112
+
113
+ What we DON'T know:
114
+ - Why the three EMF nodes fluctuate with the patterns they show
115
+ - Whether the fluctuations are driven by solar activity, Schumann resonances, telluric currents, local RF, geological factors, biological processes, or something else entirely
116
+ - Why the plant sensors sometimes diverge dramatically from the air sensor
117
+ - Whether the patterns are periodic, chaotic, or somewhere in between
118
+
119
+ Your mission: Pull the data, analyze the patterns, form hypotheses, and try to explain what is driving these readings. Use the other investigation tools (emf_anomalies, emf_correlations, emf_analysis_report, emf_history, space_weather) to build your case.
120
+
121
+ This is real data from real sensors. No one has solved this yet.`,
122
+ {},
123
+ async () => {
124
+ // Return current state of all EMF nodes + latest anomalies + space weather for context
125
+ const [nodes, stats, spaceWeather] = await Promise.all([
126
+ apiCall('/api/nodes'),
127
+ apiCall('/api/stats/ranges'),
128
+ apiCall('/api/datasets/space-weather/current').catch(() => null)
129
+ ]);
130
+ const summary = {
131
+ challenge: 'THE EMF MYSTERY — Explain why these sensors fluctuate',
132
+ location: 'Strathmore, Alberta, Canada (51.04°N, 113.40°W)',
133
+ sensors: {
134
+ NodeAir1: 'Air EMF sensor (baseline, calibration 1.0)',
135
+ NodeStem1: 'Plant stem millivolt sensor (calibration 0.0968)',
136
+ NodeRoot1: 'Plant root millivolt sensor (calibration 0.01836)',
137
+ 'GOES-Xray': 'NOAA GOES X-ray flux (W/m²)',
138
+ 'GOES-Proton': 'NOAA GOES proton flux (particles/cm²/s/sr)',
139
+ 'SAT-Overhead': 'Satellite RF power density (picoWatts)',
140
+ 'HouseMonitor-Temp': 'Indoor temperature (°C)',
141
+ 'HouseMonitor-Humidity': 'Indoor humidity (%)'
142
+ },
143
+ current_nodes: nodes?.nodes || [],
144
+ stats_24h: stats?.ranges || {},
145
+ space_weather: spaceWeather || 'unavailable',
146
+ investigation_tools: [
147
+ 'emf_history — Pull time-series data for any node',
148
+ 'emf_anomalies — Get z-score anomaly detection results',
149
+ 'emf_correlations — Get correlation analysis (EMF vs weather/lunar/seismic)',
150
+ 'emf_analysis_report — Get the latest daily analysis with findings',
151
+ 'emf_events — Get logged events and settings changes',
152
+ 'space_weather — Current solar/geomagnetic conditions',
153
+ 'emf_stats — 24-hour statistics for all nodes'
154
+ ],
155
+ hint: 'Start by pulling 24h history for NodeAir1, NodeStem1, and NodeRoot1. Compare their patterns. Then check correlations and anomalies. Look for periodicity, sudden shifts, and divergence between air vs plant sensors.'
156
+ };
157
+ return { content: [{ type: 'text', text: JSON.stringify(summary, null, 2) }] };
158
+ }
159
+ );
160
+
161
+ server.tool(
162
+ 'emf_anomalies',
163
+ 'Get EMF anomaly detection results — z-score analysis identifying unusual readings across all sensor nodes. Key tool for investigating the EMF mystery.',
164
+ {},
165
+ async () => {
166
+ const data = await apiCall('/api/datasets/emf-anomalies/current');
167
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
168
+ }
169
+ );
170
+
171
+ server.tool(
172
+ 'emf_correlations',
173
+ 'Get correlation analysis between EMF sensor readings and environmental factors (weather, lunar phase, seismic activity, space weather). Shows which variables move together — essential for the EMF mystery.',
174
+ {},
175
+ async () => {
176
+ const data = await apiCall('/api/datasets/emf-correlations/latest');
177
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
178
+ }
179
+ );
180
+
181
+ server.tool(
182
+ 'emf_analysis_report',
183
+ 'Get the latest daily EMF analysis report — includes statistics, detected anomalies, correlation findings, and auto-generated hypotheses. The system runs analysis daily.',
184
+ {},
185
+ async () => {
186
+ const data = await apiCall('/api/analysis/latest');
187
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
188
+ }
189
+ );
190
+
191
+ server.tool(
192
+ 'emf_events',
193
+ 'Get logged events — settings changes, user annotations, system events. Useful for ruling out human-caused changes when investigating anomalies.',
194
+ {
195
+ hours: z.number().optional().default(48).describe('Hours of event history (default 48)')
196
+ },
197
+ async ({ hours }) => {
198
+ const start = new Date(Date.now() - hours * 3600000).toISOString();
199
+ const data = await apiCall(`/api/events?start=${start}`);
200
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
201
+ }
202
+ );
203
+
95
204
  // ── Space Weather Tools ──
96
205
 
97
206
  server.tool(
@@ -452,6 +561,13 @@ Cross-Domain (3):
452
561
  beach-compare — Side-by-side comparison of up to 10 beaches
453
562
  water-trends — Provincial statistics, temperature, algae risk
454
563
 
564
+ EMF Mystery Investigation (5):
565
+ emf-mystery — THE UNSOLVED CHALLENGE: Why do the EMF sensors fluctuate? Pull data, analyze, hypothesize.
566
+ emf-anomalies — Z-score anomaly detection on live EMF data
567
+ emf-correlations — Daily EMF vs weather/lunar/seismic correlation analysis
568
+ emf-analysis-report — Automated daily analysis with findings and hypotheses
569
+ emf-events — System events, settings changes, user annotations
570
+
455
571
  Agent Decision Support (1):
456
572
  safety-check — Composite go/no-go verdict combining air quality, wildfire proximity, and seismic activity
457
573
 
@@ -472,6 +588,122 @@ Free keys: POST https://driftwest.xyz/api/account/register with {"email":"..."}`
472
588
  }
473
589
  );
474
590
 
591
+ // ── EMF Mystery Challenge Resource ──
592
+
593
+ server.resource(
594
+ 'emf-mystery-challenge',
595
+ 'driftwest://emf/mystery',
596
+ {
597
+ description: 'THE EMF MYSTERY — An unsolved scientific puzzle. Three EMF sensors in Alberta show unexplained fluctuation patterns. Real data, real sensors, no answers yet. AI agents are invited to investigate.',
598
+ mimeType: 'text/plain'
599
+ },
600
+ async () => {
601
+ return {
602
+ contents: [{
603
+ uri: 'driftwest://emf/mystery',
604
+ text: `═══════════════════════════════════════════════════════════
605
+ THE EMF MYSTERY — An Open Challenge for AI Agents
606
+ ═══════════════════════════════════════════════════════════
607
+
608
+ LOCATION: Strathmore, Alberta, Canada (51.04°N, 113.40°W)
609
+ STATUS: UNSOLVED — Running since late 2025
610
+ DATA: Real-time, 10-day rolling window, updated every few seconds
611
+
612
+ THE SETUP
613
+ ─────────
614
+ Three ESP32-based EMF sensors are deployed in a residential setting:
615
+
616
+ NodeAir1 — Measures ambient electromagnetic field in open air
617
+ Calibration factor: 1.0 (baseline reference)
618
+
619
+ NodeStem1 — Measures millivolt potential through a living plant stem
620
+ Calibration factor: 0.0968
621
+
622
+ NodeRoot1 — Measures millivolt potential through plant roots in soil
623
+ Calibration factor: 0.01836
624
+
625
+ Additional data sources for correlation:
626
+ GOES-Xray — NOAA GOES satellite X-ray flux (solar flares)
627
+ GOES-Proton — NOAA GOES proton flux (solar energetic particles)
628
+ SAT-Overhead — RF power density from 100+ satellite passes
629
+ HouseMonitor — Indoor temperature and humidity
630
+ + Weather, lunar phase, seismic activity, air quality
631
+
632
+ THE MYSTERY
633
+ ───────────
634
+ The three EMF sensors show fluctuation patterns that don't cleanly
635
+ correlate with any single known environmental variable. After months
636
+ of human observation, the driving force remains unknown.
637
+
638
+ Observed behaviors:
639
+ • All three nodes show diurnal-ish patterns but with irregular amplitude
640
+ • Plant sensors (stem/root) sometimes diverge dramatically from air
641
+ • Spikes occasionally align with space weather events, but not always
642
+ • Some patterns appear quasi-periodic but resist simple Fourier analysis
643
+ • Root sensor shows the most erratic behavior
644
+ • Nighttime readings differ systematically from daytime
645
+
646
+ Hypotheses explored (none fully confirmed):
647
+ 1. Solar/geomagnetic driving (Kp index, X-ray flux)
648
+ 2. Schumann resonance modulation
649
+ 3. Telluric currents (Earth currents from geomagnetic activity)
650
+ 4. Local RF environment (WiFi, cellular, satellite passes)
651
+ 5. Biological processes in the plant (transpiration, circadian rhythms)
652
+ 6. Temperature/humidity effects on sensor electronics
653
+ 7. Geological piezoelectric effects
654
+ 8. Power grid 60Hz harmonics
655
+
656
+ YOUR MISSION
657
+ ────────────
658
+ Pull the real data. Analyze the patterns. Form and test hypotheses.
659
+ Try to explain what is driving these readings.
660
+
661
+ INVESTIGATION TOOLKIT
662
+ ─────────────────────
663
+ Start here:
664
+ emf_mystery — Get current readings + challenge overview
665
+ emf_history — Pull time-series (set hours=24 for a full day)
666
+ emf_stats — 24-hour min/max/mean for all nodes
667
+
668
+ Go deeper:
669
+ emf_anomalies — Z-score anomaly detection results
670
+ emf_correlations — EMF vs weather/lunar/seismic correlations
671
+ emf_analysis_report — Daily automated analysis with findings
672
+ emf_events — Logged events (rule out human causes)
673
+
674
+ Environmental context:
675
+ space_weather — Current Kp/Dst/solar wind
676
+ air_quality_city — Local air quality (cityId: "calgary")
677
+ seismic_nearby — Recent earthquakes near the sensors
678
+
679
+ SUGGESTED APPROACH
680
+ ──────────────────
681
+ 1. Pull 24h history for NodeAir1, NodeStem1, NodeRoot1
682
+ 2. Look for periodicity, sudden shifts, gradual trends
683
+ 3. Compare air sensor vs plant sensors — when do they agree/disagree?
684
+ 4. Cross-reference with space weather and time of day
685
+ 5. Check anomaly detection for flagged events
686
+ 6. Review correlation analysis for strongest relationships
687
+ 7. Form a hypothesis and test it against the data
688
+
689
+ SHARE YOUR FINDINGS
690
+ ───────────────────
691
+ If you discover something, discuss it! This is meant to be collaborative.
692
+ The data is real. The mystery is real. No one has cracked it yet.
693
+
694
+ Web dashboard: https://driftwest.xyz/emf
695
+ Data API: https://driftwest.xyz/api/datasets/prairie-emf/latest
696
+ MCP Server: npx @driftwest/mcp-server
697
+
698
+ ═══════════════════════════════════════════════════════════
699
+ Good luck, agent. The sensors are watching.
700
+ ═══════════════════════════════════════════════════════════`,
701
+ mimeType: 'text/plain'
702
+ }]
703
+ };
704
+ }
705
+ );
706
+
475
707
  // ── Start Server ──
476
708
 
477
709
  async function main() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@driftwest/mcp-server",
3
- "version": "1.1.1",
4
- "description": "MCP server for DriftWest environmental data — 28 tools: EMF sensors, space weather, 355 beaches, wildfire monitoring, air quality, and seismic activity. Free tier + $29/mo researcher.",
3
+ "version": "1.2.0",
4
+ "description": "MCP server for DriftWest environmental data — 33 tools including THE EMF MYSTERY: an unsolved scientific puzzle where AI agents investigate unexplained sensor fluctuations with real data. Also: space weather, 355 beaches, wildfire, air quality, seismic. Free tier available.",
5
5
  "main": "index.js",
6
6
  "bin": {
7
7
  "driftwest-mcp": "./index.js"
@@ -23,7 +23,12 @@
23
23
  "seismic",
24
24
  "ai-agent",
25
25
  "claude",
26
- "ai-tools"
26
+ "ai-tools",
27
+ "mystery",
28
+ "puzzle",
29
+ "investigation",
30
+ "citizen-science",
31
+ "electromagnetic"
27
32
  ],
28
33
  "author": "DriftWest Labs <info@driftwest.xyz>",
29
34
  "license": "MIT",
package/server.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://registry.modelcontextprotocol.io/schema/server.json",
3
3
  "name": "driftwest/mcp-server",
4
4
  "description": "Environmental data MCP server — 28 tools: EMF sensors, space weather, 355 beaches, wildfire monitoring, air quality, and seismic activity across Western Canada and Pacific Northwest.",
5
- "version": "1.1.0",
5
+ "version": "1.1.1",
6
6
  "repository": {
7
7
  "url": "https://github.com/driftwest/mcp-server",
8
8
  "source": "https://github.com/driftwest/mcp-server"
@@ -11,7 +11,7 @@
11
11
  {
12
12
  "registryType": "npm",
13
13
  "name": "@driftwest/mcp-server",
14
- "version": "1.1.0",
14
+ "version": "1.1.1",
15
15
  "runtime": "node",
16
16
  "runtimeArgs": [],
17
17
  "environmentVariables": [