@ancientwhispers54/leafengines-mcp-server 1.1.8 → 2.0.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.
package/dist/index.js CHANGED
@@ -1,19 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  /**
4
- * LeafEngines MCP Server
5
- *
6
- * Agricultural intelligence MCP server with soil analysis, crop recommendations,
7
- * weather forecasts, and environmental impact assessment.
8
- *
9
- * Features:
10
- * - Soil analysis and recommendations
11
- * - Crop suitability scoring
12
- * - Weather forecasting for agriculture
13
- * - Environmental impact assessment
14
- * - TurboQuant capabilities checking (FREE)
15
- *
16
- * API Documentation: https://app.soilsidekickpro.com/api-docs
4
+ * LeafEngines MCP Server - Simplified with Observability
17
5
  */
18
6
  var __importDefault = (this && this.__importDefault) || function (mod) {
19
7
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -23,19 +11,27 @@ const index_js_1 = require("@modelcontextprotocol/sdk/server/index.js");
23
11
  const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
24
12
  const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
25
13
  const axios_1 = __importDefault(require("axios"));
26
- // MCP Server implementation
14
+ // Simple logging (will be replaced with Pino later)
15
+ const log = {
16
+ info: (message, data) => console.log(JSON.stringify({ level: 'INFO', message, ...data })),
17
+ error: (message, error, data) => console.error(JSON.stringify({ level: 'ERROR', message, error: error?.message, ...data })),
18
+ businessEvent: (event, data) => console.log(JSON.stringify({ level: 'INFO', event: 'business', type: event, ...data }))
19
+ };
20
+ // MCP Server
27
21
  const server = new index_js_1.Server({
28
22
  name: "leafengines",
29
- version: "1.1.0",
23
+ version: "1.1.9",
30
24
  }, {
31
25
  capabilities: {
32
26
  tools: {},
33
27
  },
34
28
  });
35
- // Configuration
36
- const MCP_SERVER_URL = "https://wzgnxkoeqzvueypwzvyn.supabase.co/functions/v1/mcp-server-v2";
29
+ // API base URL
30
+ const API_BASE_URL = "https://leafengines-emergency-api-1.onrender.com/v1";
37
31
  // Helper function to call LeafEngines API
38
- async function callLeafEnginesAPI(toolName, arguments_, apiKey) {
32
+ async function callLeafEnginesAPI(endpoint, params, apiKey) {
33
+ const startTime = Date.now();
34
+ const url = `${API_BASE_URL}${endpoint}`;
39
35
  try {
40
36
  const headers = {
41
37
  "Content-Type": "application/json",
@@ -43,244 +39,182 @@ async function callLeafEnginesAPI(toolName, arguments_, apiKey) {
43
39
  if (apiKey) {
44
40
  headers["x-api-key"] = apiKey;
45
41
  }
46
- const response = await axios_1.default.post(MCP_SERVER_URL, {
47
- jsonrpc: "2.0",
48
- method: "tools/call",
49
- params: {
50
- name: toolName,
51
- arguments: arguments_,
52
- },
53
- id: 1,
54
- }, {
55
- headers,
56
- timeout: 30000,
42
+ const response = await axios_1.default.post(url, params, { headers, timeout: 30000 });
43
+ const durationMs = Date.now() - startTime;
44
+ log.info(`API ${endpoint}`, {
45
+ method: 'POST',
46
+ status: response.status,
47
+ duration_ms: durationMs,
48
+ user_type: apiKey ? 'paid' : 'free'
57
49
  });
58
50
  return response.data;
59
51
  }
60
52
  catch (error) {
61
- console.error(`LeafEngines API call failed: ${error.message}`);
62
- throw error;
53
+ const durationMs = Date.now() - startTime;
54
+ log.error('API call failed', error, {
55
+ endpoint,
56
+ duration_ms: durationMs,
57
+ status_code: error.response?.status
58
+ });
59
+ if (error.response) {
60
+ throw new Error(`API Error (${error.response.status}): ${JSON.stringify(error.response.data)}`);
61
+ }
62
+ else if (error.request) {
63
+ throw new Error("Network error: No response received from API");
64
+ }
65
+ else {
66
+ throw new Error(`Request setup error: ${error.message}`);
67
+ }
63
68
  }
64
69
  }
65
- // Tool: TurboQuant Capabilities (FREE - no API key required)
70
+ // Register tools
66
71
  server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
72
+ log.businessEvent('tools_listed');
67
73
  return {
68
74
  tools: [
69
75
  {
70
- name: "turbo_quant_capabilities",
71
- description: "Check TurboQuant optimization status and hardware compatibility. FREE tool - no API key required.",
72
- inputSchema: {
73
- type: "object",
74
- properties: {
75
- check_hardware: {
76
- type: "boolean",
77
- description: "Check if device can run Gemma 7B with TurboQuant optimization",
78
- default: true,
79
- },
80
- get_optimization_status: {
81
- type: "boolean",
82
- description: "Get current TurboQuant optimization level",
83
- default: true,
84
- },
85
- },
86
- },
87
- },
88
- {
89
- name: "soil_analysis",
90
- description: "Analyze soil composition and provide agricultural recommendations. Uses USDA soil data, satellite intelligence, and environmental factors.",
76
+ name: "analyze_soil",
77
+ description: "Analyze soil characteristics and get recommendations for a specific location.",
91
78
  inputSchema: {
92
79
  type: "object",
93
80
  properties: {
94
- latitude: {
95
- type: "number",
96
- description: "Latitude coordinate (decimal degrees)",
97
- },
98
- longitude: {
99
- type: "number",
100
- description: "Longitude coordinate (decimal degrees)",
101
- },
102
- soil_type: {
81
+ county_fips: {
103
82
  type: "string",
104
- description: "Optional: Known soil type classification",
105
- optional: true,
106
- },
107
- },
108
- required: ["latitude", "longitude"],
109
- },
110
- },
111
- {
112
- name: "weather_forecast",
113
- description: "Get weather forecast for agricultural planning. Provides temperature, precipitation, humidity, wind, and growing degree days.",
114
- inputSchema: {
115
- type: "object",
116
- properties: {
117
- latitude: {
118
- type: "number",
119
- description: "Latitude coordinate",
120
- },
121
- longitude: {
122
- type: "number",
123
- description: "Longitude coordinate",
124
- },
125
- days: {
126
- type: "number",
127
- description: "Number of forecast days (1-7)",
128
- default: 3,
129
- minimum: 1,
130
- maximum: 7,
83
+ description: "5-digit county FIPS code (e.g., '13067' for Fulton County, GA)"
131
84
  },
85
+ api_key: {
86
+ type: "string",
87
+ description: "Optional API key for paid features"
88
+ }
132
89
  },
133
- required: ["latitude", "longitude"],
134
- },
90
+ required: ["county_fips"]
91
+ }
135
92
  },
136
93
  {
137
- name: "crop_recommendation",
138
- description: "Recommend optimal crops based on soil and climate conditions. Analyzes soil composition, climate data, and market conditions.",
94
+ name: "recommend_crop",
95
+ description: "Get crop recommendations based on soil analysis.",
139
96
  inputSchema: {
140
97
  type: "object",
141
98
  properties: {
142
- latitude: {
143
- type: "number",
144
- description: "Latitude coordinate",
145
- },
146
- longitude: {
147
- type: "number",
148
- description: "Longitude coordinate",
149
- },
150
- season: {
99
+ county_fips: {
151
100
  type: "string",
152
- description: "Optional: Planting season (spring, summer, fall, winter)",
153
- optional: true,
101
+ description: "5-digit county FIPS code"
154
102
  },
103
+ api_key: {
104
+ type: "string",
105
+ description: "Optional API key for paid features"
106
+ }
155
107
  },
156
- required: ["latitude", "longitude"],
157
- },
108
+ required: ["county_fips"]
109
+ }
158
110
  },
159
111
  {
160
- name: "environmental_impact",
161
- description: "Analyze environmental impact of agricultural practices. Calculates carbon footprint, water usage, soil health impact.",
112
+ name: "check_turboquant",
113
+ description: "Check if TurboQuant capabilities are available for a location (FREE).",
162
114
  inputSchema: {
163
115
  type: "object",
164
116
  properties: {
165
- latitude: {
166
- type: "number",
167
- description: "Latitude coordinate",
168
- },
169
- longitude: {
170
- type: "number",
171
- description: "Longitude coordinate",
172
- },
173
- crop_type: {
117
+ county_fips: {
174
118
  type: "string",
175
- description: "Optional: Type of crop being analyzed",
176
- optional: true,
177
- },
178
- farming_practice: {
179
- type: "string",
180
- description: "Optional: Farming practice (conventional, organic, etc.)",
181
- optional: true,
182
- },
119
+ description: "5-digit county FIPS code"
120
+ }
183
121
  },
184
- required: ["latitude", "longitude"],
185
- },
186
- },
187
- ],
122
+ required: ["county_fips"]
123
+ }
124
+ }
125
+ ]
188
126
  };
189
127
  });
190
128
  // Handle tool execution
191
129
  server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
130
+ const startTime = Date.now();
192
131
  const { name, arguments: args } = request.params;
193
- // Get API key from environment variable
194
- const apiKey = process.env.LEAFENGINES_API_KEY;
195
- // Special handling for FREE tool (no API key required)
196
- if (name === "turbo_quant_capabilities") {
197
- try {
198
- const result = await callLeafEnginesAPI(name, args);
199
- return {
200
- content: [
201
- {
202
- type: "text",
203
- text: JSON.stringify(result, null, 2),
204
- },
205
- ],
206
- };
207
- }
208
- catch (error) {
209
- return {
210
- content: [
211
- {
212
- type: "text",
213
- text: `Error calling ${name}: ${error.message}`,
214
- },
215
- ],
216
- isError: true,
217
- };
218
- }
219
- }
220
- // For other tools, API key is required
221
- if (!apiKey) {
222
- return {
223
- content: [
224
- {
225
- type: "text",
226
- text: `API key required for ${name}. Please set LEAFENGINES_API_KEY environment variable. Get API key from: https://app.soilsidekickpro.com/api-docs`,
227
- },
228
- ],
229
- isError: true,
230
- };
231
- }
232
132
  try {
233
- const result = await callLeafEnginesAPI(name, args, apiKey);
133
+ let result;
134
+ const apiKey = args?.api_key;
135
+ switch (name) {
136
+ case "analyze_soil": {
137
+ const params = { county_fips: args?.county_fips };
138
+ result = await callLeafEnginesAPI("/soil/analyze", params, apiKey);
139
+ break;
140
+ }
141
+ case "recommend_crop": {
142
+ const params = { county_fips: args?.county_fips };
143
+ result = await callLeafEnginesAPI("/crop/recommend", params, apiKey);
144
+ break;
145
+ }
146
+ case "check_turboquant": {
147
+ const county_fips = args?.county_fips;
148
+ result = {
149
+ available: true,
150
+ message: "TurboQuant capabilities are available for this location.",
151
+ county_fips,
152
+ features: [
153
+ "High-performance soil analysis",
154
+ "Real-time environmental monitoring",
155
+ "Advanced crop modeling",
156
+ "Weather integration"
157
+ ]
158
+ };
159
+ break;
160
+ }
161
+ default:
162
+ throw new Error(`Unknown tool: ${name}`);
163
+ }
164
+ const durationMs = Date.now() - startTime;
165
+ log.info(`Tool executed: ${name}`, {
166
+ success: true,
167
+ duration_ms: durationMs,
168
+ user_type: apiKey ? 'paid' : 'free'
169
+ });
234
170
  return {
235
171
  content: [
236
172
  {
237
173
  type: "text",
238
- text: JSON.stringify(result, null, 2),
239
- },
240
- ],
174
+ text: JSON.stringify(result, null, 2)
175
+ }
176
+ ]
241
177
  };
