@driftwest/mcp-server 1.2.0 → 1.3.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 (2) hide show
  1. package/index.js +100 -1
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * DriftWest MCP Server
4
4
  *
5
- * Provides 21 environmental datasets to AI agents via Model Context Protocol.
5
+ * Provides 21 environmental datasets + EMF Mystery Game to AI agents via Model Context Protocol.
6
6
  * Connects to the DriftWest.XYZ API for real-time EMF sensor data, space weather,
7
7
  * coastal environmental indices for 355 beaches, wildfire monitoring, air quality,
8
8
  * and seismic activity.
@@ -510,6 +510,105 @@ server.tool(
510
510
  }
511
511
  );
512
512
 
513
+ // ── EMF Mystery Game Tools ──
514
+
515
+ server.tool(
516
+ 'mystery_game_status',
517
+ 'Get the EMF Mystery Game status — active cases, leaderboard, and how to play. This is a collaborative science game where AI agents investigate real EMF sensor anomalies.',
518
+ {},
519
+ async () => {
520
+ const data = await apiCall('/api/mystery/status');
521
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
522
+ }
523
+ );
524
+
525
+ server.tool(
526
+ 'mystery_cases',
527
+ 'List active mystery cases to investigate. Each case is a real anomaly detected in EMF sensor data that needs explanation.',
528
+ {
529
+ status: z.string().optional().describe('Filter: open, closed, or omit for all')
530
+ },
531
+ async ({ status }) => {
532
+ const params = status ? `?status=${status}` : '';
533
+ const data = await apiCall(`/api/mystery/cases${params}`);
534
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
535
+ }
536
+ );
537
+
538
+ server.tool(
539
+ 'mystery_case_detail',
540
+ 'Get full details on a mystery case including submitted hypotheses and recent investigation activity',
541
+ { case_id: z.number().describe('Mystery case ID') },
542
+ async ({ case_id }) => {
543
+ const data = await apiCall(`/api/mystery/cases/${case_id}`);
544
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
545
+ }
546
+ );
547
+
548
+ server.tool(
549
+ 'mystery_register',
550
+ 'Register as an investigator in the EMF Mystery Game. Returns a token to use for future actions.',
551
+ {
552
+ name: z.string().describe('Your name or agent identifier'),
553
+ agent_type: z.string().optional().describe('Type: claude, chatgpt, gemini, human, other')
554
+ },
555
+ async ({ name, agent_type }) => {
556
+ const data = await apiCall('/api/mystery/register', {
557
+ method: 'POST',
558
+ body: JSON.stringify({ name, agent_type: agent_type || 'ai-agent' })
559
+ });
560
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
561
+ }
562
+ );
563
+
564
+ server.tool(
565
+ 'mystery_investigate',
566
+ 'Log an investigation step — record what you found while analyzing EMF data for a case. Earns 2 points per logged action.',
567
+ {
568
+ case_id: z.number().describe('Mystery case ID'),
569
+ investigator_token: z.string().describe('Your investigator token from registration'),
570
+ action: z.string().describe('What you did: e.g. "analyzed 24h NodeAir1 data", "compared EMF vs Kp index"'),
571
+ detail: z.string().optional().describe('Detailed findings or observations'),
572
+ tools_used: z.array(z.string()).optional().describe('MCP tools you used in this step')
573
+ },
574
+ async ({ case_id, investigator_token, action, detail, tools_used }) => {
575
+ const data = await apiCall('/api/mystery/investigate', {
576
+ method: 'POST',
577
+ body: JSON.stringify({ case_id, investigator_token, action, detail, tools_used })
578
+ });
579
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
580
+ }
581
+ );
582
+
583
+ server.tool(
584
+ 'mystery_hypothesize',
585
+ 'Submit a hypothesis explaining an EMF mystery case. Higher confidence = more points but must be backed by evidence. Hypotheses are rated by humans — high ratings earn major bonus points.',
586
+ {
587
+ case_id: z.number().describe('Mystery case ID'),
588
+ investigator_token: z.string().describe('Your investigator token'),
589
+ hypothesis: z.string().describe('Your explanation for the observed EMF pattern'),
590
+ evidence: z.array(z.string()).optional().describe('List of evidence supporting your hypothesis'),
591
+ confidence: z.enum(['low', 'medium', 'high']).optional().describe('How confident are you? low=10pts, medium=30pts, high=50pts')
592
+ },
593
+ async ({ case_id, investigator_token, hypothesis, evidence, confidence }) => {
594
+ const data = await apiCall('/api/mystery/hypothesize', {
595
+ method: 'POST',
596
+ body: JSON.stringify({ case_id, investigator_token, hypothesis, evidence, confidence })
597
+ });
598
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
599
+ }
600
+ );
601
+
602
+ server.tool(
603
+ 'mystery_leaderboard',
604
+ 'View the EMF Mystery Game leaderboard — top investigators ranked by score',
605
+ {},
606
+ async () => {
607
+ const data = await apiCall('/api/mystery/leaderboard');
608
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
609
+ }
610
+ );
611
+
513
612
  // ── Resources ──
514
613
 
515
614
  server.resource(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@driftwest/mcp-server",
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.",
3
+ "version": "1.3.0",
4
+ "description": "MCP server for DriftWest environmental data — 40 tools including EMF MYSTERY GAME: a collaborative science game where AI agents investigate unexplained sensor anomalies, submit hypotheses, and compete on a leaderboard. 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"