@aborruso/ckan-mcp-server 0.4.49 → 0.4.51
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/AGENTS.md +37 -0
- package/LOG.md +35 -0
- package/README.md +20 -1
- package/dist/index.js +331 -223
- package/dist/worker.js +123 -103
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -118,6 +118,43 @@ Node `>=18`. Worker build in `wrangler.toml`. Vitest coverage thresholds enforce
|
|
|
118
118
|
|
|
119
119
|
Minimal focused diffs. No unrelated refactors. Update tests for behavior changes. Avoid editing `dist/`.
|
|
120
120
|
|
|
121
|
+
## Pre-commit Checklist
|
|
122
|
+
|
|
123
|
+
Before committing and pushing any locally testable change:
|
|
124
|
+
1. Build: `npm run build`
|
|
125
|
+
2. Automated tests: `npm test` — all must pass
|
|
126
|
+
3. Manual queries: run real requests against the built server to verify end-to-end behavior
|
|
127
|
+
|
|
128
|
+
### How to run manual queries
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# Terminal 1 — start server
|
|
132
|
+
TRANSPORT=http PORT=3001 node dist/index.js
|
|
133
|
+
|
|
134
|
+
# Terminal 2 — call a tool
|
|
135
|
+
curl -s -X POST http://localhost:3001/mcp \
|
|
136
|
+
-H "Content-Type: application/json" \
|
|
137
|
+
-H "Accept: application/json, text/event-stream" \
|
|
138
|
+
-d '{
|
|
139
|
+
"jsonrpc":"2.0",
|
|
140
|
+
"method":"tools/call",
|
|
141
|
+
"params":{
|
|
142
|
+
"name":"ckan_package_search",
|
|
143
|
+
"arguments":{
|
|
144
|
+
"server_url":"https://www.dati.gov.it/opendata",
|
|
145
|
+
"q":"ambiente",
|
|
146
|
+
"page":1,
|
|
147
|
+
"page_size":3
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"id":1
|
|
151
|
+
}'
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
- Always include both `Content-Type: application/json` and `Accept: application/json, text/event-stream`
|
|
155
|
+
- Use `node dist/index.js` directly, not `npm start`
|
|
156
|
+
- Use port 3001 to avoid conflicts
|
|
157
|
+
|
|
121
158
|
## Project Layout
|
|
122
159
|
|
|
123
160
|
`src/index.ts` entry, `src/server.ts` wiring, `src/tools/` handlers, `src/utils/` helpers, `src/resources/` templates, `src/transport/` stdio/HTTP. `tests/unit/` utilities, `tests/integration/` behavior, `tests/fixtures/` mocks.
|
package/LOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# LOG
|
|
2
2
|
|
|
3
|
+
## 2026-02-27 (v0.4.51)
|
|
4
|
+
|
|
5
|
+
- refactor: domain types for all tool files — `CkanTag`, `CkanResource`, `CkanPackage`, `CkanOrganization`, `CkanField`, `CkanDatastoreResult` in `src/types.ts`; `any` reduced 32 → 1
|
|
6
|
+
- refactor: extract rendering functions from handler closures → named exports in `datastore.ts`, `organization.ts`, `group.ts`, `status.ts`; +26 unit tests
|
|
7
|
+
- fix: datastore table — skip `_id` column, increase cell truncation 50 → 80 chars
|
|
8
|
+
- fix: org/group show — dataset heading now shows `showing M of N returned — T total`
|
|
9
|
+
- tests: 191 → 272; all passing
|
|
10
|
+
|
|
11
|
+
## 2026-02-27 (continued 2)
|
|
12
|
+
|
|
13
|
+
- fix: datastore table — skip `_id` column, increase cell truncation 50→80 chars
|
|
14
|
+
- fix: org/group show — `## Datasets (N)` → `## Datasets (showing M of N returned — T total)`
|
|
15
|
+
- tests: 270 → 272; all passing
|
|
16
|
+
|
|
17
|
+
## 2026-02-27 (continued)
|
|
18
|
+
|
|
19
|
+
- refactor: extract markdown rendering from handler closures into exported functions in `datastore.ts`, `organization.ts`, `group.ts`, `status.ts`
|
|
20
|
+
- add 26 unit tests across 4 new test files (`datastore-formatting`, `organization-formatting`, `group-formatting`, `status-formatting`)
|
|
21
|
+
- test count: 244 → 270; all passing
|
|
22
|
+
|
|
23
|
+
## 2026-02-27
|
|
24
|
+
|
|
25
|
+
- refactor: add CKAN domain types (`CkanTag`, `CkanResource`, `CkanPackage`, `CkanOrganization`, `CkanField`, `CkanDatastoreResult`) to `src/types.ts`
|
|
26
|
+
- replace `any` in exported tool functions across `package.ts`, `datastore.ts`, `organization.ts`, `group.ts`, `quality.ts`, `tag.ts` — 32 → 1 remaining (internal handler variable)
|
|
27
|
+
- no behavioral change; 244 tests passing
|
|
28
|
+
|
|
29
|
+
## 2026-02-26 (v0.4.50)
|
|
30
|
+
|
|
31
|
+
- `ckan_list_resources`: add `format_filter` param (case-insensitive, client-side) — e.g. 72 resources → 8 CSV; header shows "Total: 72 (showing 8 CSV)"
|
|
32
|
+
- `ckan_package_search`: OR tip on zero results — when a plain multi-term query returns 0, suggest the OR version (e.g. `"a b c"` → `"a OR b OR c"`)
|
|
33
|
+
- `ckan_package_search`: accent fallback — if query returns 0 results and contains accented chars, retry with accent-stripped query; note shown in output
|
|
34
|
+
- `ckan_package_show`: always show DataStore status per resource
|
|
35
|
+
- `✅ Available` / `❌ Not available` / `❓ Not reported by portal`
|
|
36
|
+
- Previously silent when field absent (e.g. dati.gov.it); now explicit
|
|
37
|
+
|
|
3
38
|
## 2026-02-25 (v0.4.49)
|
|
4
39
|
|
|
5
40
|
- Disable DataStore Table UI component (MCP Apps) pending use-case design
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ MCP (Model Context Protocol) server for interacting with CKAN-based open data po
|
|
|
18
18
|
- 📄 MCP Resource Templates for direct data access
|
|
19
19
|
- 🧭 Guided MCP prompts for common workflows
|
|
20
20
|
- 🛡️ Browser-like headers to avoid WAF blocks
|
|
21
|
-
- 🧪
|
|
21
|
+
- 🧪 Comprehensive test suite (100% passing)
|
|
22
22
|
|
|
23
23
|
👉 If you want to dive deeper, the [**AI-generated DeepWiki**](https://deepwiki.com/ondata/ckan-mcp-server) is very well done.
|
|
24
24
|
|
|
@@ -188,6 +188,25 @@ npm install -g @aborruso/ckan-mcp-server
|
|
|
188
188
|
|
|
189
189
|
⚠️ **Warning**: Demo instance with 100,000 requests/month shared globally across all users. Not reliable for production use.
|
|
190
190
|
|
|
191
|
+
**Claude Desktop on Windows reading from a local MCP server installed on WSL2**:
|
|
192
|
+
|
|
193
|
+
```json
|
|
194
|
+
{
|
|
195
|
+
"mcpServers": {
|
|
196
|
+
"ckan": {
|
|
197
|
+
"command": "wsl.exe",
|
|
198
|
+
"args": [
|
|
199
|
+
"-e",
|
|
200
|
+
"/usr/local/bin/node",
|
|
201
|
+
"/home/username/projects/ckan-mcp-server/dist/index.js"
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
This requires the server to be built (`npm run build`) inside the WSL2 environment before use.
|
|
209
|
+
|
|
191
210
|
### Web Tools
|
|
192
211
|
|
|
193
212
|
#### ChatGPT
|