@aborruso/ckan-mcp-server 0.4.17 → 0.4.19
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/LOG.md +64 -0
- package/README.md +104 -34
- package/dist/index.js +161 -45
- package/dist/worker.js +42 -42
- package/package.json +12 -1
- package/.devin/wiki.json +0 -273
- package/CLAUDE.md +0 -398
- package/PRD.md +0 -999
- package/REFACTORING.md +0 -238
- package/examples/langgraph/01_basic_workflow.py +0 -277
- package/examples/langgraph/02_data_exploration.py +0 -366
- package/examples/langgraph/README.md +0 -719
- package/examples/langgraph/metadata_quality.py +0 -299
- package/examples/langgraph/requirements.txt +0 -12
- package/examples/langgraph/setup.sh +0 -32
- package/examples/langgraph/test_setup.py +0 -106
- package/openspec/AGENTS.md +0 -456
- package/openspec/changes/add-ckan-analyze-dataset-structure/proposal.md +0 -17
- package/openspec/changes/add-ckan-analyze-dataset-structure/specs/ckan-insights/spec.md +0 -7
- package/openspec/changes/add-ckan-analyze-dataset-structure/tasks.md +0 -6
- package/openspec/changes/add-ckan-analyze-dataset-updates/proposal.md +0 -17
- package/openspec/changes/add-ckan-analyze-dataset-updates/specs/ckan-insights/spec.md +0 -7
- package/openspec/changes/add-ckan-analyze-dataset-updates/tasks.md +0 -6
- package/openspec/changes/add-ckan-audit-tool/proposal.md +0 -17
- package/openspec/changes/add-ckan-audit-tool/specs/ckan-insights/spec.md +0 -7
- package/openspec/changes/add-ckan-audit-tool/tasks.md +0 -6
- package/openspec/changes/add-ckan-dataset-insights/proposal.md +0 -17
- package/openspec/changes/add-ckan-dataset-insights/specs/ckan-insights/spec.md +0 -7
- package/openspec/changes/add-ckan-dataset-insights/tasks.md +0 -6
- package/openspec/changes/add-ckan-host-allowlist-env/design.md +0 -38
- package/openspec/changes/add-ckan-host-allowlist-env/proposal.md +0 -16
- package/openspec/changes/add-ckan-host-allowlist-env/specs/ckan-request-allowlist/spec.md +0 -15
- package/openspec/changes/add-ckan-host-allowlist-env/specs/cloudflare-deployment/spec.md +0 -11
- package/openspec/changes/add-ckan-host-allowlist-env/tasks.md +0 -12
- package/openspec/changes/add-escape-text-query/proposal.md +0 -12
- package/openspec/changes/add-escape-text-query/specs/ckan-search/spec.md +0 -11
- package/openspec/changes/add-escape-text-query/tasks.md +0 -8
- package/openspec/changes/add-mqa-quality-tool/proposal.md +0 -21
- package/openspec/changes/add-mqa-quality-tool/specs/ckan-quality/spec.md +0 -71
- package/openspec/changes/add-mqa-quality-tool/tasks.md +0 -29
- package/openspec/changes/archive/2026-01-08-add-mcp-resources/design.md +0 -115
- package/openspec/changes/archive/2026-01-08-add-mcp-resources/proposal.md +0 -52
- package/openspec/changes/archive/2026-01-08-add-mcp-resources/specs/mcp-resources/spec.md +0 -92
- package/openspec/changes/archive/2026-01-08-add-mcp-resources/tasks.md +0 -56
- package/openspec/changes/archive/2026-01-08-expand-test-coverage-specs/design.md +0 -355
- package/openspec/changes/archive/2026-01-08-expand-test-coverage-specs/proposal.md +0 -161
- package/openspec/changes/archive/2026-01-08-expand-test-coverage-specs/tasks.md +0 -162
- package/openspec/changes/archive/2026-01-08-translate-project-to-english/proposal.md +0 -115
- package/openspec/changes/archive/2026-01-08-translate-project-to-english/specs/documentation-language/spec.md +0 -32
- package/openspec/changes/archive/2026-01-08-translate-project-to-english/tasks.md +0 -115
- package/openspec/changes/archive/2026-01-10-add-ckan-find-relevant-datasets/proposal.md +0 -17
- package/openspec/changes/archive/2026-01-10-add-ckan-find-relevant-datasets/specs/ckan-insights/spec.md +0 -7
- package/openspec/changes/archive/2026-01-10-add-ckan-find-relevant-datasets/tasks.md +0 -6
- package/openspec/changes/archive/2026-01-10-add-cloudflare-workers/design.md +0 -734
- package/openspec/changes/archive/2026-01-10-add-cloudflare-workers/proposal.md +0 -183
- package/openspec/changes/archive/2026-01-10-add-cloudflare-workers/specs/cloudflare-deployment/spec.md +0 -389
- package/openspec/changes/archive/2026-01-10-add-cloudflare-workers/tasks.md +0 -519
- package/openspec/changes/archive/2026-01-15-add-mcp-prompts/proposal.md +0 -13
- package/openspec/changes/archive/2026-01-15-add-mcp-prompts/specs/mcp-prompts/spec.md +0 -22
- package/openspec/changes/archive/2026-01-15-add-mcp-prompts/tasks.md +0 -10
- package/openspec/changes/archive/2026-01-15-add-mcp-resource-filters/proposal.md +0 -13
- package/openspec/changes/archive/2026-01-15-add-mcp-resource-filters/specs/mcp-resources/spec.md +0 -38
- package/openspec/changes/archive/2026-01-15-add-mcp-resource-filters/tasks.md +0 -10
- package/openspec/changes/archive/2026-01-19-update-repo-owner-ondata/proposal.md +0 -13
- package/openspec/changes/archive/2026-01-19-update-repo-owner-ondata/specs/repository-metadata/spec.md +0 -14
- package/openspec/changes/archive/2026-01-19-update-repo-owner-ondata/tasks.md +0 -12
- package/openspec/changes/archive/2026-01-19-update-search-parser-config/proposal.md +0 -13
- package/openspec/changes/archive/2026-01-19-update-search-parser-config/specs/ckan-insights/spec.md +0 -11
- package/openspec/changes/archive/2026-01-19-update-search-parser-config/specs/ckan-search/spec.md +0 -11
- package/openspec/changes/archive/2026-01-19-update-search-parser-config/tasks.md +0 -6
- package/openspec/changes/archive/add-automated-tests/design.md +0 -324
- package/openspec/changes/archive/add-automated-tests/proposal.md +0 -167
- package/openspec/changes/archive/add-automated-tests/specs/automated-testing/spec.md +0 -143
- package/openspec/changes/archive/add-automated-tests/tasks.md +0 -132
- package/openspec/project.md +0 -115
- package/openspec/specs/ckan-insights/spec.md +0 -23
- package/openspec/specs/ckan-search/spec.md +0 -16
- package/openspec/specs/cloudflare-deployment/spec.md +0 -344
- package/openspec/specs/documentation-language/spec.md +0 -32
- package/openspec/specs/mcp-prompts/spec.md +0 -26
- package/openspec/specs/mcp-resources/spec.md +0 -120
- package/openspec/specs/repository-metadata/spec.md +0 -19
- package/private/commenti-privati.yaml +0 -14
- package/testo.md +0 -12
- package/web-gui/PRD.md +0 -158
- package/web-gui/public/index.html +0 -883
- package/wrangler.toml +0 -6
|
@@ -1,519 +0,0 @@
|
|
|
1
|
-
# Tasks: Add Cloudflare Workers Deployment
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
Implementation broken into 4 phases with small, verifiable steps. Each task includes validation criteria.
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Phase 1: Environment Setup (Prerequisites)
|
|
9
|
-
|
|
10
|
-
### Task 1.1: Install Wrangler CLI
|
|
11
|
-
**Description**: Install Cloudflare's official CLI tool globally
|
|
12
|
-
|
|
13
|
-
**Steps**:
|
|
14
|
-
```bash
|
|
15
|
-
npm install -g wrangler
|
|
16
|
-
wrangler --version
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
**Validation**:
|
|
20
|
-
- `wrangler --version` shows version >= 3.0.0
|
|
21
|
-
- Command `wrangler` available in PATH
|
|
22
|
-
|
|
23
|
-
**Duration**: 2 minutes
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
### Task 1.2: Create Cloudflare Account
|
|
28
|
-
**Description**: Sign up for free Cloudflare account (if not already registered)
|
|
29
|
-
|
|
30
|
-
**Steps**:
|
|
31
|
-
1. Visit https://dash.cloudflare.com/sign-up
|
|
32
|
-
2. Create account with email/password
|
|
33
|
-
3. Verify email address
|
|
34
|
-
|
|
35
|
-
**Validation**:
|
|
36
|
-
- Can log into https://dash.cloudflare.com
|
|
37
|
-
- Workers section visible in dashboard
|
|
38
|
-
|
|
39
|
-
**Duration**: 5 minutes
|
|
40
|
-
|
|
41
|
-
**Note**: If you already have a Cloudflare account, skip to Task 1.3
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
### Task 1.3: Authenticate Wrangler
|
|
46
|
-
**Description**: Connect local Wrangler CLI to Cloudflare account
|
|
47
|
-
|
|
48
|
-
**Steps**:
|
|
49
|
-
```bash
|
|
50
|
-
wrangler login
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
**What happens**:
|
|
54
|
-
- Browser opens with Cloudflare login
|
|
55
|
-
- Click "Allow" to grant Wrangler access
|
|
56
|
-
- Terminal shows "Successfully logged in"
|
|
57
|
-
|
|
58
|
-
**Validation**:
|
|
59
|
-
```bash
|
|
60
|
-
wrangler whoami
|
|
61
|
-
```
|
|
62
|
-
Shows your Cloudflare account email
|
|
63
|
-
|
|
64
|
-
**Duration**: 2 minutes
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
### Task 1.4: Install Wrangler as Dev Dependency
|
|
69
|
-
**Description**: Add Wrangler to project dependencies for reproducible builds
|
|
70
|
-
|
|
71
|
-
**Steps**:
|
|
72
|
-
```bash
|
|
73
|
-
npm install --save-dev wrangler
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
**Validation**:
|
|
77
|
-
- `package.json` devDependencies includes `"wrangler": "^3.x.x"`
|
|
78
|
-
- `node_modules/.bin/wrangler` exists
|
|
79
|
-
|
|
80
|
-
**Duration**: 1 minute
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## Phase 2: Workers Configuration
|
|
85
|
-
|
|
86
|
-
### Task 2.1: Create wrangler.toml
|
|
87
|
-
**Description**: Create Cloudflare Workers configuration file
|
|
88
|
-
|
|
89
|
-
**Steps**:
|
|
90
|
-
Create `wrangler.toml` in project root:
|
|
91
|
-
|
|
92
|
-
```toml
|
|
93
|
-
name = "ckan-mcp-server"
|
|
94
|
-
main = "dist/worker.js"
|
|
95
|
-
compatibility_date = "2024-01-01"
|
|
96
|
-
|
|
97
|
-
[build]
|
|
98
|
-
command = "npm run build:worker"
|
|
99
|
-
|
|
100
|
-
[env.production]
|
|
101
|
-
name = "ckan-mcp-server"
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
**Validation**:
|
|
105
|
-
- File exists at project root
|
|
106
|
-
- `wrangler.toml` syntax is valid (no errors when running `wrangler dev`)
|
|
107
|
-
|
|
108
|
-
**Duration**: 2 minutes
|
|
109
|
-
|
|
110
|
-
**Dependencies**: Task 1.4 complete
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
### Task 2.2: Add Build Scripts to package.json
|
|
115
|
-
**Description**: Add npm scripts for building and deploying Workers
|
|
116
|
-
|
|
117
|
-
**Steps**:
|
|
118
|
-
Add to `package.json` scripts section:
|
|
119
|
-
|
|
120
|
-
```json
|
|
121
|
-
"build:worker": "node esbuild.worker.js",
|
|
122
|
-
"dev:worker": "wrangler dev",
|
|
123
|
-
"deploy": "npm run build:worker && wrangler deploy"
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
**Validation**:
|
|
127
|
-
- `npm run build:worker` command recognized (may fail until worker.ts exists)
|
|
128
|
-
- All 3 scripts visible in `npm run`
|
|
129
|
-
|
|
130
|
-
**Duration**: 2 minutes
|
|
131
|
-
|
|
132
|
-
**Dependencies**: Task 2.1 complete
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
### Task 2.3: Create esbuild.worker.js Configuration
|
|
137
|
-
**Description**: Separate build config for Workers bundle (different from Node.js bundle)
|
|
138
|
-
|
|
139
|
-
**Steps**:
|
|
140
|
-
Create `esbuild.worker.js`:
|
|
141
|
-
|
|
142
|
-
```javascript
|
|
143
|
-
import esbuild from 'esbuild';
|
|
144
|
-
|
|
145
|
-
await esbuild.build({
|
|
146
|
-
entryPoints: ['src/worker.ts'],
|
|
147
|
-
bundle: true,
|
|
148
|
-
outfile: 'dist/worker.js',
|
|
149
|
-
format: 'esm',
|
|
150
|
-
platform: 'browser',
|
|
151
|
-
target: 'es2022',
|
|
152
|
-
external: [], // Bundle everything for Workers
|
|
153
|
-
minify: false,
|
|
154
|
-
sourcemap: false,
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
console.log('✓ Workers build complete');
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
**Validation**:
|
|
161
|
-
- File exists in project root
|
|
162
|
-
- Running `node esbuild.worker.js` shows error about missing `src/worker.ts` (expected at this stage)
|
|
163
|
-
|
|
164
|
-
**Duration**: 3 minutes
|
|
165
|
-
|
|
166
|
-
**Dependencies**: Task 2.2 complete
|
|
167
|
-
|
|
168
|
-
---
|
|
169
|
-
|
|
170
|
-
## Phase 3: Code Implementation
|
|
171
|
-
|
|
172
|
-
### Task 3.1: Create src/worker.ts Entry Point
|
|
173
|
-
**Description**: Minimal Workers adapter that handles HTTP requests
|
|
174
|
-
|
|
175
|
-
**Steps**:
|
|
176
|
-
Create `src/worker.ts`:
|
|
177
|
-
|
|
178
|
-
```typescript
|
|
179
|
-
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
180
|
-
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
181
|
-
|
|
182
|
-
export default {
|
|
183
|
-
async fetch(request: Request): Promise<Response> {
|
|
184
|
-
// Respond to health checks
|
|
185
|
-
if (request.method === 'GET' && new URL(request.url).pathname === '/health') {
|
|
186
|
-
return new Response(JSON.stringify({ status: 'ok', version: '0.4.0' }), {
|
|
187
|
-
headers: { 'Content-Type': 'application/json' }
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
// TODO: Implement MCP protocol handling
|
|
192
|
-
return new Response('CKAN MCP Server - Workers Mode', { status: 200 });
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
**Validation**:
|
|
198
|
-
- `npm run build:worker` succeeds
|
|
199
|
-
- `dist/worker.js` created
|
|
200
|
-
- File size < 100KB
|
|
201
|
-
|
|
202
|
-
**Duration**: 5 minutes
|
|
203
|
-
|
|
204
|
-
**Dependencies**: Task 2.3 complete
|
|
205
|
-
|
|
206
|
-
---
|
|
207
|
-
|
|
208
|
-
### Task 3.2: Test Local Development Server
|
|
209
|
-
**Description**: Run Workers locally to verify basic setup
|
|
210
|
-
|
|
211
|
-
**Steps**:
|
|
212
|
-
```bash
|
|
213
|
-
npm run dev:worker
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
**What happens**:
|
|
217
|
-
- Wrangler starts local server on http://localhost:8787
|
|
218
|
-
- Terminal shows "Ready on http://localhost:8787"
|
|
219
|
-
|
|
220
|
-
**Validation**:
|
|
221
|
-
```bash
|
|
222
|
-
curl http://localhost:8787/health
|
|
223
|
-
```
|
|
224
|
-
Returns: `{"status":"ok","version":"0.4.0"}`
|
|
225
|
-
|
|
226
|
-
**Duration**: 2 minutes
|
|
227
|
-
|
|
228
|
-
**Dependencies**: Task 3.1 complete
|
|
229
|
-
|
|
230
|
-
**Note**: Keep wrangler dev running for next tasks
|
|
231
|
-
|
|
232
|
-
---
|
|
233
|
-
|
|
234
|
-
### Task 3.3: Implement MCP Protocol Handler
|
|
235
|
-
**Description**: Full Workers implementation with MCP server integration
|
|
236
|
-
|
|
237
|
-
**Steps**:
|
|
238
|
-
This is a larger task - update `src/worker.ts` to:
|
|
239
|
-
1. Import MCP server and all tool registrations
|
|
240
|
-
2. Handle POST /mcp endpoint
|
|
241
|
-
3. Process MCP JSON-RPC requests
|
|
242
|
-
4. Return JSON-RPC responses
|
|
243
|
-
|
|
244
|
-
**Validation**:
|
|
245
|
-
```bash
|
|
246
|
-
# Test with curl (wrangler dev still running)
|
|
247
|
-
curl -X POST http://localhost:8787/mcp \
|
|
248
|
-
-H "Content-Type: application/json" \
|
|
249
|
-
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
|
|
250
|
-
```
|
|
251
|
-
Returns list of 7 CKAN tools
|
|
252
|
-
|
|
253
|
-
**Duration**: 15-20 minutes
|
|
254
|
-
|
|
255
|
-
**Dependencies**: Task 3.2 complete
|
|
256
|
-
|
|
257
|
-
**Note**: We'll implement this together step-by-step
|
|
258
|
-
|
|
259
|
-
---
|
|
260
|
-
|
|
261
|
-
### Task 3.4: Test All MCP Tools Locally
|
|
262
|
-
**Description**: Verify each tool works in Workers environment
|
|
263
|
-
|
|
264
|
-
**Steps**:
|
|
265
|
-
Test each tool via curl:
|
|
266
|
-
1. `ckan_status_show` - server connectivity
|
|
267
|
-
2. `ckan_package_search` - basic search
|
|
268
|
-
3. `ckan_package_show` - dataset details
|
|
269
|
-
4. `ckan_organization_list` - list orgs
|
|
270
|
-
5. `ckan_organization_show` - org details
|
|
271
|
-
6. `ckan_organization_search` - search orgs
|
|
272
|
-
7. `ckan_datastore_search` - datastore query
|
|
273
|
-
|
|
274
|
-
**Validation**:
|
|
275
|
-
- All 7 tools return expected responses
|
|
276
|
-
- No HTTP 500 errors
|
|
277
|
-
- Response times < 30 seconds
|
|
278
|
-
|
|
279
|
-
**Duration**: 10 minutes
|
|
280
|
-
|
|
281
|
-
**Dependencies**: Task 3.3 complete
|
|
282
|
-
|
|
283
|
-
---
|
|
284
|
-
|
|
285
|
-
## Phase 4: Deployment and Documentation
|
|
286
|
-
|
|
287
|
-
### Task 4.1: Deploy to Cloudflare Workers
|
|
288
|
-
**Description**: First deployment to production Workers environment
|
|
289
|
-
|
|
290
|
-
**Steps**:
|
|
291
|
-
```bash
|
|
292
|
-
npm run deploy
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
**What happens**:
|
|
296
|
-
- Build runs (`npm run build:worker`)
|
|
297
|
-
- Wrangler uploads to Cloudflare
|
|
298
|
-
- Deployment URL shown: `https://ckan-mcp-server.<account>.workers.dev`
|
|
299
|
-
|
|
300
|
-
**Validation**:
|
|
301
|
-
```bash
|
|
302
|
-
curl https://ckan-mcp-server.<account>.workers.dev/health
|
|
303
|
-
```
|
|
304
|
-
Returns: `{"status":"ok","version":"0.4.0"}`
|
|
305
|
-
|
|
306
|
-
**Duration**: 3 minutes
|
|
307
|
-
|
|
308
|
-
**Dependencies**: Task 3.4 complete, Tasks 1.1-1.3 complete
|
|
309
|
-
|
|
310
|
-
---
|
|
311
|
-
|
|
312
|
-
### Task 4.2: Test Production Deployment
|
|
313
|
-
**Description**: Verify all tools work in production Workers environment
|
|
314
|
-
|
|
315
|
-
**Steps**:
|
|
316
|
-
Same as Task 3.4, but using production URL:
|
|
317
|
-
```bash
|
|
318
|
-
curl -X POST https://ckan-mcp-server.<account>.workers.dev/mcp \
|
|
319
|
-
-H "Content-Type: application/json" \
|
|
320
|
-
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
Test all 7 tools with real CKAN portals:
|
|
324
|
-
- dati.gov.it
|
|
325
|
-
- demo.ckan.org
|
|
326
|
-
- catalog.data.gov
|
|
327
|
-
|
|
328
|
-
**Validation**:
|
|
329
|
-
- All tools return correct results
|
|
330
|
-
- HTTPS works (no certificate errors)
|
|
331
|
-
- Global access (test from different network if possible)
|
|
332
|
-
|
|
333
|
-
**Duration**: 10 minutes
|
|
334
|
-
|
|
335
|
-
**Dependencies**: Task 4.1 complete
|
|
336
|
-
|
|
337
|
-
---
|
|
338
|
-
|
|
339
|
-
### Task 4.3: Create Deployment Documentation
|
|
340
|
-
**Description**: Write comprehensive deployment guide for contributors
|
|
341
|
-
|
|
342
|
-
**Steps**:
|
|
343
|
-
Create `docs/DEPLOYMENT.md` with:
|
|
344
|
-
1. Prerequisites (Cloudflare account, wrangler CLI)
|
|
345
|
-
2. Step-by-step deployment instructions
|
|
346
|
-
3. Environment configuration
|
|
347
|
-
4. Troubleshooting common issues
|
|
348
|
-
5. Monitoring and logs access
|
|
349
|
-
|
|
350
|
-
**Validation**:
|
|
351
|
-
- File exists at `docs/DEPLOYMENT.md`
|
|
352
|
-
- Includes code examples for all steps
|
|
353
|
-
- Links to Cloudflare documentation
|
|
354
|
-
|
|
355
|
-
**Duration**: 20 minutes
|
|
356
|
-
|
|
357
|
-
**Dependencies**: Task 4.2 complete
|
|
358
|
-
|
|
359
|
-
---
|
|
360
|
-
|
|
361
|
-
### Task 4.4: Update README.md
|
|
362
|
-
**Description**: Add Workers deployment option to main README
|
|
363
|
-
|
|
364
|
-
**Steps**:
|
|
365
|
-
Add new "Deployment Options" section:
|
|
366
|
-
|
|
367
|
-
```markdown
|
|
368
|
-
## Deployment Options
|
|
369
|
-
|
|
370
|
-
### Option 1: Local Installation (stdio mode)
|
|
371
|
-
[existing instructions]
|
|
372
|
-
|
|
373
|
-
### Option 2: Self-Hosted HTTP Server
|
|
374
|
-
[existing instructions]
|
|
375
|
-
|
|
376
|
-
### Option 3: Cloudflare Workers ⭐ NEW
|
|
377
|
-
Deploy to Cloudflare's global edge network for public HTTP access.
|
|
378
|
-
|
|
379
|
-
See [DEPLOYMENT.md](docs/DEPLOYMENT.md) for detailed instructions.
|
|
380
|
-
|
|
381
|
-
**Quick start**:
|
|
382
|
-
```bash
|
|
383
|
-
npm install -g wrangler
|
|
384
|
-
wrangler login
|
|
385
|
-
npm run deploy
|
|
386
|
-
```
|
|
387
|
-
|
|
388
|
-
Public endpoint: `https://ckan-mcp-server.<account>.workers.dev`
|
|
389
|
-
```
|
|
390
|
-
|
|
391
|
-
**Validation**:
|
|
392
|
-
- Section added after "Installation"
|
|
393
|
-
- Links to DEPLOYMENT.md work
|
|
394
|
-
- Code examples tested
|
|
395
|
-
|
|
396
|
-
**Duration**: 10 minutes
|
|
397
|
-
|
|
398
|
-
**Dependencies**: Task 4.3 complete
|
|
399
|
-
|
|
400
|
-
---
|
|
401
|
-
|
|
402
|
-
### Task 4.5: Update LOG.md
|
|
403
|
-
**Description**: Document deployment capability in changelog
|
|
404
|
-
|
|
405
|
-
**Steps**:
|
|
406
|
-
Add entry for today's date:
|
|
407
|
-
|
|
408
|
-
```markdown
|
|
409
|
-
## 2026-01-10
|
|
410
|
-
|
|
411
|
-
### Cloudflare Workers Deployment
|
|
412
|
-
- **Production deployment**: Server now available on Cloudflare Workers
|
|
413
|
-
- Public endpoint: `https://ckan-mcp-server.<account>.workers.dev`
|
|
414
|
-
- Global edge deployment (low latency worldwide)
|
|
415
|
-
- Free tier: 100k requests/day
|
|
416
|
-
- **New files**: `src/worker.ts`, `wrangler.toml`, `esbuild.worker.js`
|
|
417
|
-
- **New scripts**: `build:worker`, `dev:worker`, `deploy`
|
|
418
|
-
- **Documentation**: Created DEPLOYMENT.md with step-by-step guide
|
|
419
|
-
- **Testing**: All 7 MCP tools verified in Workers environment
|
|
420
|
-
- **No breaking changes**: stdio and self-hosted HTTP modes still supported
|
|
421
|
-
```
|
|
422
|
-
|
|
423
|
-
**Validation**:
|
|
424
|
-
- Entry added at top of LOG.md
|
|
425
|
-
- Date is 2026-01-10
|
|
426
|
-
- Includes deployment URL
|
|
427
|
-
|
|
428
|
-
**Duration**: 3 minutes
|
|
429
|
-
|
|
430
|
-
**Dependencies**: Task 4.4 complete
|
|
431
|
-
|
|
432
|
-
---
|
|
433
|
-
|
|
434
|
-
### Task 4.6: Final Validation
|
|
435
|
-
**Description**: End-to-end test with Claude Desktop
|
|
436
|
-
|
|
437
|
-
**Steps**:
|
|
438
|
-
1. Configure Claude Desktop to use Workers endpoint
|
|
439
|
-
2. Test MCP integration with all tools
|
|
440
|
-
3. Verify response formatting (markdown/json)
|
|
441
|
-
4. Check error handling
|
|
442
|
-
|
|
443
|
-
**Validation**:
|
|
444
|
-
- Claude Desktop successfully connects to Workers endpoint
|
|
445
|
-
- All tools accessible from Claude interface
|
|
446
|
-
- Responses properly formatted
|
|
447
|
-
- No unexpected errors
|
|
448
|
-
|
|
449
|
-
**Duration**: 10 minutes
|
|
450
|
-
|
|
451
|
-
**Dependencies**: All previous tasks complete
|
|
452
|
-
|
|
453
|
-
---
|
|
454
|
-
|
|
455
|
-
## Total Estimated Time
|
|
456
|
-
|
|
457
|
-
- **Phase 1**: 10 minutes (setup)
|
|
458
|
-
- **Phase 2**: 7 minutes (configuration)
|
|
459
|
-
- **Phase 3**: 32-37 minutes (implementation)
|
|
460
|
-
- **Phase 4**: 56 minutes (deployment + docs)
|
|
461
|
-
|
|
462
|
-
**Total**: ~1.5 - 2 hours (excluding breaks and troubleshooting)
|
|
463
|
-
|
|
464
|
-
---
|
|
465
|
-
|
|
466
|
-
## Dependencies Graph
|
|
467
|
-
|
|
468
|
-
```
|
|
469
|
-
Phase 1: Setup
|
|
470
|
-
├─ 1.1 Install Wrangler CLI
|
|
471
|
-
├─ 1.2 Create Cloudflare Account (optional)
|
|
472
|
-
├─ 1.3 Authenticate Wrangler (requires 1.2)
|
|
473
|
-
└─ 1.4 Install Wrangler Locally (requires 1.1)
|
|
474
|
-
|
|
475
|
-
Phase 2: Configuration (requires 1.4)
|
|
476
|
-
├─ 2.1 Create wrangler.toml
|
|
477
|
-
├─ 2.2 Add Build Scripts (requires 2.1)
|
|
478
|
-
└─ 2.3 Create esbuild.worker.js (requires 2.2)
|
|
479
|
-
|
|
480
|
-
Phase 3: Implementation (requires 2.3)
|
|
481
|
-
├─ 3.1 Create src/worker.ts
|
|
482
|
-
├─ 3.2 Test Local Dev Server (requires 3.1)
|
|
483
|
-
├─ 3.3 Implement MCP Handler (requires 3.2)
|
|
484
|
-
└─ 3.4 Test All Tools (requires 3.3)
|
|
485
|
-
|
|
486
|
-
Phase 4: Deployment (requires 3.4 + 1.1-1.3)
|
|
487
|
-
├─ 4.1 Deploy to Workers
|
|
488
|
-
├─ 4.2 Test Production (requires 4.1)
|
|
489
|
-
├─ 4.3 Create DEPLOYMENT.md (requires 4.2)
|
|
490
|
-
├─ 4.4 Update README.md (requires 4.3)
|
|
491
|
-
├─ 4.5 Update LOG.md (requires 4.4)
|
|
492
|
-
└─ 4.6 Final Validation (requires 4.5)
|
|
493
|
-
```
|
|
494
|
-
|
|
495
|
-
---
|
|
496
|
-
|
|
497
|
-
## Parallel Work Opportunities
|
|
498
|
-
|
|
499
|
-
These tasks can be done in parallel to save time:
|
|
500
|
-
|
|
501
|
-
- **During Phase 1**: While waiting for Cloudflare account verification (1.2), install Wrangler CLI (1.1)
|
|
502
|
-
- **During Phase 3.2**: While wrangler dev is running, can start writing worker.ts implementation (3.3)
|
|
503
|
-
- **During Phase 4**: Documentation tasks (4.3, 4.4, 4.5) can be drafted while deployment is in progress
|
|
504
|
-
|
|
505
|
-
---
|
|
506
|
-
|
|
507
|
-
## Rollback Plan
|
|
508
|
-
|
|
509
|
-
If deployment fails or issues arise:
|
|
510
|
-
|
|
511
|
-
1. **Workers deployment fails**: Keep using stdio/http modes (no breaking changes)
|
|
512
|
-
2. **Bundle too large**: Analyze with `esbuild --metafile` and remove unused code
|
|
513
|
-
3. **Runtime errors**: Use `wrangler tail` to view live logs and debug
|
|
514
|
-
4. **Rate limit exceeded**: User deploys own Workers instance (fork + deploy)
|
|
515
|
-
|
|
516
|
-
Each task is reversible - can revert by:
|
|
517
|
-
- Deleting new files (worker.ts, wrangler.toml, esbuild.worker.js)
|
|
518
|
-
- Removing npm scripts from package.json
|
|
519
|
-
- Running `wrangler delete` to remove Workers deployment
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Change: Add MCP Guided Prompts
|
|
2
|
-
|
|
3
|
-
## Why
|
|
4
|
-
Users often need guidance to use CKAN tools correctly; guided prompts reduce misuse and speed up discovery workflows.
|
|
5
|
-
|
|
6
|
-
## What Changes
|
|
7
|
-
- Add a new MCP prompts capability with reusable guided prompts for common tasks.
|
|
8
|
-
- Register prompts in the MCP server so clients can discover and invoke them.
|
|
9
|
-
- Document prompts and examples in README/docs.
|
|
10
|
-
|
|
11
|
-
## Impact
|
|
12
|
-
- Affected specs: mcp-prompts (new)
|
|
13
|
-
- Affected code: `src/server.ts`, new `src/prompts/*`, docs/README
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
## ADDED Requirements
|
|
2
|
-
|
|
3
|
-
### Requirement: Guided prompts are available
|
|
4
|
-
The system SHALL expose a set of guided MCP prompts for common CKAN discovery workflows.
|
|
5
|
-
|
|
6
|
-
#### Scenario: User requests a guided search prompt
|
|
7
|
-
- **WHEN** a client lists MCP prompts
|
|
8
|
-
- **THEN** the guided prompts are returned with name, description, and parameters
|
|
9
|
-
|
|
10
|
-
### Requirement: Prompt output includes tool usage instructions
|
|
11
|
-
Each guided prompt SHALL produce instructions that reference the appropriate CKAN tools and parameters.
|
|
12
|
-
|
|
13
|
-
#### Scenario: Prompt generation for thematic search
|
|
14
|
-
- **WHEN** the user generates a prompt for a specific theme and format
|
|
15
|
-
- **THEN** the output includes the correct tool name and required parameters
|
|
16
|
-
|
|
17
|
-
### Requirement: Prompt content is localized and consistent
|
|
18
|
-
Guided prompts SHALL use consistent language and parameter naming aligned with CKAN tool schemas.
|
|
19
|
-
|
|
20
|
-
#### Scenario: Prompt content consistency
|
|
21
|
-
- **WHEN** a prompt is generated
|
|
22
|
-
- **THEN** parameter names match the tool schema (e.g., `server_url`, `q`, `fq`, `rows`)
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
## 1. Implementation
|
|
2
|
-
- [x] Add prompt generators for guided search workflows (theme, organization, format, recent datasets, dataset analysis)
|
|
3
|
-
- [x] Register prompts in MCP server for discovery
|
|
4
|
-
- [x] Update README/docs with prompt usage examples
|
|
5
|
-
|
|
6
|
-
## 2. Tests
|
|
7
|
-
- [x] Add unit tests for prompt output structure and parameters
|
|
8
|
-
|
|
9
|
-
## 3. Validation
|
|
10
|
-
- [x] Run `npm test` (optional if CI)
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Change: add filtered CKAN dataset resource templates
|
|
2
|
-
|
|
3
|
-
## Why
|
|
4
|
-
Users need quick, direct access to filtered dataset lists (by theme, publisher, tag, format) without building complex tool queries.
|
|
5
|
-
|
|
6
|
-
## What Changes
|
|
7
|
-
- Add new MCP resource templates under the existing `ckan://{server}/...` scheme for group, organization, tag, and format dataset filters.
|
|
8
|
-
- Extend resource discovery to list the new templates.
|
|
9
|
-
- Document new resource URIs and examples.
|
|
10
|
-
|
|
11
|
-
## Impact
|
|
12
|
-
- Affected specs: mcp-resources
|
|
13
|
-
- Affected code: `src/resources/*`, `src/resources/uri.ts`, README/docs
|
package/openspec/changes/archive/2026-01-15-add-mcp-resource-filters/specs/mcp-resources/spec.md
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
## ADDED Requirements
|
|
2
|
-
|
|
3
|
-
### Requirement: Group Datasets Resource Template
|
|
4
|
-
The system SHALL expose a resource template for accessing CKAN datasets by group via the URI pattern `ckan://{server}/group/{name}/datasets`.
|
|
5
|
-
|
|
6
|
-
#### Scenario: Read datasets by group
|
|
7
|
-
- **WHEN** client reads `ckan://dati.gov.it/group/governo/datasets`
|
|
8
|
-
- **THEN** server returns JSON with the matching datasets from `package_search`
|
|
9
|
-
|
|
10
|
-
### Requirement: Organization Datasets Resource Template
|
|
11
|
-
The system SHALL expose a resource template for accessing CKAN datasets by organization via the URI pattern `ckan://{server}/organization/{name}/datasets`.
|
|
12
|
-
|
|
13
|
-
#### Scenario: Read datasets by organization
|
|
14
|
-
- **WHEN** client reads `ckan://dati.gov.it/organization/regione-toscana/datasets`
|
|
15
|
-
- **THEN** server returns JSON with the matching datasets from `package_search`
|
|
16
|
-
|
|
17
|
-
### Requirement: Tag Datasets Resource Template
|
|
18
|
-
The system SHALL expose a resource template for accessing CKAN datasets by tag via the URI pattern `ckan://{server}/tag/{name}/datasets`.
|
|
19
|
-
|
|
20
|
-
#### Scenario: Read datasets by tag
|
|
21
|
-
- **WHEN** client reads `ckan://dati.gov.it/tag/turismo/datasets`
|
|
22
|
-
- **THEN** server returns JSON with the matching datasets from `package_search`
|
|
23
|
-
|
|
24
|
-
### Requirement: Format Datasets Resource Template
|
|
25
|
-
The system SHALL expose a resource template for accessing CKAN datasets by resource format via the URI pattern `ckan://{server}/format/{format}/datasets`.
|
|
26
|
-
|
|
27
|
-
#### Scenario: Read datasets by format
|
|
28
|
-
- **WHEN** client reads `ckan://dati.gov.it/format/csv/datasets`
|
|
29
|
-
- **THEN** server returns JSON with the matching datasets from `package_search` filtered by resource format
|
|
30
|
-
|
|
31
|
-
## MODIFIED Requirements
|
|
32
|
-
|
|
33
|
-
### Requirement: Resource Discovery
|
|
34
|
-
The system SHALL list available resource templates when client requests resource list, including dataset, resource, organization, and dataset filter templates (group, organization, tag, format).
|
|
35
|
-
|
|
36
|
-
#### Scenario: List resource templates
|
|
37
|
-
- **WHEN** client calls `resources/listTemplates`
|
|
38
|
-
- **THEN** server returns list of available URI templates with descriptions, including the dataset filter templates
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
## 1. Implementation
|
|
2
|
-
- [x] Add new resource handlers for group, organization datasets, tag, and format filters under `src/resources/`.
|
|
3
|
-
- [x] Register new resource templates in `src/resources/index.ts`.
|
|
4
|
-
- [x] Update URI parsing/validation to accept the new dataset filter paths.
|
|
5
|
-
- [x] Add tests for each new resource template and error cases.
|
|
6
|
-
- [x] Update README/docs with new `ckan://{server}/...` examples.
|
|
7
|
-
|
|
8
|
-
## 2. Validation
|
|
9
|
-
- [x] Run `npm test` (or targeted resource tests).
|
|
10
|
-
- [x] Run `openspec validate add-mcp-resource-filters --strict`.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Change: Move repository ownership to ondata organization
|
|
2
|
-
|
|
3
|
-
## Why
|
|
4
|
-
The repository is moving from the personal account to the ondata organization. Documentation, badges, and published references must reflect the new canonical URL to avoid confusion and broken links.
|
|
5
|
-
|
|
6
|
-
## What Changes
|
|
7
|
-
- Update documentation and in-app links to the new repository URL under the ondata organization.
|
|
8
|
-
- Preserve npm package ownership and scope as @aborruso (no npm ownership change).
|
|
9
|
-
- Confirm GitHub Pages and related references align with the new organization ownership.
|
|
10
|
-
|
|
11
|
-
## Impact
|
|
12
|
-
- Affected specs: repository-metadata, cloudflare-deployment (docs references)
|
|
13
|
-
- Affected code: README.md, docs/*, src/worker.ts, .github/ISSUE_TEMPLATE/config.yml
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
## ADDED Requirements
|
|
2
|
-
### Requirement: Canonical repository ownership references
|
|
3
|
-
The project documentation and UI MUST reference the canonical repository under the ondata organization once the repository is migrated.
|
|
4
|
-
|
|
5
|
-
#### Scenario: Repository references updated
|
|
6
|
-
- **WHEN** a user follows documentation or UI links to the repository
|
|
7
|
-
- **THEN** the links point to the ondata organization repository URL
|
|
8
|
-
|
|
9
|
-
### Requirement: NPM package ownership remains personal
|
|
10
|
-
The project MUST continue to document the npm package under the @aborruso scope unless an explicit npm ownership change is approved.
|
|
11
|
-
|
|
12
|
-
#### Scenario: npm install instructions unchanged
|
|
13
|
-
- **WHEN** a user follows installation instructions
|
|
14
|
-
- **THEN** the package name remains @aborruso/ckan-mcp-server
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
## 1. Documentation and Links
|
|
2
|
-
- [x] 1.1 Inventory repo URL references (README, docs, issue templates, web GUI).
|
|
3
|
-
- [x] 1.2 Update GitHub repository links to the ondata org.
|
|
4
|
-
- [x] 1.3 Update any badges and external links that embed the old owner.
|
|
5
|
-
|
|
6
|
-
## 2. Deployment Guidance
|
|
7
|
-
- [x] 2.1 Update deployment docs that reference the old GitHub repo.
|
|
8
|
-
- [x] 2.2 Validate GitHub Pages URL references where applicable.
|
|
9
|
-
|
|
10
|
-
## 3. Verification
|
|
11
|
-
- [x] 3.1 Confirm npm scope and publish instructions remain unchanged.
|
|
12
|
-
- [x] 3.2 Run openspec validation and address any issues.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Change: Update CKAN search parser handling per portal
|
|
2
|
-
|
|
3
|
-
## Why
|
|
4
|
-
Some CKAN portals (notably dati.gov.it) use a default edismax parser with restrictive `mm` settings that breaks long OR queries. For those portals, the Lucene standard parser on the `text` field yields correct results.
|
|
5
|
-
|
|
6
|
-
## What Changes
|
|
7
|
-
- Add per-portal search configuration to `src/portals.json` to force `text:(...)` queries where needed.
|
|
8
|
-
- Add an optional tool override to force the text-field parser regardless of portal defaults.
|
|
9
|
-
- Update tool documentation to describe the behavior and override.
|
|
10
|
-
|
|
11
|
-
## Impact
|
|
12
|
-
- Affected specs: `ckan-insights`, new `ckan-search` capability
|
|
13
|
-
- Affected code: `src/portals.json`, `src/tools/package.ts`, `src/utils/*` (if new helper is added)
|