@aborruso/ckan-mcp-server 0.3.1
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/.claude/commands/openspec/apply.md +23 -0
- package/.claude/commands/openspec/archive.md +27 -0
- package/.claude/commands/openspec/proposal.md +28 -0
- package/.claude/settings.local.json +31 -0
- package/.gemini/commands/openspec/apply.toml +21 -0
- package/.gemini/commands/openspec/archive.toml +25 -0
- package/.gemini/commands/openspec/proposal.toml +26 -0
- package/.mcp.json +12 -0
- package/.opencode/command/openspec-apply.md +24 -0
- package/.opencode/command/openspec-archive.md +27 -0
- package/.opencode/command/openspec-proposal.md +29 -0
- package/AGENTS.md +18 -0
- package/CLAUDE.md +320 -0
- package/EXAMPLES.md +707 -0
- package/LICENSE.txt +21 -0
- package/LOG.md +154 -0
- package/PRD.md +912 -0
- package/README.md +468 -0
- package/REFACTORING.md +237 -0
- package/dist/index.js +1277 -0
- package/openspec/AGENTS.md +456 -0
- package/openspec/changes/archive/2026-01-08-add-mcp-resources/design.md +115 -0
- package/openspec/changes/archive/2026-01-08-add-mcp-resources/proposal.md +52 -0
- package/openspec/changes/archive/2026-01-08-add-mcp-resources/specs/mcp-resources/spec.md +92 -0
- package/openspec/changes/archive/2026-01-08-add-mcp-resources/tasks.md +56 -0
- package/openspec/changes/archive/2026-01-08-expand-test-coverage-specs/design.md +355 -0
- package/openspec/changes/archive/2026-01-08-expand-test-coverage-specs/proposal.md +161 -0
- package/openspec/changes/archive/2026-01-08-expand-test-coverage-specs/tasks.md +162 -0
- package/openspec/changes/archive/2026-01-08-translate-project-to-english/proposal.md +115 -0
- package/openspec/changes/archive/2026-01-08-translate-project-to-english/specs/documentation-language/spec.md +32 -0
- package/openspec/changes/archive/2026-01-08-translate-project-to-english/tasks.md +115 -0
- package/openspec/changes/archive/add-automated-tests/design.md +324 -0
- package/openspec/changes/archive/add-automated-tests/proposal.md +167 -0
- package/openspec/changes/archive/add-automated-tests/specs/automated-testing/spec.md +143 -0
- package/openspec/changes/archive/add-automated-tests/tasks.md +132 -0
- package/openspec/project.md +113 -0
- package/openspec/specs/documentation-language/spec.md +32 -0
- package/openspec/specs/mcp-resources/spec.md +94 -0
- package/package.json +46 -0
- package/spunti.md +19 -0
- package/tasks/todo.md +124 -0
- package/test-urls.js +18 -0
- package/tmp/test-org-search.js +55 -0
package/LOG.md
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# LOG
|
|
2
|
+
|
|
3
|
+
## 2026-01-09
|
|
4
|
+
|
|
5
|
+
### README Enhancement - Real-World Advanced Examples
|
|
6
|
+
- **New Section**: "Advanced Query Examples" in README.md
|
|
7
|
+
- 4 real-world examples tested on dati.gov.it portal
|
|
8
|
+
- English explanations with Italian query terms maintained
|
|
9
|
+
- Each example includes: use case, query, techniques, results
|
|
10
|
+
- **Example 1**: Fuzzy search + date math + boosting (871 healthcare datasets)
|
|
11
|
+
- **Example 2**: Proximity search + complex boolean (306 air quality datasets)
|
|
12
|
+
- **Example 3**: Wildcard + range + field existence (5,318 regional datasets)
|
|
13
|
+
- **Example 4**: Date ranges + exclusive bounds (demonstrates precise constraints)
|
|
14
|
+
- **Solr Syntax Reference**: Quick reference table for all query operators
|
|
15
|
+
- **Impact**: Users have practical, tested examples for advanced searches
|
|
16
|
+
|
|
17
|
+
### Documentation Enhancement - Advanced Solr Queries
|
|
18
|
+
- **Tool Description**: Enhanced `ckan_package_search` tool description with comprehensive Solr query syntax
|
|
19
|
+
- Added boolean operators (AND, OR, NOT, +, -, grouping)
|
|
20
|
+
- Added wildcards, fuzzy search, proximity search
|
|
21
|
+
- Added range queries (inclusive/exclusive bounds)
|
|
22
|
+
- Added date math (NOW-1YEAR, NOW/DAY, etc.)
|
|
23
|
+
- Added field existence checks
|
|
24
|
+
- Added boosting/relevance scoring (^, ^=)
|
|
25
|
+
- 15+ inline examples in tool description
|
|
26
|
+
- **EXAMPLES.md**: New "Advanced Solr Query Features" section (~280 lines)
|
|
27
|
+
- Fuzzy search examples (edit distance matching)
|
|
28
|
+
- Proximity search (words within N positions)
|
|
29
|
+
- Boosting examples (relevance scoring)
|
|
30
|
+
- Field existence checks
|
|
31
|
+
- Date math with relative dates
|
|
32
|
+
- Complex nested queries
|
|
33
|
+
- Range queries with different bounds
|
|
34
|
+
- Wildcard patterns
|
|
35
|
+
- Practical advanced examples
|
|
36
|
+
- **Impact**: LLMs calling MCP server now have comprehensive query syntax reference
|
|
37
|
+
|
|
38
|
+
## 2026-01-08
|
|
39
|
+
|
|
40
|
+
### Configuration & URL Management
|
|
41
|
+
- **Portal-Specific URLs**: Introduced configuration system for non-standard CKAN portals
|
|
42
|
+
- New `src/portals.json`: Configurable mapping for portals like `dati.gov.it`
|
|
43
|
+
- New `src/utils/url-generator.ts`: Utility for generating context-aware view URLs
|
|
44
|
+
- Fixed issue where `dati.gov.it` links pointed to standard CKAN paths instead of custom `/view-dataset/` paths
|
|
45
|
+
- Automated replacement of `{id}`, `{name}` and `{server_url}` placeholders in URL templates
|
|
46
|
+
- Updated `ckan_package_search`, `ckan_package_show`, `ckan_organization_list` and `ckan_organization_show` tools to use the new system
|
|
47
|
+
|
|
48
|
+
### Version 0.3.0
|
|
49
|
+
- **MCP Resource Templates**: Direct data access via `ckan://` URI scheme
|
|
50
|
+
- `ckan://{server}/dataset/{id}` - Dataset metadata
|
|
51
|
+
- `ckan://{server}/resource/{id}` - Resource metadata
|
|
52
|
+
- `ckan://{server}/organization/{name}` - Organization metadata
|
|
53
|
+
- New `src/resources/` module (5 files, ~240 lines)
|
|
54
|
+
- **Tests**: 101 tests total (was 79), 100% passing
|
|
55
|
+
- **Cleanup**: Removed `src/index-old.ts`, standardized to English
|
|
56
|
+
|
|
57
|
+
### Project Evaluation v0.3.0
|
|
58
|
+
- **Overall Rating**: 9/10 - Production-ready with excellent architecture
|
|
59
|
+
- **Improvements from v0.2.0**:
|
|
60
|
+
- Removed legacy code (index-old.ts)
|
|
61
|
+
- Standardized documentation to English
|
|
62
|
+
- Added MCP Resource Templates
|
|
63
|
+
- Expanded test suite (79 → 101 tests)
|
|
64
|
+
- **Remaining enhancements**: Caching layer, configurable limits, authentication
|
|
65
|
+
- See `docs/evaluation-v0.3.0.md` for full assessment
|
|
66
|
+
|
|
67
|
+
### Version 0.2.0
|
|
68
|
+
- **Test Suite**: Added comprehensive automated testing infrastructure
|
|
69
|
+
- **79 tests total**: 100% passing
|
|
70
|
+
- **Unit tests** (25): formatting utilities, HTTP client
|
|
71
|
+
- **Integration tests** (54): all 7 CKAN API tools
|
|
72
|
+
- **Coverage**: vitest with v8 coverage support
|
|
73
|
+
- Test fixtures for all CKAN endpoints + error scenarios
|
|
74
|
+
- Scripts: `npm test`, `npm run test:watch`, `npm run test:coverage`
|
|
75
|
+
- **Documentation**: Translated to English
|
|
76
|
+
- README.md: comprehensive project overview
|
|
77
|
+
- EXAMPLES.md: detailed usage patterns
|
|
78
|
+
- CLAUDE.md: AI assistant instructions
|
|
79
|
+
- **OpenSpec**: Added change proposals
|
|
80
|
+
- Test suite implementation proposal
|
|
81
|
+
- Documentation translation spec
|
|
82
|
+
|
|
83
|
+
## 2026-01-08 (earlier)
|
|
84
|
+
|
|
85
|
+
### Code Refactoring
|
|
86
|
+
- **Major refactoring**: Restructured codebase from monolithic file to modular structure
|
|
87
|
+
- **Before**: 1 file (`src/index.ts`) - 1021 lines
|
|
88
|
+
- **After**: 11 organized modules - 1097 total lines
|
|
89
|
+
- **Structure**:
|
|
90
|
+
```
|
|
91
|
+
src/
|
|
92
|
+
├── index.ts (39) # Entry point
|
|
93
|
+
├── server.ts (12) # MCP server config
|
|
94
|
+
├── types.ts (16) # Types & schemas
|
|
95
|
+
├── utils/ # Utilities (88 lines)
|
|
96
|
+
│ ├── http.ts # CKAN API client
|
|
97
|
+
│ └── formatting.ts # Output formatting
|
|
98
|
+
├── tools/ # Tool handlers (903 lines)
|
|
99
|
+
│ ├── package.ts # 2 tools
|
|
100
|
+
│ ├── organization.ts # 3 tools
|
|
101
|
+
│ ├── datastore.ts # 1 tool
|
|
102
|
+
│ └── status.ts # 1 tool
|
|
103
|
+
└── transport/ # Transports (39 lines)
|
|
104
|
+
├── stdio.ts
|
|
105
|
+
└── http.ts
|
|
106
|
+
```
|
|
107
|
+
- **Benefits**:
|
|
108
|
+
- Smaller files (max 350 lines vs 1021)
|
|
109
|
+
- Localized and safe changes
|
|
110
|
+
- Isolated testing possible
|
|
111
|
+
- Simplified maintenance
|
|
112
|
+
- Zero breaking changes
|
|
113
|
+
- **Performance**: Build time 16ms, bundle 33KB (unchanged)
|
|
114
|
+
- **Testing**: All 7 tools working
|
|
115
|
+
|
|
116
|
+
### Documentation Updates
|
|
117
|
+
- Created `REFACTORING.md` - Complete refactoring documentation
|
|
118
|
+
- Updated `CLAUDE.md` - Updated with new modular structure
|
|
119
|
+
- Updated `PRD.md` - Added npm publication requirement
|
|
120
|
+
- Goal: Simple installation like PyPI in Python
|
|
121
|
+
- `npm install -g ckan-mcp-server`
|
|
122
|
+
- `npx ckan-mcp-server`
|
|
123
|
+
|
|
124
|
+
### Testing
|
|
125
|
+
- **Comprehensive testing** on https://www.dati.gov.it/opendata
|
|
126
|
+
- Server status: CKAN 2.10.3, 66,937 datasets
|
|
127
|
+
- COVID search: 90 datasets found
|
|
128
|
+
- Organization search: Regione Toscana (10,988 datasets)
|
|
129
|
+
- Faceting statistics: Top orgs, formats, tags
|
|
130
|
+
- Dataset details: Vaccini COVID-19 2024 (Puglia)
|
|
131
|
+
- Response times: 3-5 seconds (network + CKAN API)
|
|
132
|
+
- All 7 tools working perfectly
|
|
133
|
+
|
|
134
|
+
### Status: Production Ready
|
|
135
|
+
- Code refactored and modular
|
|
136
|
+
- Fully tested and functional
|
|
137
|
+
- Documentation complete
|
|
138
|
+
- Ready for npm publication
|
|
139
|
+
|
|
140
|
+
## 2026-01-07
|
|
141
|
+
|
|
142
|
+
- **New tool**: `ckan_organization_search` - search organizations by name pattern
|
|
143
|
+
- Simple input: only `pattern` (automatic wildcards)
|
|
144
|
+
- Output: only matching organizations (zero datasets downloaded)
|
|
145
|
+
- Efficient: server-side filtering, token savings
|
|
146
|
+
- Example: pattern "toscana" -> 2 orgs, 11K total datasets
|
|
147
|
+
- Initial release
|
|
148
|
+
- MCP server for CKAN open data portals
|
|
149
|
+
- 7 tools: package_search, package_show, organization_list, organization_show, organization_search, datastore_search, status_show
|
|
150
|
+
- Build system: esbuild (ultra-fast, 47ms build)
|
|
151
|
+
- Fixed TypeScript memory issues by switching from tsc to esbuild
|
|
152
|
+
- Corrected dati.gov.it URL to https://www.dati.gov.it/opendata
|
|
153
|
+
- Created CLAUDE.md for repository guidance
|
|
154
|
+
- Tested successfully with dati.gov.it (4178 datasets on "popolazione" query)
|