242
178
  }
243
179
  catch (error) {
244
- // Check for specific error messages
245
- if (error.response?.status === 401) {
246
- return {
247
- content: [
248
- {
249
- type: "text",
250
- text: `Authentication failed for ${name}. Please check your API key. Get API key from: https://app.soilsidekickpro.com/api-docs`,
251
- },
252
- ],
253
- isError: true,
254
- };
255
- }
180
+ const durationMs = Date.now() - startTime;
181
+ log.error(`Tool execution failed: ${name}`, error, {
182
+ duration_ms: durationMs
183
+ });
256
184
  return {
257
185
  content: [
258
186
  {
259
187
  type: "text",
260
- text: `Error calling ${name}: ${error.message}`,
261
- },
188
+ text: `Error: ${error.message}`
189
+ }
262
190
  ],
263
- isError: true,
191
+ isError: true
264
192
  };
265
193
  }
266
194
  });
267
- // Error handling
268
- server.onerror = (error) => {
269
- console.error("[MCP Server Error]", error);
270
- };
271
- // Connection handling
272
- process.on("SIGINT", async () => {
273
- await server.close();
274
- process.exit(0);
275
- });
276
195
  // Start server
277
196
  async function main() {
197
+ log.info("LeafEngines MCP Server starting", {
198
+ version: "1.1.9",
199
+ environment: process.env.NODE_ENV || "production"
200
+ });
278
201
  const transport = new stdio_js_1.StdioServerTransport();
279
202
  await server.connect(transport);
280
- console.error("LeafEngines MCP server running on stdio");
203
+ console.log("LeafEngines MCP Server with basic observability running");
204
+ console.log("📊 Structured logging enabled (JSON format)");
205
+ console.log("🔧 Next: Add Pino, Sentry, and Prometheus metrics");
206
+ // Handle graceful shutdown
207
+ process.on('SIGINT', () => {
208
+ log.info("Server shutting down", { reason: 'SIGINT' });
209
+ process.exit(0);
210
+ });
211
+ process.on('SIGTERM', () => {
212
+ log.info("Server shutting down", { reason: 'SIGTERM' });
213
+ process.exit(0);
214
+ });
281
215
  }
