@ancientwhispers54/leafengines-mcp-server 2.0.3 → 2.0.6

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/README.md CHANGED
@@ -1,137 +1,44 @@
1
+ # LeafEngines MCP Server — Agricultural Intelligence for AI Agents
1
2
 
2
- ## 🎯 QGIS Plugin Officially Approved!
3
+ **Patent-protected soil analysis, crop recommendations, and environmental intelligence** via Model Context Protocol. 1,092+ downloads. Works with Claude Desktop, Cursor, OpenClaw, and any MCP-compatible client.
3
4
 
4
- ## 🚀 FREE TIER: NO API KEY NEEDED!nn**Immediate access with test key:** `leaf-test-370df0a2e62e`nn### ✅ Try It Now (No Waiting):nn1. **Use test key:** `leaf-test-370df0a2e62e`n2. **Immediate access** to all featuresn3. **No forms, no waiting, no approval**n4. **Works across all platforms**nn**Test key gives you:**n- Full soil analysis capabilitiesn- Crop recommendationsn- Weather datan- Environmental impact assessmentn- All free tier featuresnn---nn**Want higher limits or commercial use?** Get instant API keys via [Stripe checkout](https://buy.stripe.com/14A7sL30y8bR2F4fbgaMU02) (Starter: $49 Founder Pricing).
5
+ ## Get Started Now
5
6
 
6
- **Plugin ID:** 4987 (LeafEngines Agricultural Intelligence)
7
- **Version:** 1.0.2 Experimental
8
- **Status:** **PUBLICLY AVAILABLE**
9
- **Download:** https://plugins.qgis.org/plugins/qgis_leafengines/version/1.0.2/download/
7
+ **Free tier no signup, no credit card:**
8
+ - **Test key:** `leaf-test-370df0a2e62e` (paste into config, works immediately)
9
+ - **Free header:** `x-free-tier: true` (no key needed at all)
10
10
 
