@mariodefe/sap-datasphere-mcp 1.0.9 → 1.0.10

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,126 @@
1
+ # Changelog - v1.0.10 (npm Hotfix)
2
+
3
+ **Release Date:** 2025-01-XX
4
+
5
+ ## 🐛 Critical npm Package Fix
6
+
7
+ ### Issue Resolved
8
+ Fixed a critical npm package configuration issue that prevented installation.
9
+
10
+ **Problem:**
11
+ - npm package v1.0.9 included invalid `peerDependencies` field with `"python": ">=3.10.0"`
12
+ - npm tried to resolve `python` as an npm package (which doesn't exist)
13
+ - Installation failed with error: "No matching version found for python@>=3.10.0"
14
+
15
+ **Root Cause:**
16
+ The `peerDependencies` field incorrectly listed Python as an npm dependency. Python is a system requirement, not an npm package.
17
+
18
+ **Fix:**
19
+ - Removed invalid `peerDependencies` field from package.json
20
+ - Python requirement now documented only in:
21
+ - `engines` field (metadata only, not enforced by npm)
22
+ - README.md (system requirements section)
23
+ - Wrapper script error messages (runtime validation)
24
+
25
+ ### Changes
26
+
27
+ **package.json:**
28
+ ```diff
29
+ - "peerDependencies": {
30
+ - "python": ">=3.10.0"
31
+ - }
32
+ ```
33
+
34
+ **Result:**
35
+ - ✅ npm package now installs correctly
36
+ - ✅ No dependency resolution errors
37
+ - ✅ Python validation handled at runtime by wrapper script
38
+ - ✅ Clear error messages if Python not found
39
+
40
+ ### Impact
41
+
42
+ **Before (v1.0.9):**
43
+ ```bash
44
+ npm install -g @mariodefe/sap-datasphere-mcp
45
+ # ERROR: No matching version found for python@>=3.10.0
46
+ ```
47
+
48
+ **After (v1.0.10):**
49
+ ```bash
50
+ npm install -g @mariodefe/sap-datasphere-mcp
51
+ # ✅ SUCCESS: Package installed
52
+ npx @mariodefe/sap-datasphere-mcp
53
+ # Wrapper validates Python at runtime with helpful error messages
54
+ ```
55
+
56
+ ---
57
+
58
+ ## đŸ“Ļ Package Info
59
+
60
+ - **Package name**: `@mariodefe/sap-datasphere-mcp`
61
+ - **Version**: 1.0.10
62
+ - **Type**: npm hotfix (patch release)
63
+ - **Python package**: Still v1.0.9 (no changes needed)
64
+
65
+ ---
66
+
67
+ ## ✅ Testing
68
+
69
+ **Confirmed working:**
70
+ - ✅ `npm install -g @mariodefe/sap-datasphere-mcp` - Installs successfully
71
+ - ✅ `npx @mariodefe/sap-datasphere-mcp` - Launches server correctly
72
+ - ✅ Python validation works at runtime
73
+ - ✅ Auto-install of Python package from PyPI works
74
+ - ✅ Claude Desktop integration works
75
+
76
+ ---
77
+
78
+ ## 🙏 Credits
79
+
80
+ Thanks to **Kiro** for identifying and reporting this issue!
81
+
82
+ ---
83
+
84
+ ## 📚 Related
85
+
86
+ - **npm Package**: https://www.npmjs.com/package/@mariodefe/sap-datasphere-mcp
87
+ - **PyPI Package**: https://pypi.org/project/sap-datasphere-mcp/1.0.9/
88
+ - **GitHub**: https://github.com/MarioDeFelipe/sap-datasphere-mcp
89
+ - **Previous Version**: [CHANGELOG_v1.0.9.md](CHANGELOG_v1.0.9.md)
90
+
91
+ ---
92
+
93
+ ## Migration Guide
94
+
95
+ ### From v1.0.9 to v1.0.10
96
+
97
+ **If you tried v1.0.9:**
98
+ ```bash
99
+ # Uninstall broken version
100
+ npm uninstall -g @mariodefe/sap-datasphere-mcp
101
+
102
+ # Install fixed version
103
+ npm install -g @mariodefe/sap-datasphere-mcp
104
+ ```
105
+
106
+ **If you're new:**
107
+ ```bash
108
+ # Just install (recommended)
109
+ npm install -g @mariodefe/sap-datasphere-mcp
110
+
111
+ # Or use with npx (no install needed)
112
+ npx @mariodefe/sap-datasphere-mcp
113
+ ```
114
+
115
+ **No changes needed:**
116
+ - Claude Desktop config remains the same
117
+ - Environment variables unchanged
118
+ - Python package still v1.0.9 (fully compatible)
119
+
120
+ ---
121
+
122
+ ## Summary
123
+
124
+ This is a **critical hotfix** for the npm package only. The Python package (v1.0.9) works perfectly and requires no changes. This release ensures that npm users can install and use the package without dependency resolution errors.
125
+
126
+ **Status**: ✅ npm package now fully functional and tested!
package/README.md CHANGED
@@ -12,6 +12,18 @@
12
12
 
13
13
  ## 🚀 Quick Start
14
14
 
15
+ ### Option 1: Install via npm (Recommended for Node.js/Claude Desktop)
16
+
17
+ ```bash
18
+ # Install globally
19
+ npm install -g @mariodefe/sap-datasphere-mcp
20
+
21
+ # Run the server
22
+ npx @mariodefe/sap-datasphere-mcp
23
+ ```
24
+
25
+ ### Option 2: Install via PyPI (Python)
26
+
15
27
  ```bash
16
28
  # Install from PyPI
17
29
  pip install sap-datasphere-mcp
@@ -683,20 +695,40 @@ USE_MOCK_DATA=false
683
695
 
684
696
  ### Claude Desktop
685
697
 
698
+ **Option 1: Using npm (Recommended)**
699
+
686
700
  Add to your `claude_desktop_config.json`:
687
701
 
702
+ ```json
703
+ {
704
+ "mcpServers": {
705
+ "sap-datasphere": {
706
+ "command": "npx",
707
+ "args": ["@mariodefe/sap-datasphere-mcp"],
708
+ "env": {
709
+ "DATASPHERE_BASE_URL": "https://your-tenant.eu20.hcs.cloud.sap",
710
+ "DATASPHERE_CLIENT_ID": "your-client-id",
711
+ "DATASPHERE_CLIENT_SECRET": "your-client-secret",
712
+ "DATASPHERE_TOKEN_URL": "https://your-tenant.authentication.eu20.hana.ondemand.com/oauth/token"
713
+ }
714
+ }
715
+ }
716
+ }
717
+ ```
718
+
719
+ **Option 2: Using Python directly**
720
+
688
721
  ```json
689
722
  {
690
723
  "mcpServers": {
691
724
  "sap-datasphere": {
692
725
  "command": "python",
693
- "args": ["C:\\path\\to\\sap_datasphere_mcp_server.py"],
726
+ "args": ["-m", "sap_datasphere_mcp_server"],
694
727
  "env": {
695
728
  "DATASPHERE_BASE_URL": "https://your-tenant.eu20.hcs.cloud.sap",
696
729
  "DATASPHERE_CLIENT_ID": "your-client-id",
697
730
  "DATASPHERE_CLIENT_SECRET": "your-client-secret",
698
- "DATASPHERE_TOKEN_URL": "https://your-tenant.authentication.eu20.hana.ondemand.com/oauth/token",
699
- "USE_MOCK_DATA": "false"
731
+ "DATASPHERE_TOKEN_URL": "https://your-tenant.authentication.eu20.hana.ondemand.com/oauth/token"
700
732
  }
701
733
  }
702
734
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mariodefe/sap-datasphere-mcp",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Model Context Protocol server for SAP Datasphere integration with 45 tools including Smart Query with enhanced aggregation support",
5
5
  "keywords": [
6
6
  "sap",
@@ -43,9 +43,6 @@
43
43
  "bin/",
44
44
  "README.md",
45
45
  "LICENSE",
46
- "CHANGELOG_v1.0.9.md"
47
- ],
48
- "peerDependencies": {
49
- "python": ">=3.10.0"
50
- }
46
+ "CHANGELOG_v1.0.10.md"
47
+ ]
51
48
  }
@@ -1,196 +0,0 @@
1
- # Changelog v1.0.9 - Enhanced Aggregation & Improved Logging
2
-
3
- **Release Date:** December 15, 2025
4
- **Type:** Enhancement Release
5
- **Based on:** Kiro's v1.0.8 testing feedback
6
-
7
- ---
8
-
9
- ## 🎉 v1.0.8 Success Confirmed
10
-
11
- Kiro's testing confirmed v1.0.8 fixed the critical aggregation fallback bug:
12
- - ✅ GROUP BY queries with client-side aggregation working correctly
13
- - ✅ LIMIT optimization working perfectly
14
- - ✅ Enhanced error messages with actionable steps
15
- - ✅ Basic queries functioning flawlessly
16
-
17
- ---
18
-
19
- ## ✨ Enhancements in v1.0.9
20
-
21
- ### 1. Simple Aggregation Support (WITHOUT GROUP BY)
22
-
23
- **Issue:** Queries like `SELECT COUNT(*) FROM table` failed because client-side aggregation required GROUP BY.
24
-
25
- **Fix:** Enhanced `perform_client_side_aggregation()` to support both modes:
26
- - **Case 1:** Simple aggregation (no GROUP BY) - Returns single row with aggregate over all data
27
- - **Case 2:** GROUP BY aggregation - Returns grouped results (existing behavior)
28
-
29
- **Examples Now Supported:**
30
- ```sql
31
- -- Simple COUNT
32
- SELECT COUNT(*) FROM SAP_SC_FI_V_ProductsDim
33
- -- Returns: {"COUNT_ALL": 35}
34
-
35
- -- Simple aggregations
36
- SELECT COUNT(*), AVG(PRICE), MAX(PRICE) FROM SAP_SC_FI_V_ProductsDim
37
- -- Returns single row with all aggregates
38
-
39
- -- GROUP BY (already worked)
40
- SELECT CATEGORY, COUNT(*), AVG(PRICE) FROM Products GROUP BY CATEGORY
41
- -- Returns: Multiple rows, one per category
42
- ```
43
-
44
- **Implementation:**
45
- - Checks for GROUP BY clause first
46
- - If no GROUP BY: aggregates over entire dataset, returns single row
47
- - If GROUP BY: groups data and aggregates per group (existing logic)
48
- - Improved regex to avoid ORDER BY false positives
49
-
50
- ---
51
-
52
- ### 2. Enhanced Asset Capability Detection
53
-
54
- **Issue:** False "Asset not found" warnings even when queries succeeded.
55
-
56
- **Fix:** Multi-strategy asset search:
57
- 1. **Strategy 1:** Exact name match (`name eq 'table'`)
58
- 2. **Strategy 2:** Contains match for views with schema prefixes
59
- 3. **Fallback:** Assume asset exists (avoid false negatives)
60
-
61
- **Benefits:**
62
- - Fewer false warnings
63
- - Better case-insensitive matching
64
- - Graceful degradation when catalog search has limitations
65
-
66
- ---
67
-
68
- ### 3. Improved Logging & User Experience
69
-
70
- **Before:**
71
- ```
72
- âš ī¸ Asset 'SAP_SC_FI_V_ProductsDim' not found - will attempt query anyway
73
- ```
74
-
75
- **After:**
76
- ```
77
- â„šī¸ Asset not in catalog search - may still exist
78
- ✓ Asset found: type=view, analytical=false
79
- ```
80
-
81
- **Changes:**
82
- - Changed warning emoji (âš ī¸) to info emoji (â„šī¸) for non-critical messages
83
- - More accurate descriptions ("not in catalog" vs "not found")
84
- - Only show suggestions when query likely to fail
85
- - Clearer asset capability reporting
86
-
87
- ---
88
-
89
- ## 📊 What's Fixed
90
-
91
- | Issue | v1.0.8 | v1.0.9 |
92
- |-------|--------|--------|
93
- | **Simple COUNT(*)** | Failed (no GROUP BY) | Works ✅ |
94
- | **Simple aggregations** | Failed (no GROUP BY) | Works ✅ |
95
- | **GROUP BY queries** | Works ✅ | Works ✅ |
96
- | **False "not found" warnings** | Frequent âš ī¸ | Rare â„šī¸ |
97
- | **Asset detection** | Exact match only | Multi-strategy ✅ |
98
- | **ORDER BY in GROUP BY** | Parse issues | Improved regex ✅ |
99
-
100
- ---
101
-
102
- ## 🔧 Technical Details
103
-
104
- ### Enhanced Aggregation Function
105
-
106
- **Location:** [sap_datasphere_mcp_server.py:2326-2455](sap_datasphere_mcp_server.py#L2326-L2455)
107
-
108
- **Key Changes:**
109
- ```python
110
- # New: Check for GROUP BY with improved regex
111
- group_by_match = re.search(
112
- r'GROUP\s+BY\s+([\w,\s]+?)(?:\s+ORDER\s+BY|\s+HAVING|\s+LIMIT|$)',
113
- query_str,
114
- re.IGNORECASE
115
- )
116
-
117
- # Case 1: Simple aggregation (NEW in v1.0.9)
118
- if not group_by_match:
119
- result = {}
120
- # Aggregate over all data
121
- for func, column, alias in agg_functions:
122
- # Calculate aggregate...
123
- return [result] # Single row
124
-
125
- # Case 2: GROUP BY aggregation (existing)
126
- # ... group and aggregate logic ...
127
- ```
128
-
129
- ### Enhanced Asset Detection
130
-
131
- **Location:** [sap_datasphere_mcp_server.py:2285-2336](sap_datasphere_mcp_server.py#L2285-L2336)
132
-
133
- **Multi-Strategy Search:**
134
- 1. Exact match
135
- 2. Contains match with case-insensitive filter
136
- 3. Graceful fallback
137
-
138
- ---
139
-
140
- ## 📈 Statistics
141
-
142
- **v1.0.9 by the numbers:**
143
- - **2 major enhancements** (simple aggregation + asset detection)
144
- - **1 UX improvement** (better logging)
145
- - **~130 lines** of code modified
146
- - **100% backward compatible**
147
- - **45 tools** total (no new tools)
148
-
149
- ---
150
-
151
- ## 🚀 Upgrade Instructions
152
-
153
- ```bash
154
- pip install --upgrade sap-datasphere-mcp
155
- ```
156
-
157
- **Verification:**
158
- ```bash
159
- python -c "import sap_datasphere_mcp; print(sap_datasphere_mcp.__version__)"
160
- # Should output: 1.0.9
161
- ```
162
-
163
- ---
164
-
165
- ## 🙏 Acknowledgments
166
-
167
- - **Kiro (Testing Agent):** Comprehensive v1.0.8 testing & detailed feedback
168
- - Identified simple aggregation edge cases
169
- - Reported false "not found" warnings
170
- - Suggested ORDER BY parsing improvements
171
-
172
- ---
173
-
174
- ## 📚 Related Documentation
175
-
176
- - [CHANGELOG_v1.0.8.md](CHANGELOG_v1.0.8.md) - Previous hotfix
177
- - [CHANGELOG_v1.0.7.md](CHANGELOG_v1.0.7.md) - Original aggregation implementation
178
- - [V1.0.7_IMPLEMENTATION_PLAN.md](V1.0.7_IMPLEMENTATION_PLAN.md) - Implementation plan
179
- - [README.md](README.md) - Main documentation
180
-
181
- ---
182
-
183
- ## Summary
184
-
185
- v1.0.9 completes the aggregation feature by adding support for simple aggregations without GROUP BY, improves asset detection to reduce false warnings, and enhances logging for better user experience.
186
-
187
- **All Query Types Now Supported:**
188
- 1. ✅ Simple queries: `SELECT * FROM table`
189
- 2. ✅ Simple aggregations: `SELECT COUNT(*) FROM table`
190
- 3. ✅ GROUP BY aggregations: `SELECT category, COUNT(*) FROM table GROUP BY category`
191
- 4. ✅ Complex GROUP BY with ORDER BY: `SELECT category, COUNT(*) FROM table GROUP BY category ORDER BY COUNT(*) DESC`
192
-
193
- ---
194
-
195
- **Full Changelog:** https://github.com/MarioDeFelipe/sap-datasphere-mcp/compare/v1.0.8...v1.0.9
196
- **PyPI Release:** https://pypi.org/project/sap-datasphere-mcp/1.0.9/