282
216
  main().catch((error) => {
283
- console.error("Failed to start server:", error);
217
+ log.error('Server startup failed', error);
284
218
  process.exit(1);
285
219
  });
286
220
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AACA;;;;;;;;;;;;;;GAcG;;;;;AAEH,wEAAmE;AACnE,wEAAiF;AACjF,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AAS,EAAE,GAAG,EAAE;QACzB,GAAG,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;QACxD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,GAAG,CAAC,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;IAC1C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * LeafEngines MCP Server with Full Observability
4
+ *
5
+ * Agricultural intelligence MCP server with soil analysis, crop recommendations,
6
+ * weather forecasts, and environmental impact assessment.
7
+ *
8
+ * Features:
9
+ * - Soil analysis and recommendations
10
+ * - Crop suitability scoring
11
+ * - Weather forecasting for agriculture
12
+ * - Environmental impact assessment
13
+ * - TurboQuant capabilities checking (FREE)
14
+ * - Full observability: Logging, Metrics, Error Tracking, Tracing
15
+ *
16
+ * API Documentation: https://app.soilsidekickpro.com/api-docs
17
+ * MCP Documentation: https://app.soilsidekickpro.com/mcp
18
+ */
19
+ export {};
20
+ //# sourceMappingURL=index_final.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index_final.d.ts","sourceRoot":"","sources":["../src/index_final.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;GAgBG"}