11
- ### Key Features:
12
- - **USDA soil data** - Soil composition, pH, N/P/K recommendations
13
- - **EPA water quality** - Water quality metrics and analysis
14
- - **NOAA climate data** - Historical weather patterns and agricultural forecasting
15
- - **Satellite vegetation indices** - NDVI, water-stress overlays from NASA MODIS
16
- - **AI-powered crop recommendations** - Tailored to exact field polygons
17
- - **Carbon credit calculations** - Environmental impact scoring for regulatory compliance
18
- - **Offline-first architecture** - Works in remote/"deep canopy" areas
19
- - **GPS-denied capabilities** - Military-proven algorithms for contested environments
11
+ **Ready for production? Founder pricing ends June 1, 2026:**
12
+ - [Starter $10/mo lifetime $49/mo lock →](https://buy.stripe.com/14A7sL30y8bR2F4fbgaMU02)
13
+ - [Pro $49/mo lifetime $149/mo lock →](https://buy.stripe.com/cNi3cv1WuajZcfE7IOaMU03)
20
14
 
21
- ### Strategic Advantages for Partners:
22
- 1. **Pre-vetted, low-risk integration** - Officially approved by QGIS after rigorous review
23
- 2. **Seamless future-proofing** - Aligns with QGIS release cycles (QGIS 4.0.0+ ready)
24
- 3. **Instant credibility** - Discoverable by 500,000+ QGIS users in agriculture sector
25
- 4. **Regulatory advantage** - Preferred for government/EPA/USDA-related procurements
26
- 5. **Ecosystem power** - Integrates with thousands of complementary QGIS plugins
15
+ **Get a professional soil report (no coding required):** [soilcertify.com →](https://soilcertify.com)
27
16
 
28
- ### For OEM Partners:
29
- Embed LeafEngines agricultural intelligence directly into your hardware or software platforms with confidence. The official QGIS approval eliminates weeks of custom validation, security audits, and compatibility testing.
17
+ ---
30
18
 
31
- *Approved: April 14, 2026*
19
+ ## 🌾 What It Does
32
20
 
21
+ LeafEngines gives AI agents real-time agricultural intelligence from USDA, EPA, and NOAA data:
33
22
 
34
- # @ancientwhispers54/leafengines-mcp-server
23
+ - **Soil Analysis** — pH, nutrients, organic matter, drainage, recommendations for any US county
24
+ - **Crop Recommendations** — Location-specific planting advice based on soil and climate
25
+ - **Environmental Impact** — Carbon credits, sustainability scoring, compliance data
26
+ - **Water Quality** — EPA monitoring data and contamination risk assessment
27
+ - **Climate Insights** — NOAA historical records and agricultural forecasting
28
+ - **TurboQuant Check** — Hardware optimization for edge/offline deployment (always free)
35
29
 
36
- LeafEngines MCP Server - Agricultural intelligence for AI agents
37
-
38
- ## 🎯 What is MCP?
39
-
40
- **Model Context Protocol (MCP)** is a standard for connecting AI assistants to external data sources and tools. This server provides agricultural intelligence data to AI agents like Claude, ChatGPT, and others.
41
-
42
- ## ✨ Features
43
-
44
- - **Soil Intelligence:** USDA soil data analysis
45
- - **Water Quality:** EPA monitoring data
46
- - **Climate Insights:** NOAA historical records
47
- - **Agricultural Recommendations:** Location-specific advice
48
- - **AI-Native:** Built specifically for AI agent consumption
49
-
50
- ## 🚀 v2.0.0 Enhanced Experience
51
-
52
- ### 🎉 New User Benefits
53
-
54
- **✨ Usage Insights Dashboard**
55
- - See your own usage patterns and trends
56
- - Optimize API calls based on your behavior
57
- - Get personalized recommendations
58
- - Privacy-first: Your data, your insights
59
-
60
- **✨ Smarter Error Diagnostics**
61
- - Detailed error explanations with solutions
62
- - Context-aware troubleshooting
63
- - Links to relevant documentation
64
- - Reduced debugging time by 70%
65
-
66
- **✨ 30% Performance Boost**
67
- - Optimized data processing pipeline
68
- - Reduced latency for common queries
69
- - Better caching strategies
70
- - Smoother user experience
71
-
72
- **✨ Enhanced Free Tier**
73
- - 50% more free requests per month
74
- - Extended rate limits
75
- - Additional data sources available
76
- - Better onboarding experience
77
-
78
- ### 🛠️ Infrastructure Improvements
79
- - **New dedicated support:** support@soilsidekickpro.com (24-hour response)
80
- - **Enhanced documentation:** Comprehensive guides and examples
81
- - **Improved reliability:** 99.9% uptime monitoring
82
-
83
- ### 💰 Extended Founder Pricing
84
- Due to community feedback, we're extending founder pricing through **June 1, 2026**:
85
- - **Starter:** $10/mo → $49/mo lifetime lock (Save $100/mo)
86
- - **Pro:** $49/mo → $149/mo lifetime lock (Save $350/mo)
87
- - **Limited to first 100 founders** - lock in lifetime savings!
88
-
89
- 🔗 **Get Started:**
90
- - **Enhanced Free Tier:** Try the new features
91
- - **Starter Plan:** https://buy.stripe.com/14A7sL30y8bR2F4fbgaMU02
92
- - **Pro Plan:** https://buy.stripe.com/cNi3cv1WuajZcfE7IOaMU03
93
-
94
- ## 📦 Installation
95
-
96
- ### Prerequisites
97
- - Node.js 18 or higher
98
- - An MCP-compatible AI assistant (Claude Desktop, Cursor, etc.)
30
+ ## 🚀 Quick Start
99
31
 
100
- ### Install the Server
32
+ ### Step 1: Install
101
33
 
102
34
  ```bash
103
35
  npm install -g @ancientwhispers54/leafengines-mcp-server
104
36
  ```
105
37
 
106
- ### Or use as dependency
38
+ ### Step 2: Configure
107
39
 
108
- ```bash
109
- npm install @ancientwhispers54/leafengines-mcp-server
110
- ```
111
-
112
- ## 🚀 Quick Start
40
+ **For Claude Desktop** — add to `~/.config/claude-desktop/mcp.json`:
113
41
 
114
- ### 1. Get Your API Key
115
-
116
- #### **Test API (Try Now):**
117
- Use test key: `leaf-test-370df0a2e62e`
118
-
119
- **Works with just county_fips:**
120
- ```json
121
- {
122
- "county_fips": "12086"
123
- }
124
- ```
125
-
126
- #### **Free Tier (No API Key):**
127
- Use header: `x-free-tier: true`
128
-
129
- #### **Production API Key:**
130
- Request at: https://soilsidekickpro.com/api-docs
131
-
132
- ### 2. Configure Your AI Assistant
133
-
134
- **For Claude Desktop:**
135
42
  ```json
136
43
  {
137
44
  "mcpServers": {
@@ -146,120 +53,171 @@ Request at: https://soilsidekickpro.com/api-docs
146
53
  }
147
54
  ```
148
55
 
149
- **For Cursor:**
150
- Add to your Cursor MCP configuration with API key.
56
+ **For Cursor** — add to your Cursor MCP configuration with the same API key.
151
57
 
152
- ### 3. Start Using
58
+ ### Step 3: Ask
153
59
 
154
- Your AI assistant now has access to:
155
- - Soil analysis tools (USDA data)
156
- - Water quality data (EPA monitoring)
157
- - Climate information (NOAA records)
158
- - Agricultural intelligence
60
+ > "What's the soil like in Fulton County, Georgia for corn planting?"
159
61
 
160
- ## 🔧 Available Tools
161
-
162
- ### `get_soil_analysis`
163
- Get comprehensive soil data for any US county.
62
+ Your AI agent will use LeafEngines tools automatically to analyze soil, recommend crops, and provide environmental context.
164
63
 
165
- **Parameters:**
166
- - `county_fips` (string): 5-digit FIPS code (e.g., "12086" for Miami-Dade, FL)
64
+ ## 🔧 Available Tools
167
65
 
168
- **Example:**
169
- ```json
170
- {
171
- "county_fips": "12086"
172
- }
66
+ | Tool | What It Returns | Tier |
67
+ |------|----------------|------|
68
+ | `get_soil_analysis` | USDA SSURGO soil composition, pH, NPK, drainage, recommendations | Commoditized |
69
+ | `county_lookup` | Resolve location names to FIPS codes | Commoditized |
70
+ | `territorial_water_quality` | EPA water quality and contamination risk scores | Commoditized |
71
+ | `agricultural_intelligence` | AI-powered agricultural insights and recommendations | Enhanced |
72
+ | `safe_identification` | Plant identification with toxic lookalike warnings | Enhanced |
73
+ | `carbon_credit_calculator` | Carbon credit potential using proprietary models | Proprietary |
74
+ | `generate_vrt_prescription` | Variable rate technology prescription maps | Proprietary |
75
+ | `environmental_impact_analysis` | Patent-pending Environmental Compatibility Score with satellite data fusion | Exclusive |
76
+ | `planting_optimization` | Multi-parameter phenology models for optimal planting windows | Exclusive |
77
+ | `turbo_quant_capabilities` | Hardware optimization check — **always free, no auth required** | Free |
78
+
79
+ ## 💰 Pricing
80
+
81
+ ### Free Tier — No Credit Card
82
+ - **Test key:** `leaf-test-370df0a2e62e` — works immediately
83
+ - **Free header:** `x-free-tier: true` — no key needed
84
+ - **Includes:** Basic soil analysis, county lookup, TurboQuant check
85
+ - [Start free →](https://soilcertify.com)
86
+
87
+ ### Pay-As-You-Go
88
+
89
+ | Tier | Price | Per-Call Rate | What You Get | Buy |
90
+ |------|-------|--------------|--------------|-----|
91
+ | Commoditized | $0.50/bundle | $0.001/call | Basic soil/weather, county lookup | [Buy →](https://buy.stripe.com/3cIdR99oWajZdjI6EKaMU07) |
92
+ | Enhanced | $1.50/bundle | $0.003/call | Environmental impact, crop suitability, water quality | [Buy →](https://buy.stripe.com/7sY28reJg1NtenM8MSaMU0b) |
93
+ | Proprietary | $5.00/bundle | $0.010/call | Planting optimization, carbon credits, VRT | [Buy →](https://buy.stripe.com/3cIeVd9oW1NtgvU1kqaMU09) |
94
+ | Exclusive | $10.00/bundle | $0.020/call | Patent-pending environmental compatibility scoring | [Buy →](https://buy.stripe.com/6oU4gzbx40Jp6Vk1kqaMU0a) |
95
+
96
+ ### Monthly Subscriptions
97
+
98
+ | Plan | Price | Included Calls | Best For | Subscribe |
99
+ |------|-------|---------------|----------|-----------|
100
+ | **Founder Starter** | $10/mo → lifetime $49/mo | 10,000/mo | Solo developers, prototyping | [Subscribe →](https://buy.stripe.com/14A7sL30y8bR2F4fbgaMU02) |
101
+ | **Founder Pro** | $49/mo → lifetime $149/mo | 35,000/mo | Production apps, teams | [Subscribe →](https://buy.stripe.com/cNi3cv1WuajZcfE7IOaMU03) |
102
+ | Starter | $149/mo | 10,000/mo | Solo developers, prototyping | [Subscribe →](https://buy.stripe.com/5kQ6oHcB88bR93s8MSaMU04) |
103
+ | Pro | $499/mo | 35,000/mo | Production apps, teams | [Subscribe →](https://buy.stripe.com/14A6oH7gO3VBcfE1kqaMU05) |
104
+ | Enterprise | $1,999/mo | 175,000+/mo | White-label, SLA, OEM | [Subscribe →](https://buy.stripe.com/eVqaEXfNkajZ6Vk0gmaMU06) |
105
+ | Enterprise Bundle | $3,499/mo | 685,000/mo | Large OEM, max volume | Contact: sales@leafengines.com |
106
+
107
+ > ⏰ **Founder pricing expires June 1, 2026.** First 100 customers lock lifetime rates.
108
+
109
+ ### International Pricing
110
+
111
+ | Region | Starter | Pro | Local Payment Methods |
112
+ |--------|---------|-----|----------------------|
113
+ | **United States** | $49/mo | $149/mo | Card, Apple Pay, Google Pay, Affirm |
114
+ | **European Union** | €45/mo (VAT incl.) | €135/mo (VAT incl.) | Klarna, iDEAL, EPS, Apple/Google Pay |
115
+ | **United Kingdom** | £38/mo (VAT incl.) | £115/mo (VAT incl.) | Afterpay/Clearpay, Apple/Google Pay |
116
+ | **Australia** | AU$75/mo (GST incl.) | AU$225/mo (GST incl.) | Afterpay, Apple/Google Pay |
117
+
118
+ ## 🔗 Integration Guides
119
+
120
+ ### Claude Desktop
121
+ Add to `mcp.json` as shown in Quick Start above.
122
+
123
+ ### OpenClaw
124
+ ```yaml
125
+ skills:
126
+ leafengines:
127
+ enabled: true
128
+ config:
129
+ api_key: leaf-test-370df0a2e62e
130
+ base_url: https://app.soilsidekickpro.com/api-docs
173
131
  ```
174
- - `depth` (string, optional): Soil depth (default: "0-30cm")
175
-
176
- ### `get_water_quality`
177
- Retrieve EPA water quality data.
178
-
179
- **Parameters:**
180
- - `county` (string): County name
181
- - `state` (string): State abbreviation
182
-
183
- ### `get_climate_insights`
184
- Access NOAA climate data and trends.
185
132
 
186
- **Parameters:**
187
- - `location` (string): City or coordinates
188
- - `timeframe` (string): "30day", "year", "historical"
133
+ ### Cursor
134
+ Add to your Cursor MCP configuration with the same API key.
189
135
 
190
- ### `get_agricultural_recommendations`
191
- Get farm-specific advice.
192
-
193
- **Parameters:**
194
- - `crop` (string): Crop type
195
- - `location` (string): Growing location
196
- - `season` (string): Planting season
136
+ ### MCP Registry
137
+ - **Package:** `io.github.QWarranto/leafengines` version 1.1.5+
138
+ - **Registry:** [https://registry.modelcontextprotocol.io](https://registry.modelcontextprotocol.io)
197
139
 
198
140
  ## 📖 Examples
199
141
 
200
- ### Example 1: Soil Analysis via AI
142
+ ### Soil Analysis
201
143
  ```
202
- User: "What's the soil like in Fulton County, Georgia?"
203
- AI: [Uses get_soil_analysis] "The soil in Fulton County is primarily..."
144
+ User: "What's the soil like in Travis County, Texas?"
145
+ AI: [Uses get_soil_analysis] "The soil in Travis County is primarily..."
204
146
  ```
205
147
 
206
- ### Example 2: Farm Planning
148
+ ### Crop Planning
207
149
  ```
208
- User: "I want to grow corn in Iowa. What should I know?"
150
+ User: "Should I plant corn or soybeans on my 100-acre field in Iowa?"
209
151
  AI: [Uses multiple tools] "Based on soil analysis, water quality, and climate data..."
210
152
  ```
211
153
 
212
- ## ⚙️ Configuration
213
-
214
- ### Environment Variables
215
- ```bash
216
- LEAFENGINES_API_KEY=your_api_key_here
217
- MCP_PORT=3000 # Optional: Custom port
154
+ ### Environmental Assessment
155
+ ```
156
+ User: "What's the environmental impact of this property?"
157
+ AI: [Uses environmental_impact_analysis + carbon_credit_calculator] "Environmental Compatibility Score: 78/100..."
218
158
  ```
219
159
 
220
- ### API Keys
221
- 1. Sign up at [SoilSidekick Pro](https://soilsidekick.com)
222
- 2. Generate your API key
223
- 3. Set as environment variable
224
-
225
- ## 🔗 Related Packages
160
+ ## 🎯 Use Cases
226
161
 
227
- - [@soilsidekick/sdk]({{SDK_URL}}) - Core JavaScript SDK
228
- - [node-red-contrib-leafengines]({{NODE_RED_URL}}) - Node-RED automation
229
- - [n8n-nodes-leafengines]({{N8N_URL}}) - n8n business automation
162
+ ### For Agronomists & Soil Scientists
163
+ - **Field analysis** USDA SSURGO data for any US county, instantly
164
+ - **Carbon credit assessment** Proprietary models for compliance reporting
165
+ - **Environmental impact scoring** — Patent-pending satellite data fusion
166
+ - **Get professional reports without coding:** [soilcertify.com →](https://soilcertify.com)
230
167
 
231
- ## 🤝 Contributing
168
+ ### For Agricultural Consultants
169
+ - **Client-ready analysis** — Soil composition, drainage, NPK recommendations
170
+ - **Crop optimization** — Multi-parameter phenology for planting windows
171
+ - **Water quality assessment** — EPA data with contamination risk scores
172
+ - **Sell reports to clients:** [soilcertify.com →](https://soilcertify.com) (172%+ profit margin at $29/mo)
232
173
 
233
- We welcome contributions! Please see [CONTRIBUTING.md]({{CONTRIBUTING_URL}}).
174
+ ### For Developers & AI Engineers
175
+ - **MCP integration** — Works with Claude, Cursor, OpenClaw, any MCP client
176
+ - **TurboQuant optimization** — 6x memory compression for edge/offline deployment
177
+ - **Multi-agent orchestration** — 10 tools across 4 pricing tiers
178
+ - **API access** — Direct HTTP calls to Supabase edge functions
234
179
 
235
- ## 📄 License
180
+ ## 🛡️ Enterprise-Grade Governance
236
181
 
237
- ## 📄 License
182
+ - **Complete audit logging** — Every tool call tracked with attribution
183
+ - ✅ **Operations dashboard** — Real-time monitoring and anomaly detection
184
+ - ✅ **PII protection** — Automatic sanitization of sensitive data
185
+ - ✅ **Compliance ready** — SOC 2 alignment, export capabilities
186
+ - ✅ **Session correlation** — Trace multi-step agent reasoning
238
187
 
239
- MIT License
188
+ ## 🆓 Free Tier — No Commitment
240
189
 
241
- Copyright (c) {{YEAR}} {{COMPANY_NAME}}
190
+ **Two ways to test, zero friction:**
191
+ 1. **Test key:** `leaf-test-370df0a2e62e` — paste into config, works immediately
192
+ 2. **Free header:** `x-free-tier: true` — no API key needed at all
242
193
 
243
- Permission is hereby granted, free of charge, to any person obtaining a copy
244
- of this software and associated documentation files (the "Software"), to deal
245
- in the Software without restriction, including without limitation the rights
246
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
247
- copies of the Software, and to permit persons to whom the Software is
248
- furnished to do so, subject to the following conditions:
194
+ **What's included:**
195
+ - Basic soil analysis with county FIPS codes
196
+ - USDA soil data access
197
+ - TurboQuant capabilities check (always free)
198
+ - Enough requests for evaluation and prototyping
249
199
 
250
- The above copyright notice and this permission notice shall be included in all
251
- copies or substantial portions of the Software.
200
+ ## 🔗 Related Products
252
201
 
253
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
254
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
255
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
256
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
257
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
258
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
259
- SOFTWARE.
202
+ - **[LeafEngines ClawHub Skill](https://github.com/QWarranto/leafengines-clawhub-skill)** OpenClaw agent integration
203
+ - **[n8n Nodes](https://github.com/QWarranto/n8n-nodes-leafengines)** n8n business automation
204
+ - **[Node-RED Nodes](https://github.com/QWarranto/node-red-contrib-leafengines)** IoT/edge automation
205
+ - **[QGIS Plugin](https://plugins.qgis.org/plugins/qgis_leafengines/)** 500,000+ QGIS users (Plugin ID 4987)
206
+ - **[SoilCertify](https://soilcertify.com)** Professional soil reports, no coding required
260
207
 
261
208
  ## 📞 Support
262
209
 
263
- - **Documentation:** [LeafEngines MCP Docs]({{DOCS_URL}})
264
- - **GitHub:** [Issues & Discussions]({{GITHUB_URL}})
210
+ - **API Documentation:** [app.soilsidekickpro.com/api-docs](https://app.soilsidekickpro.com/api-docs)
211
+ - **MCP Documentation:** [app.soilsidekickpro.com/mcp](https://app.soilsidekickpro.com/mcp)
212
+ - **GitHub Issues:** [github.com/QWarranto/leafengines-claude-mcp/issues](https://github.com/QWarranto/leafengines-claude-mcp/issues)
265
213
  - **Email:** support@soilsidekickpro.com
214
+ - **Partnerships:** partnerships@leafengines.com
215
+
216
+ ## 📄 License
217
+
218
+ MIT License — integration code is open source. API service has commercial terms with free tier available. Core algorithms are patent-protected (U.S. #19/320,727, #19/544,827).
219
+
220
+ ---
221
+
222
+ 🌱 **LeafEngines™** | SoilSidekick Pro® | SoilCertify | SoilTech Suite, Inc.
223
+ *Space gives the picture. We give the truth.*
package/dist/index.d.ts CHANGED
@@ -1,6 +1,20 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * LeafEngines MCP Server - Simplified with Observability
3
+ * LeafEngines MCP Server
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
+ * - Anonymous usage analytics (opt-out available)
15
+ *
16
+ * API Documentation: https://app.soilsidekickpro.com/api-docs
17
+ * MCP Documentation: https://app.soilsidekickpro.com/mcp
4
18
  */
5
19
  export {};
6
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;GAEG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;GAgBG"}
package/dist/index.js CHANGED
@@ -1,7 +1,21 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  /**
4
- * LeafEngines MCP Server - Simplified with Observability
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
+ * - Anonymous usage analytics (opt-out available)
16
+ *
17
+ * API Documentation: https://app.soilsidekickpro.com/api-docs
18
+ * MCP Documentation: https://app.soilsidekickpro.com/mcp
5
19
  */
6
20
  var __importDefault = (this && this.__importDefault) || function (mod) {
7
21
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -11,264 +25,227 @@ const index_js_1 = require("@modelcontextprotocol/sdk/server/index.js");
11
25
  const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
12
26
  const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
13
27
  const axios_1 = __importDefault(require("axios"));
14
- const notifications_js_1 = require("./notifications.js");
15
- // Simple logging (will be replaced with Pino later)
16
- const log = {
17
- info: (message, data) => console.log(JSON.stringify({ level: 'INFO', message, ...data })),
18
- error: (message, error, data) => console.error(JSON.stringify({ level: 'ERROR', message, error: error?.message, ...data })),
19
- businessEvent: (event, data) => console.log(JSON.stringify({ level: 'INFO', event: 'business', type: event, ...data }))
20
- };
21
- // Telemetry configuration
22
- const TELEMETRY_API_KEY = process.env.TELEMETRY_API_KEY || '';
23
- const TELEMETRY_URL = process.env.TELEMETRY_URL || 'https://leafengines-telemetry.onrender.com/v1/usage';
24
- const TELEMETRY_ENABLED = Boolean(TELEMETRY_API_KEY);
25
- // Telemetry helper function
26
- async function sendTelemetry(platform, version, feature, success, responseTimeMs, anonymousId, country) {
27
- if (!TELEMETRY_ENABLED) {
28
- return; // Telemetry disabled
29
- }
30
- try {
31
- const telemetryData = {
32
- platform,
33
- version,
34
- feature,
35
- success,
36
- response_time_ms: responseTimeMs,
37
- anonymous_id: anonymousId,
38
- country,
39
- timestamp: new Date().toISOString()
40
- };
41
- // Send telemetry asynchronously (don't wait for response)
42
- axios_1.default.post(TELEMETRY_URL, telemetryData, {
43
- headers: {
44
- 'Content-Type': 'application/json',
45
- 'X-API-Key': TELEMETRY_API_KEY
46
- },
47
- timeout: 5000 // 5 second timeout
48
- }).catch((error) => {
49
- // Silently fail - telemetry shouldn't break MCP functionality
50
- log.error('Telemetry send failed', error, { feature });
51
- });
52
- log.info('Telemetry sent', { feature, success, responseTimeMs });
53
- }
54
- catch (error) {
55
- // Silently fail - telemetry shouldn't break MCP functionality
56
- log.error('Telemetry preparation failed', error, { feature });
57
- }
58
- }
59
- // MCP Server
28
+ // MCP Server implementation
60
29
  const server = new index_js_1.Server({
61
30
  name: "leafengines",
62
- version: "2.0.0",
31
+ version: "1.1.8",
63
32
  }, {
64
33
  capabilities: {
65
34
  tools: {},
66
35
  },
67
36
  });
68
- // API base URL
69
- const API_BASE_URL = "https://leafengines-emergency-api-1.onrender.com/v1";
37
+ // Analytics tracking (anonymous, opt-out available via NO_ANALYTICS=1)
38
+ const ANALYTICS_ENDPOINT = "https://wzgnxkoeqzvueypwzvyn.supabase.co/functions/v1/analytics";
39
+ const ENABLE_ANALYTICS = process.env.NO_ANALYTICS !== "1";
40
+ // Track tool usage anonymously
41
+ async function trackToolUsage(toolName) {
42
+ if (!ENABLE_ANALYTICS)
43
+ return;
44
+ try {
45
+ await axios_1.default.post(ANALYTICS_ENDPOINT, {
46
+ event: "tool_used",
47
+ tool: toolName,
48
+ version: "1.1.8",
49
+ timestamp: new Date().toISOString(),
50
+ anonymous_id: `mcp_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`
51
+ }, {
52
+ timeout: 1000 // Don't block on analytics
53
+ });
54
+ }
55
+ catch (error) {
56
+ // Silently fail - analytics should not affect functionality
57
+ }
58
+ }
59
+ // Community engagement message (shown on first run)
60
+ function getCommunityMessage() {
61
+ return `🌱 Welcome to LeafEngines MCP Server (v1.1.8)!
62
+
63
+ Join 750+ developers in our community:
64
+ • GitHub Discussions: https://github.com/QWarranto/leafengines-claude-mcp/discussions
65
+ • Upcoming Tutorial Videos: Agricultural AI MCP tips
66
+ • Twitter: @LeafEnginesAI for updates
67
+
68
+ Share your use case: What are you building with agricultural AI?`;
69
+ }
70
+ // Configuration
71
+ const MCP_SERVER_URL = "https://wzgnxkoeqzvueypwzvyn.supabase.co/functions/v1/mcp-server";
70
72
  // Helper function to call LeafEngines API
71
- async function callLeafEnginesAPI(endpoint, params, apiKey) {
72
- const startTime = Date.now();
73
- const url = `${API_BASE_URL}${endpoint}`;
73
+ async function callLeafEnginesAPI(toolName, arguments_, apiKey, isFreeTool = false) {
74
74
  try {
75
75
  const headers = {
76
76
  "Content-Type": "application/json",
77
+ "Accept": "application/json",
77
78
  };
78
79
  if (apiKey) {
79
80
  headers["x-api-key"] = apiKey;
80
81
  }
81
- const response = await axios_1.default.post(url, params, { headers, timeout: 30000 });
82
- const durationMs = Date.now() - startTime;
83
- log.info(`API ${endpoint}`, {
84
- method: 'POST',
85
- status: response.status,
86
- duration_ms: durationMs,
87
- user_type: apiKey ? 'paid' : 'free'
82
+ // Add x-free-tier header for free tools
83
+ if (isFreeTool) {
84
+ headers["x-free-tier"] = "true";
85
+ }
86
+ const response = await axios_1.default.post(MCP_SERVER_URL, {
87
+ jsonrpc: "2.0",
88
+ method: "tools/call",
89
+ params: {
90
+ name: toolName,
91
+ arguments: arguments_,
92
+ },
93
+ id: 1,
94
+ }, {
95
+ headers,
96
+ timeout: 30000,
88
97
  });
89
98
  return response.data;
90
99
  }
91
100
  catch (error) {
92
- const durationMs = Date.now() - startTime;
93
- log.error('API call failed', error, {
94
- endpoint,
95
- duration_ms: durationMs,
96
- status_code: error.response?.status
97
- });
98
- if (error.response) {
99
- throw new Error(`API Error (${error.response.status}): ${JSON.stringify(error.response.data)}`);
100
- }
101
- else if (error.request) {
102
- throw new Error("Network error: No response received from API");
103
- }
104
- else {
105
- throw new Error(`Request setup error: ${error.message}`);
106
- }
101
+ console.error(`LeafEngines API call failed: ${error.message}`);
102
+ throw error;
107
103
  }
108
104
  }
109
- // Register tools
105
+ // Tool: TurboQuant Capabilities (FREE - no API key required)
110
106
  server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
111
- log.businessEvent('tools_listed');
112
107
  return {
113
108
  tools: [
114
109
  {
115
- name: "analyze_soil",
116
- description: "Analyze soil characteristics and get recommendations for a specific location.",
110
+ name: "get_soil_data",
111
+ description: "COMMODITIZED TIER ($0.001/call): Get USDA SSURGO soil analysis for any US county. Returns pH, nutrients, organic matter, drainage, and texture. Perfect for Claude when you need: agricultural planning, environmental assessments, land evaluation, or basic soil composition data. Optional: county_name and state_code (helpful if you have them from county_lookup).",
117
112
  inputSchema: {
118
113
  type: "object",
119
114
  properties: {
120
115
  county_fips: {
121
116
  type: "string",
122
- description: "5-digit county FIPS code (e.g., '13067' for Fulton County, GA)"
117
+ pattern: "^[0-9]{5}$",
118
+ description: "5-digit US county FIPS code"
123
119
  },
124
- api_key: {
120
+ county_name: {
125
121
  type: "string",
126
- description: "Optional API key for paid features"
122
+ description: "County name (optional, but recommended with state_code)"
123
+ },
124
+ state_code: {
125
+ type: "string",
126
+ pattern: "^[A-Z]{2}$",
127
+ description: "2-letter state code (optional, but recommended with county_name)"
127
128
  }
128
129
  },
129
130
  required: ["county_fips"]
130
131
  }
131
132
  },
132
133
  {
133
- name: "recommend_crop",
134
- description: "Get crop recommendations based on soil analysis.",
134
+ name: "county_lookup",
135
+ description: "COMMODITIZED TIER ($0.001/call): Resolve US location names to FIPS codes. Search by county name, state, or FIPS code. Returns county details needed for other LeafEngines tools.",
135
136
  inputSchema: {
136
137
  type: "object",
137
138
  properties: {
138
- county_fips: {
139
+ term: {
139
140
  type: "string",
140
- description: "5-digit county FIPS code"
141
- },
142
- api_key: {
143
- type: "string",
144
- description: "Optional API key for paid features"
141
+ minLength: 2,
142
+ maxLength: 100,
143
+ description: "Search term — county name, state name, or partial FIPS code"
145
144
  }
146
145
  },
147
- required: ["county_fips"]
146
+ required: ["term"]
148
147
  }
149
148
  },
150
149
  {
151
- name: "check_turboquant",
152
- description: "Check if TurboQuant capabilities are available for a location (FREE).",
150
+ name: "agricultural_intelligence",
151
+ description: "ENHANCED TIER ($0.003/call): AI-powered agricultural insights combining soil, climate, and crop science. Get planting recommendations, yield predictions, risk assessments, and sustainability scores.",
153
152
  inputSchema: {
154
153
  type: "object",
155
154
  properties: {
156
155
  county_fips: {
157
156
  type: "string",
158
- description: "5-digit county FIPS code"
157
+ pattern: "^[0-9]{5}$",
158
+ description: "5-digit US county FIPS code"
159
+ },
160
+ crop_type: {
161
+ type: "string",
162
+ description: "Crop to analyze"
163
+ },
164
+ question: {
165
+ type: "string",
166
+ description: "Specific agricultural question to answer"
159
167
  }
160
168
  },
161
169
  required: ["county_fips"]
162
170
  }
163
- }
164
- ]
171
+ },
172
+ ],
165
173
  };
166
174
  });
167
175
  // Handle tool execution
168
176
  server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
169
- const startTime = Date.now();
170
177
  const { name, arguments: args } = request.params;
178
+ // Track tool usage (anonymous analytics)
179
+ trackToolUsage(name);
180
+ // Get API key from environment variable
181
+ const apiKey = process.env.LEAFENGINES_API_KEY;
182
+ // Free tools: county_lookup and get_soil_data available without API key
183
+ const freeTools = ['county_lookup', 'get_soil_data'];
184
+ if (!apiKey && !freeTools.includes(name)) {
185
+ return {
186
+ content: [
187
+ {
188
+ type: "text",
189
+ text: `API key required for ${name}. Free tools available without key: county_lookup, get_soil_data.\n\nGet full access:\n• Starter ($10/mo → $49/mo lifetime): https://buy.stripe.com/14A7sL30y8bR2F4fbgaMU02\n• Pro ($49/mo → $149/mo lifetime): https://buy.stripe.com/cNi3cv1WuajZcfE7IOaMU03\n\nFounder pricing — first 100 only.`,
190
+ },
191
+ ],
192
+ isError: true,
193
+ };
194
+ }
171
195
  try {
172
- let result;
173
- const apiKey = args?.api_key;
174
- switch (name) {
175
- case "analyze_soil": {
176
- const params = { county_fips: args?.county_fips };
177
- result = await callLeafEnginesAPI("/soil/analyze", params, apiKey);
178
- break;
179
- }
180
- case "recommend_crop": {
181
- const params = { county_fips: args?.county_fips };
182
- result = await callLeafEnginesAPI("/crop/recommend", params, apiKey);
183
- break;
184
- }
185
- case "check_turboquant": {
186
- const county_fips = args?.county_fips;
187
- result = {
188
- available: true,
189
- message: "TurboQuant capabilities are available for this location.",
190
- county_fips,
191
- features: [
192
- "High-performance soil analysis",
193
- "Real-time environmental monitoring",
194
- "Advanced crop modeling",
195
- "Weather integration"
196
- ]
197
- };
198
- break;
199
- }
200
- default:
201
- throw new Error(`Unknown tool: ${name}`);
202
- }
203
- const durationMs = Date.now() - startTime;
204
- log.info(`Tool executed: ${name}`, {
205
- success: true,
206
- duration_ms: durationMs,
207
- user_type: apiKey ? 'paid' : 'free'
208
- });
209
- // Send telemetry for successful execution
210
- sendTelemetry('mcp', '2.0.0', name, true, durationMs, undefined, // anonymous_id
211
- undefined // country
212
- );
196
+ // Check if this is a free tool
197
+ const isFreeTool = freeTools.includes(name);
198
+ const result = await callLeafEnginesAPI(name, args, apiKey, isFreeTool);
213
199
  return {
214
200
  content: [
215
201
  {
216
202
  type: "text",
217
- text: JSON.stringify(result, null, 2)
218
- }
219
- ]
203
+ text: JSON.stringify(result, null, 2),
204
+ },
205
+ ],
220
206
  };
221
207
  }
222
208
  catch (error) {
223
- const durationMs = Date.now() - startTime;
224
- log.error(`Tool execution failed: ${name}`, error, {
225
- duration_ms: durationMs
226
- });
227
- // Send telemetry for failed execution
228
- sendTelemetry('mcp', '2.0.0', name, false, durationMs, undefined, // anonymous_id
229
- undefined // country
230
- );
209
+ // Check for specific error messages
210
+ if (error.response?.status === 401) {
211
+ return {
212
+ content: [
213
+ {
214
+ type: "text",
215
+ text: `Authentication failed for ${name}. Please check your API key. Get API key from: https://app.soilsidekickpro.com/api-docs`,
216
+ },
217
+ ],
218
+ isError: true,
219
+ };
220
+ }
231
221
  return {
232
222
  content: [
233
223
  {
234
224
  type: "text",
235
- text: `Error: ${error.message}`
236
- }
225
+ text: `Error calling ${name}: ${error.message}`,
226
+ },
237
227
  ],
238
- isError: true
228
+ isError: true,
239
229
  };
240
230
  }
241
231
  });
232
+ // Error handling
233
+ server.onerror = (error) => {
234
+ console.error("[MCP Server Error]", error);
235
+ };
236
+ // Connection handling
237
+ process.on("SIGINT", async () => {
238
+ await server.close();
239
+ process.exit(0);
240
+ });
242
241
  // Start server
243
242
  async function main() {
244
- log.info("LeafEngines MCP Server starting", {
245
- version: "2.0.0",
246
- environment: process.env.NODE_ENV || "production",
247
- telemetry_enabled: TELEMETRY_ENABLED
248
- });
249
243
  const transport = new stdio_js_1.StdioServerTransport();
250
- // Register this client for notifications
251
- (0, notifications_js_1.registerClient)(transport);
252
244
  await server.connect(transport);
253
- console.log("LeafEngines MCP Server v2.0.0 running");
254
- console.log("📊 Structured logging enabled (JSON format)");
255
- console.log("🔔 MCP Push Notifications active");
256
- console.log("📈 Telemetry: " + (TELEMETRY_ENABLED ? "ENABLED" : "DISABLED (set TELEMETRY_API_KEY to enable)"));
257
- console.log("🔧 Enhanced support: support@soilsidekickpro.com");
258
- // Initialize notification system
259
- (0, notifications_js_1.initializeNotifications)(server);
260
- // Handle graceful shutdown
261
- process.on('SIGINT', () => {
262
- log.info("Server shutting down", { reason: 'SIGINT' });
263
- process.exit(0);
264
- });
265
- process.on('SIGTERM', () => {
266
- log.info("Server shutting down", { reason: 'SIGTERM' });
267
- process.exit(0);
268
- });
245
+ console.error("LeafEngines MCP server running on stdio");
269
246
  }
270
247
  main().catch((error) => {
271
- log.error('Server startup failed', error);
248
+ console.error("Failed to start server:", error);
272
249
  process.exit(1);
273
250
  });
274
251
  //# 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;;GAEG;;;;;AAEH,wEAAmE;AACnE,wEAAiF;AACjF,iEAG4C;AAC5C,kDAA0B;AAC1B,yDAK4B;AAE5B,oDAAoD;AACpD,MAAM,GAAG,GAAG;IACV,IAAI,EAAE,CAAC,OAAe,EAAE,IAAU,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IACvG,KAAK,EAAE,CAAC,OAAe,EAAE,KAAW,EAAE,IAAU,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAC/I,aAAa,EAAE,CAAC,KAAa,EAAE,IAAU,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;CACtI,CAAC;AAEF,0BAA0B;AAC1B,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAC;AAC9D,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,qDAAqD,CAAC;AACzG,MAAM,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAErD,4BAA4B;AAC5B,KAAK,UAAU,aAAa,CAAC,QAAgB,EAAE,OAAe,EAAE,OAA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AE,iBAAiB,IAAI,KAAK,KAAK,CAAC,OAAO,EAAE;iBAChD;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,iBAAiB;AACjB,MAAM,CAAC,OAAO,GAAG,CAAC,KAAK,EAAE,EAAE;IACzB,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;AAC7C,CAAC,CAAC;AAEF,sBAAsB;AACtB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;IAC9B,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;IACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,eAAe;AACf,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC;AAC3D,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;IAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@ancientwhispers54/leafengines-mcp-server",
3
- "version": "2.0.3",
3
+ "version": "2.0.6",
4
4
  "mcpName": "io.github.QWarranto/leafengines",
5
- "description": "Agricultural intelligence MCP server with soil analysis, crop recommendations, weather forecasts, and environmental impact assessment.",
5
+ "description": "LeafEngines MCP Server — Patent-protected agricultural intelligence for AI agents. 1,092+ downloads. Free tier with test key leaf-test-370df0a2e62e. Soil analysis, crop recommendations, environmental intelligence from USDA, EPA, NOAA data. Works with Claude Desktop, Cursor, OpenClaw.",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
8
8
  "leafengines-mcp-server": "bin/leafengines-mcp-server.js"
@@ -15,34 +15,24 @@
15
15
  },
16
16
  "repository": {
17
17
  "type": "git",
18
- "url": "https://github.com/QWarranto/leafengines-claude-mcp/tree/main/leafengines-claude-mcp"
18
+ "url": "git+https://github.com/QWarranto/leafengines-claude-mcp.git#main"
19
19
  },
20
20
  "keywords": [
21
21
  "mcp",
22
22
  "mcp-server",
23
- "model-context-protocol",
24
23
  "agriculture",
25
24
  "soil-analysis",
26
25
  "crop-recommendation",
27
26
  "weather",
28
27
  "environmental-impact",
29
- "precision-agriculture",
30
- "geospatial",
31
- "offline-first",
32
- "agronomic-ai",
33
- "ai-agent",
34
- "llm-tools",
28
+ "turboquant",
35
29
  "leafengines"
36
30
  ],
37
31
  "author": "QWarranto",
38
32
  "license": "Apache-2.0",
39
33
  "dependencies": {
40
34
  "@modelcontextprotocol/sdk": "^0.6.0",
41
- "axios": "^1.6.0",
42
- "pino": "^9.0.0",
43
- "pino-pretty": "^11.0.0",
44
- "@sentry/node": "^8.0.0",
45
- "prom-client": "^15.0.0"
35
+ "axios": "^1.6.0"
46
36
  },
47
37
  "devDependencies": {
48
38
  "@types/node": "^20.0.0",