@cyanheads/eurostat-mcp-server 0.5.0 → 0.6.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.
Files changed (64) hide show
  1. package/AGENTS.md +386 -0
  2. package/CLAUDE.md +32 -9
  3. package/Dockerfile +5 -5
  4. package/README.md +6 -6
  5. package/changelog/0.1.x/0.1.0.md +20 -0
  6. package/changelog/0.1.x/0.1.1.md +21 -0
  7. package/changelog/0.1.x/0.1.10.md +24 -0
  8. package/changelog/0.1.x/0.1.11.md +15 -0
  9. package/changelog/0.1.x/0.1.12.md +28 -0
  10. package/changelog/0.1.x/0.1.13.md +20 -0
  11. package/changelog/0.1.x/0.1.14.md +38 -0
  12. package/changelog/0.1.x/0.1.15.md +13 -0
  13. package/changelog/0.1.x/0.1.16.md +36 -0
  14. package/changelog/0.1.x/0.1.2.md +17 -0
  15. package/changelog/0.1.x/0.1.3.md +12 -0
  16. package/changelog/0.1.x/0.1.4.md +17 -0
  17. package/changelog/0.1.x/0.1.5.md +11 -0
  18. package/changelog/0.1.x/0.1.6.md +14 -0
  19. package/changelog/0.1.x/0.1.7.md +16 -0
  20. package/changelog/0.1.x/0.1.8.md +19 -0
  21. package/changelog/0.1.x/0.1.9.md +20 -0
  22. package/changelog/0.2.x/0.2.0.md +29 -0
  23. package/changelog/0.3.x/0.3.0.md +17 -0
  24. package/changelog/0.4.x/0.4.0.md +24 -0
  25. package/changelog/0.5.x/0.5.0.md +20 -0
  26. package/changelog/0.6.x/0.6.0.md +20 -0
  27. package/changelog/0.6.x/0.6.1.md +30 -0
  28. package/changelog/template.md +168 -0
  29. package/dist/mcp-server/tools/definitions/eurostat-dataframe-describe.tool.js +1 -1
  30. package/dist/mcp-server/tools/definitions/eurostat-dataframe-describe.tool.js.map +1 -1
  31. package/dist/mcp-server/tools/definitions/eurostat-dataframe-query.tool.js +1 -1
  32. package/dist/mcp-server/tools/definitions/eurostat-dataframe-query.tool.js.map +1 -1
  33. package/dist/mcp-server/tools/definitions/eurostat-download-dataset.tool.d.ts +3 -0
  34. package/dist/mcp-server/tools/definitions/eurostat-download-dataset.tool.d.ts.map +1 -1
  35. package/dist/mcp-server/tools/definitions/eurostat-download-dataset.tool.js +9 -0
  36. package/dist/mcp-server/tools/definitions/eurostat-download-dataset.tool.js.map +1 -1
  37. package/dist/mcp-server/tools/definitions/eurostat-query-dataset.tool.d.ts +6 -2
  38. package/dist/mcp-server/tools/definitions/eurostat-query-dataset.tool.d.ts.map +1 -1
  39. package/dist/mcp-server/tools/definitions/eurostat-query-dataset.tool.js +23 -11
  40. package/dist/mcp-server/tools/definitions/eurostat-query-dataset.tool.js.map +1 -1
  41. package/dist/services/eurostat-bulk/eurostat-bulk-service.d.ts.map +1 -1
  42. package/dist/services/eurostat-bulk/eurostat-bulk-service.js +3 -5
  43. package/dist/services/eurostat-bulk/eurostat-bulk-service.js.map +1 -1
  44. package/dist/services/eurostat-bulk/types.d.ts +3 -29
  45. package/dist/services/eurostat-bulk/types.d.ts.map +1 -1
  46. package/dist/services/eurostat-bulk/types.js +3 -76
  47. package/dist/services/eurostat-bulk/types.js.map +1 -1
  48. package/dist/services/eurostat-catalogue/eurostat-catalogue-service.d.ts.map +1 -1
  49. package/dist/services/eurostat-catalogue/eurostat-catalogue-service.js +3 -6
  50. package/dist/services/eurostat-catalogue/eurostat-catalogue-service.js.map +1 -1
  51. package/dist/services/eurostat-codelists.d.ts +45 -0
  52. package/dist/services/eurostat-codelists.d.ts.map +1 -0
  53. package/dist/services/eurostat-codelists.js +92 -0
  54. package/dist/services/eurostat-codelists.js.map +1 -0
  55. package/dist/services/eurostat-data/eurostat-data-service.d.ts +36 -5
  56. package/dist/services/eurostat-data/eurostat-data-service.d.ts.map +1 -1
  57. package/dist/services/eurostat-data/eurostat-data-service.js +70 -19
  58. package/dist/services/eurostat-data/eurostat-data-service.js.map +1 -1
  59. package/dist/services/eurostat-data/types.d.ts +16 -8
  60. package/dist/services/eurostat-data/types.d.ts.map +1 -1
  61. package/dist/services/eurostat-data/types.js +0 -4
  62. package/dist/services/eurostat-data/types.js.map +1 -1
  63. package/package.json +20 -12
  64. package/server.json +3 -3
package/AGENTS.md ADDED
@@ -0,0 +1,386 @@
1
+ # Agent Protocol
2
+
3
+ **Server:** @cyanheads/eurostat-mcp-server
4
+ **Version:** 0.6.1
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.12.3`
6
+ **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
+ **MCP SDK:** `@modelcontextprotocol/server` `^2.0.0`
8
+ **Zod:** `^4.4.3`
9
+
10
+ > **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
11
+
12
+ ---
13
+
14
+ ## What's Next?
15
+
16
+ When the user asks what to do next, what's left, or needs direction, suggest relevant options based on the current project state:
17
+
18
+ 1. **Re-run the `setup` skill** — ensures CLAUDE.md, skills, structure, and metadata are populated and up to date with the current codebase
19
+ 2. **Run the `design-mcp-server` skill** — if the tool/resource surface hasn't been mapped yet, work through domain design
20
+ 3. **Add tools/resources/prompts** — scaffold new definitions using the `add-tool`, `add-app-tool`, `add-resource`, `add-prompt` skills
21
+ 4. **Add services** — scaffold domain service integrations using the `add-service` skill
22
+ 5. **Add tests** — scaffold tests for existing definitions using the `add-test` skill
23
+ 6. **Field-test definitions** — exercise tools/resources/prompts with real inputs using the `field-test` skill, get a report of issues and pain points
24
+ 7. **Run `devcheck`** — lint, format, typecheck, and security audit
25
+ 8. **Run the `security-pass` skill** — audit handlers for MCP-specific security gaps: output injection, scope blast radius, input sinks, tenant isolation
26
+ 9. **Run the `polish-docs-meta` skill** — finalize README, CHANGELOG, metadata, and agent protocol for shipping
27
+ 10. **Run the `maintenance` skill** — investigate changelogs, adopt upstream changes, and sync skills after `bun update --latest`
28
+
29
+ Tailor suggestions to what's actually missing or stale — don't recite the full list every time.
30
+
31
+ ---
32
+
33
+ ## Core Rules
34
+
35
+ - **Logic throws, framework catches.** Tool/resource handlers are pure — throw on failure, no `try/catch`. Plain `Error` is fine; the framework catches, classifies, and formats. Use error factories (`notFound()`, `validationError()`, etc.) when the error code matters.
36
+ - **Use `ctx.log`** for request-scoped logging. No `console` calls.
37
+ - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
38
+ - **Need input the caller didn't supply?** `return ctx.requestInput(...)` and read `ctx.inputs` when the handler is re-entered. Never `await` for user input mid-handler.
39
+ - **Secrets in env vars only** — never hardcoded.
40
+ - **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed and close it. Do both — a comment without a close leaves stale issues open; a close without a comment leaves no record of what shipped. The comment is for future readers — state the concrete changes, not the conversation that produced them.
41
+
42
+ ---
43
+
44
+ ## Patterns
45
+
46
+ ### Tool
47
+
48
+ ```ts
49
+ import { tool, z } from '@cyanheads/mcp-ts-core';
50
+
51
+ export const searchItems = tool('search_items', {
52
+ description: 'Search inventory items by query.',
53
+ annotations: { readOnlyHint: true },
54
+ input: z.object({
55
+ query: z.string().describe('Search terms'),
56
+ limit: z.number().default(10).describe('Max results'),
57
+ }),
58
+ output: z.object({
59
+ items: z.array(z.object({
60
+ id: z.string().describe('Item ID'),
61
+ name: z.string().describe('Item name'),
62
+ })).describe('Matching items'),
63
+ }),
64
+ auth: ['inventory:read'],
65
+
66
+ async handler(input, ctx) {
67
+ const items = await findItems(input.query, input.limit);
68
+ ctx.log.info('Search completed', { query: input.query, count: items.length });
69
+ return { items };
70
+ },
71
+
72
+ // format() populates content[] — the markdown twin of structuredContent.
73
+ // Different clients read different surfaces (Claude Code → structuredContent,
74
+ // Claude Desktop → content[]); both must carry the same data.
75
+ // Enforced at lint time: every field in `output` must appear in the rendered text.
76
+ format: (result) => [{
77
+ type: 'text',
78
+ text: result.items.map(i => `**${i.id}**: ${i.name}`).join('\n'),
79
+ }],
80
+ });
81
+ ```
82
+
83
+ ### Resource
84
+
85
+ ```ts
86
+ import { resource, z } from '@cyanheads/mcp-ts-core';
87
+ import { notFound } from '@cyanheads/mcp-ts-core/errors';
88
+
89
+ export const itemData = resource('inventory://{itemId}', {
90
+ description: 'Fetch an inventory item by ID.',
91
+ params: z.object({ itemId: z.string().describe('Item identifier') }),
92
+ auth: ['inventory:read'],
93
+ async handler(params, ctx) {
94
+ const item = await ctx.state.get(`item/${params.itemId}`);
95
+ if (!item) throw notFound(`Item ${params.itemId} not found`, { itemId: params.itemId });
96
+ return item;
97
+ },
98
+ });
99
+ ```
100
+
101
+ ### Prompt
102
+
103
+ ```ts
104
+ import { prompt, z } from '@cyanheads/mcp-ts-core';
105
+
106
+ export const reviewCode = prompt('review_code', {
107
+ description: 'Review code for issues and best practices.',
108
+ args: z.object({
109
+ code: z.string().describe('Code to review'),
110
+ language: z.string().optional().describe('Programming language'),
111
+ }),
112
+ generate: (args) => [
113
+ { role: 'user', content: { type: 'text', text: `Review this ${args.language ?? ''} code:\n${args.code}` } },
114
+ ],
115
+ });
116
+ ```
117
+
118
+ ### Server config
119
+
120
+ ```ts
121
+ // src/config/server-config.ts — lazy-parsed, separate from framework config
122
+ import { z } from '@cyanheads/mcp-ts-core';
123
+ import { parseEnvConfig } from '@cyanheads/mcp-ts-core/config';
124
+
125
+ const ServerConfigSchema = z.object({
126
+ apiKey: z.string().describe('External API key'),
127
+ maxResults: z.coerce.number().default(100),
128
+ verboseLogging: z.stringbool().default(false).describe('Enable verbose logging'),
129
+ });
130
+
131
+ let _config: z.infer<typeof ServerConfigSchema> | undefined;
132
+ export function getServerConfig() {
133
+ _config ??= parseEnvConfig(ServerConfigSchema, {
134
+ apiKey: 'MY_API_KEY',
135
+ maxResults: 'MY_MAX_RESULTS',
136
+ verboseLogging: 'MY_VERBOSE_LOGGING',
137
+ });
138
+ return _config;
139
+ }
140
+ ```
141
+
142
+ `parseEnvConfig` maps Zod schema paths → env var names so errors name the variable (`MY_API_KEY`) not the path (`apiKey`). Throws `ConfigurationError`, which the framework prints as a clean startup banner.
143
+
144
+ For env booleans use `z.stringbool()`, never `z.coerce.boolean()` — `Boolean("false")` is `true`, so a coerced flag can't be disabled through the environment. `z.stringbool()` parses `true/false/1/0/yes/no/on/off` and rejects anything else.
145
+
146
+ ### Server identity and instructions
147
+
148
+ `createApp()` accepts optional identity fields forwarded to the SDK's `initialize` response and the server manifest. Keep this server's in-code identity to `name: 'eurostat-mcp-server'` and `title: 'eurostat-mcp-server'`; package metadata remains authoritative for the description and website.
149
+
150
+ `instructions` is optional server-level orientation, sent on every `initialize` as session-level context. Use it for deployment guidance and cross-tool workflows instead of repeating the same context across tool descriptions.
151
+
152
+ ---
153
+
154
+ ## Context
155
+
156
+ Handlers receive a unified `ctx` object. Key properties:
157
+
158
+ | Property | Description |
159
+ |:---------|:------------|
160
+ | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. Dual-sink: Pino and client `notifications/message`, so treat it as client-visible. |
161
+ | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.getMany(keys)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
162
+ | `ctx.requestInput` | Suspend and ask the caller for more input — `return ctx.requestInput({ inputRequests: { key: inputRequired.elicit({ message, requestedSchema }) } })`. Never returns; the handler is re-entered with the answers. |
163
+ | `ctx.inputs` | Reader over a retried request's responses — `.accepted(key, schema)`, `.view(key)`, `.state()`, `.dropped`. Empty on the first round. |
164
+ | `ctx.enrich` | Success-path agent context (empty-result notices, query echo, pagination totals) — `ctx.enrich(...)` or `.notice()` / `.total()` / `.echo()` / `.truncated()`. Reaches `structuredContent` and `content[]`; lands only when the definition declares an `enrichment` block (no-op otherwise). |
165
+ | `ctx.content` | Non-text content blocks — `.image(data, mimeType)`, `.audio(data, mimeType)`, or `ctx.content(block)` for a raw block. Prepended to `content[]` after `format()`; never enters `structuredContent`. |
166
+ | `ctx.signal` | `AbortSignal` for cancellation. |
167
+ | `ctx.requestId` | Unique request ID. |
168
+ | `ctx.tenantId` | Tenant ID from JWT; `'default'` for stdio or HTTP with auth off. |
169
+
170
+ ---
171
+
172
+ ## Errors
173
+
174
+ Handlers throw — the framework catches, classifies, and formats.
175
+
176
+ **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required descriptive metadata for the agent's next move (≥ 5 words, lint-validated); for the wire `data.recovery.hint` (mirrored into `content[]` text), pass explicitly at the throw site when dynamic context matters: `ctx.fail('reason', msg, { recovery: { hint: '...' } })`. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
177
+
178
+ ```ts
179
+ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
180
+
181
+ errors: [
182
+ { reason: 'no_match', code: JsonRpcErrorCode.NotFound,
183
+ when: 'No item matched the query',
184
+ recovery: 'Broaden the query or check the spelling and try again.' },
185
+ ],
186
+ async handler(input, ctx) {
187
+ const item = await db.find(input.id);
188
+ if (!item) throw ctx.fail('no_match', `No item ${input.id}`, ctx.recoveryFor('no_match'));
189
+ return item;
190
+ }
191
+ ```
192
+
193
+ **Declare contracts inline on each tool.** The contract is part of the tool's public surface — one file should give the full picture. Don't extract a shared `errors[]` constant; per-tool repetition is the intended cost of locality.
194
+
195
+ **Fallback (no contract entry fits):** throw via factories or plain `Error`.
196
+
197
+ ```ts
198
+ // Error factories — explicit code
199
+ import { notFound, serviceUnavailable } from '@cyanheads/mcp-ts-core/errors';
200
+ throw notFound('Item not found', { itemId });
201
+ throw serviceUnavailable('API unavailable', { url }, { cause: err });
202
+
203
+ // Plain Error — framework auto-classifies from message patterns
204
+ throw new Error('Item not found'); // → NotFound
205
+ throw new Error('Invalid query format'); // → ValidationError
206
+
207
+ // McpError — when no factory exists for the code
208
+ import { McpError, JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
209
+ throw new McpError(JsonRpcErrorCode.DatabaseError, 'Connection failed', { pool: 'primary' });
210
+ ```
211
+
212
+ See framework CLAUDE.md and the `api-errors` skill for the full auto-classification table, all available factories, and the contract reference.
213
+
214
+ ---
215
+
216
+ ## Structure
217
+
218
+ ```text
219
+ src/
220
+ index.ts # createApp() entry point
221
+ config/
222
+ server-config.ts # Server-specific env vars (Zod schema)
223
+ services/
224
+ [domain]/
225
+ [domain]-service.ts # Domain service (init/accessor pattern)
226
+ types.ts # Domain types
227
+ mcp-server/
228
+ tools/definitions/
229
+ [tool-name].tool.ts # Tool definitions
230
+ resources/definitions/
231
+ [resource-name].resource.ts # Resource definitions
232
+ prompts/definitions/
233
+ [prompt-name].prompt.ts # Prompt definitions
234
+ ```
235
+
236
+ ---
237
+
238
+ ## Naming
239
+
240
+ | What | Convention | Example |
241
+ |:-----|:-----------|:--------|
242
+ | Files | kebab-case with suffix | `search-docs.tool.ts` |
243
+ | Tool/resource/prompt names | snake_case | `search_docs` |
244
+ | Directories | kebab-case | `src/services/doc-search/` |
245
+ | Descriptions | Single string or template literal, no `+` concatenation | `'Search items by query and filter.'` |
246
+
247
+ ---
248
+
249
+ ## Skills
250
+
251
+ Skills are modular instructions in `skills/` at the project root. Read them directly when a task matches — e.g., `skills/add-tool/SKILL.md` when adding a tool.
252
+
253
+ **Agent skill directory:** Copy skills into the directory your agent discovers (Claude Code: `.claude/skills/`, others: equivalent). This makes skills available as context without needing to reference `skills/` paths manually. After framework updates, run the `maintenance` skill — it re-syncs the agent directory automatically (Phase B).
254
+
255
+ Available skills:
256
+
257
+ | Skill | Purpose |
258
+ |:------|:--------|
259
+ | `setup` | Post-init project orientation |
260
+ | `design-mcp-server` | Design tool surface, resources, and services for a new server |
261
+ | `add-tool` | Scaffold a new tool definition |
262
+ | `add-app-tool` | Scaffold an MCP App tool + paired UI resource |
263
+ | `add-resource` | Scaffold a new resource definition |
264
+ | `add-prompt` | Scaffold a new prompt definition |
265
+ | `add-service` | Scaffold a new service integration |
266
+ | `add-test` | Scaffold test file for a tool, resource, or service |
267
+ | `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
268
+ | `tool-defs-analysis` | Read-only audit of definition language: voice, leaks, defaults, recovery hints, examples |
269
+ | `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
270
+ | `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
271
+ | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
272
+ | `maintenance` | Investigate changelogs, adopt upstream changes, and sync skills after `bun update --latest` |
273
+ | `git-wrapup` | Version bump, changelog, commit, and tag — stops before push/publish |
274
+ | `release-and-publish` | Ship a release: verification gate, push commits+tags, publish to npm / MCP Registry / GHCR / `.mcpb` bundle on GitHub Releases |
275
+ | `api-auth` | Auth modes, scopes, JWT/OAuth |
276
+ | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
277
+ | `api-config` | AppConfig, parseConfig, env vars |
278
+ | `api-context` | Context interface, RequestContext, logger, state, multi-round-trip input |
279
+ | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
280
+ | `api-linter` | Definition lint rules reference (`format-parity`, `schema-*`, `server-json-*`, …) |
281
+ | `api-services` | LLM, Speech, Graph services |
282
+ | `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
283
+ | `api-testing` | createMockContext, test patterns |
284
+ | `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
285
+ | `api-mirror` | MirrorService: persistent SQLite-backed local mirror of bulk upstream datasets — Tier 3 opt-in |
286
+ | `api-workers` | Cloudflare Workers runtime |
287
+ | `orchestrations` | Chain task skills into a gated multi-phase pipeline when sub-agents are available |
288
+ | `techniques` | Catalog of response/data-shaping techniques — overflow handling, payload shaping, retrieval patterns |
289
+ | `report-issue-framework` | File bug/feature request against @cyanheads/mcp-ts-core |
290
+ | `report-issue-local` | File bug/feature request against this server's repo |
291
+
292
+ When you complete a skill's checklist, check the boxes and add a completion timestamp at the end (e.g., `Completed: 2026-03-11`).
293
+
294
+ ---
295
+
296
+ ## Commands
297
+
298
+ | Command | Purpose |
299
+ |:--------|:--------|
300
+ | `bun run build` | Compile TypeScript |
301
+ | `bun run rebuild` | Clean + build |
302
+ | `bun run clean` | Remove build artifacts |
303
+ | `bun run devcheck` | Lint + format + typecheck + security + packaging alignment |
304
+ | `bun run audit:refresh` | Delete `bun.lock`, reinstall, and re-run `bun audit`. Use when `devcheck` flags a transitive advisory — Bun's `update` is sticky on transitive resolutions, so the advisory may be a stale-lockfile false positive. If it survives the refresh, it's real. |
305
+ | `bun run tree` | Generate directory structure doc |
306
+ | `bun run format` | Auto-fix formatting |
307
+ | `bun run format:unsafe` | Apply behavior-changing Biome fixes for manual review |
308
+ | `bun run test` | Run tests |
309
+ | `bun run lint:mcp` | Validate MCP definitions against spec |
310
+ | `bun run lint:packaging` | Validate env var alignment between `manifest.json` and `server.json` (skipped cleanly when `manifest.json` is absent) |
311
+ | `bun run list-skills` | List skills in `skills/` with name + description |
312
+ | `bun run release:github` | Create GitHub Release from the latest annotated tag (attach `.mcpb`, enforce title format) |
313
+ | `bun run bundle` | Build and pack as `dist/eurostat-mcp-server.mcpb` for one-click Claude Desktop install |
314
+ | `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
315
+ | `bun run changelog:check` | Verify `CHANGELOG.md` is in sync with `changelog/` |
316
+ | `bun run start:stdio` | Production mode (stdio) |
317
+ | `bun run start:http` | Production mode (HTTP) |
318
+
319
+ ---
320
+
321
+ ## Bundling
322
+
323
+ `bun run bundle` produces `dist/eurostat-mcp-server.mcpb` for one-click install in Claude Desktop. MCPB is stdio-only — HTTP and Docker deployments are unaffected.
324
+
325
+ **Adding an env var requires both files:** `server.json` stdio `environmentVariables[]` (registry discovery) and `manifest.json` `mcp_config.env` (bundle install UX, plus `user_config` if user-prompted). `bun run lint:packaging` (run by `devcheck`) verifies the env var names align.
326
+
327
+ **README install badges** (Claude Desktop `.mcpb`, Cursor, VS Code) and config-generation commands are ship-time concerns — see the `polish-docs-meta` skill (`skills/polish-docs-meta/references/readme.md`).
328
+
329
+ ---
330
+
331
+ ## Changelog
332
+
333
+ The source of truth is one file per release under `changelog/<major.minor>.x/<version>.md`. `CHANGELOG.md` is a generated navigation index; never hand-edit it. `changelog/template.md` is a pristine framework reference and must remain synced from the installed package.
334
+
335
+ Per-version frontmatter requires a one-line `summary`; use `breaking: true` only for consumer-facing breaks and `security: true` only for a security fix in this server's own source. Optional `agent-notes` carry downstream adoption instructions and do not render in `CHANGELOG.md`.
336
+
337
+ ---
338
+
339
+ ## Publishing
340
+
341
+ Run the `release-and-publish` skill after git wrapup — it runs the verification gate (`devcheck`, `rebuild`, `test`), pushes commits and tags, and publishes to npm, the MCP Registry, GHCR, and attaches the `.mcpb` bundle to the GitHub Release, halting on the first failure. For reference, the underlying commands are:
342
+
343
+ ```bash
344
+ bun publish --access public
345
+
346
+ docker buildx build --platform linux/amd64,linux/arm64 \
347
+ -t ghcr.io/cyanheads/eurostat-mcp-server:<version> \
348
+ -t ghcr.io/cyanheads/eurostat-mcp-server:latest \
349
+ --push .
350
+
351
+ mcp-publisher publish
352
+ ```
353
+
354
+ ---
355
+
356
+ ## Imports
357
+
358
+ ```ts
359
+ // Framework — z is re-exported, no separate zod import needed
360
+ import { tool, z } from '@cyanheads/mcp-ts-core';
361
+ import { McpError, JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
362
+
363
+ // Server's own code — via path alias
364
+ import { getMyService } from '@/services/my-domain/my-service.js';
365
+ ```
366
+
367
+ ---
368
+
369
+ ## Checklist
370
+
371
+ - [ ] Zod schemas: all fields have `.describe()`, only JSON-Schema-serializable types (no `z.custom()`, `z.date()`, `z.transform()`, `z.bigint()`, `z.symbol()`, `z.void()`, `z.map()`, `z.set()`, `z.function()`, `z.nan()`)
372
+ - [ ] Optional nested objects: handler guards for empty inner values from form-based clients (`if (input.obj?.field && ...)`, not just `if (input.obj)`). When regex/length constraints matter, use `z.union([z.literal(''), z.string().regex(...).describe(...)])` — literal variants are exempt from `describe-on-fields`.
373
+ - [ ] JSDoc `@fileoverview` + `@module` on every file
374
+ - [ ] `ctx.log` for logging, `ctx.state` for storage
375
+ - [ ] Missing input reads `ctx.inputs` first, then returns `ctx.requestInput(...)`
376
+ - [ ] Handlers throw on failure — error factories or plain `Error`, no try/catch
377
+ - [ ] `format()` renders all data the LLM needs — different clients forward different surfaces (Claude Code → `structuredContent`, Claude Desktop → `content[]`); both must carry the same data
378
+ - [ ] If wrapping external API: raw/domain/output schemas reviewed against real upstream sparsity/nullability before finalizing required vs optional fields
379
+ - [ ] If wrapping external API: normalization and `format()` preserve uncertainty; do not fabricate facts from missing upstream data
380
+ - [ ] If wrapping external API: tests include at least one sparse payload case with omitted upstream fields
381
+ - [ ] Registered in `createApp()` arrays (directly or via barrel exports)
382
+ - [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
383
+ - [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = package name; `interface.shortDescription` from `package.json` description
384
+ - [ ] `.codex-plugin/mcp.json` updated — server name key matches `package.json` name; env vars added for any required API keys
385
+ - [ ] `.claude-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; inline `mcpServers` entry with server name key, env vars for any required API keys
386
+ - [ ] `bun run devcheck` passes
package/CLAUDE.md CHANGED
@@ -1,9 +1,10 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** @cyanheads/eurostat-mcp-server
4
- **Version:** 0.5.0
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.11.1`
4
+ **Version:** 0.6.1
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.12.3`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
+ **MCP SDK:** `@modelcontextprotocol/server` `^2.0.0`
7
8
  **Zod:** `^4.4.3`
8
9
 
9
10
  > **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
@@ -34,7 +35,7 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
34
35
  - **Logic throws, framework catches.** Tool/resource handlers are pure — throw on failure, no `try/catch`. Plain `Error` is fine; the framework catches, classifies, and formats. Use error factories (`notFound()`, `validationError()`, etc.) when the error code matters.
35
36
  - **Use `ctx.log`** for request-scoped logging. No `console` calls.
36
37
  - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
37
- - **Check `ctx.elicit`** for presence before calling.
38
+ - **Need input the caller didn't supply?** `return ctx.requestInput(...)` and read `ctx.inputs` when the handler is re-entered. Never `await` for user input mid-handler.
38
39
  - **Secrets in env vars only** — never hardcoded.
39
40
  - **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed and close it. Do both — a comment without a close leaves stale issues open; a close without a comment leaves no record of what shipped. The comment is for future readers — state the concrete changes, not the conversation that produced them.
40
41
 
@@ -90,7 +91,7 @@ export const itemData = resource('inventory://{itemId}', {
90
91
  params: z.object({ itemId: z.string().describe('Item identifier') }),
91
92
  auth: ['inventory:read'],
92
93
  async handler(params, ctx) {
93
- const item = await ctx.state.get(`item:${params.itemId}`);
94
+ const item = await ctx.state.get(`item/${params.itemId}`);
94
95
  if (!item) throw notFound(`Item ${params.itemId} not found`, { itemId: params.itemId });
95
96
  return item;
96
97
  },
@@ -124,6 +125,7 @@ import { parseEnvConfig } from '@cyanheads/mcp-ts-core/config';
124
125
  const ServerConfigSchema = z.object({
125
126
  apiKey: z.string().describe('External API key'),
126
127
  maxResults: z.coerce.number().default(100),
128
+ verboseLogging: z.stringbool().default(false).describe('Enable verbose logging'),
127
129
  });
128
130
 
129
131
  let _config: z.infer<typeof ServerConfigSchema> | undefined;
@@ -131,6 +133,7 @@ export function getServerConfig() {
131
133
  _config ??= parseEnvConfig(ServerConfigSchema, {
132
134
  apiKey: 'MY_API_KEY',
133
135
  maxResults: 'MY_MAX_RESULTS',
136
+ verboseLogging: 'MY_VERBOSE_LOGGING',
134
137
  });
135
138
  return _config;
136
139
  }
@@ -138,6 +141,14 @@ export function getServerConfig() {
138
141
 
139
142
  `parseEnvConfig` maps Zod schema paths → env var names so errors name the variable (`MY_API_KEY`) not the path (`apiKey`). Throws `ConfigurationError`, which the framework prints as a clean startup banner.
140
143
 
144
+ For env booleans use `z.stringbool()`, never `z.coerce.boolean()` — `Boolean("false")` is `true`, so a coerced flag can't be disabled through the environment. `z.stringbool()` parses `true/false/1/0/yes/no/on/off` and rejects anything else.
145
+
146
+ ### Server identity and instructions
147
+
148
+ `createApp()` accepts optional identity fields forwarded to the SDK's `initialize` response and the server manifest. Keep this server's in-code identity to `name: 'eurostat-mcp-server'` and `title: 'eurostat-mcp-server'`; package metadata remains authoritative for the description and website.
149
+
150
+ `instructions` is optional server-level orientation, sent on every `initialize` as session-level context. Use it for deployment guidance and cross-tool workflows instead of repeating the same context across tool descriptions.
151
+
141
152
  ---
142
153
 
143
154
  ## Context
@@ -146,13 +157,13 @@ Handlers receive a unified `ctx` object. Key properties:
146
157
 
147
158
  | Property | Description |
148
159
  |:---------|:------------|
149
- | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. |
160
+ | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. Dual-sink: Pino and client `notifications/message`, so treat it as client-visible. |
150
161
  | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.getMany(keys)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
151
- | `ctx.elicit` | Ask user for structured input — form call `(message, schema)` or `.url(message, url)` for an external link. **Check for presence first:** `if (ctx.elicit) { ... }` |
162
+ | `ctx.requestInput` | Suspend and ask the caller for more input — `return ctx.requestInput({ inputRequests: { key: inputRequired.elicit({ message, requestedSchema }) } })`. Never returns; the handler is re-entered with the answers. |
163
+ | `ctx.inputs` | Reader over a retried request's responses — `.accepted(key, schema)`, `.view(key)`, `.state()`, `.dropped`. Empty on the first round. |
152
164
  | `ctx.enrich` | Success-path agent context (empty-result notices, query echo, pagination totals) — `ctx.enrich(...)` or `.notice()` / `.total()` / `.echo()` / `.truncated()`. Reaches `structuredContent` and `content[]`; lands only when the definition declares an `enrichment` block (no-op otherwise). |
153
165
  | `ctx.content` | Non-text content blocks — `.image(data, mimeType)`, `.audio(data, mimeType)`, or `ctx.content(block)` for a raw block. Prepended to `content[]` after `format()`; never enters `structuredContent`. |
154
166
  | `ctx.signal` | `AbortSignal` for cancellation. |
155
- | `ctx.progress` | Task progress (present when `task: true`) — `.setTotal(n)`, `.increment()`, `.update(message)`. |
156
167
  | `ctx.requestId` | Unique request ID. |
157
168
  | `ctx.tenantId` | Tenant ID from JWT; `'default'` for stdio or HTTP with auth off. |
158
169
 
@@ -174,7 +185,7 @@ errors: [
174
185
  ],
175
186
  async handler(input, ctx) {
176
187
  const item = await db.find(input.id);
177
- if (!item) throw ctx.fail('no_match', `No item ${input.id}`);
188
+ if (!item) throw ctx.fail('no_match', `No item ${input.id}`, ctx.recoveryFor('no_match'));
178
189
  return item;
179
190
  }
180
191
  ```
@@ -264,7 +275,7 @@ Available skills:
264
275
  | `api-auth` | Auth modes, scopes, JWT/OAuth |
265
276
  | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
266
277
  | `api-config` | AppConfig, parseConfig, env vars |
267
- | `api-context` | Context interface, logger, state, progress |
278
+ | `api-context` | Context interface, RequestContext, logger, state, multi-round-trip input |
268
279
  | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
269
280
  | `api-linter` | Definition lint rules reference (`format-parity`, `schema-*`, `server-json-*`, …) |
270
281
  | `api-services` | LLM, Speech, Graph services |
@@ -293,12 +304,15 @@ When you complete a skill's checklist, check the boxes and add a completion time
293
304
  | `bun run audit:refresh` | Delete `bun.lock`, reinstall, and re-run `bun audit`. Use when `devcheck` flags a transitive advisory — Bun's `update` is sticky on transitive resolutions, so the advisory may be a stale-lockfile false positive. If it survives the refresh, it's real. |
294
305
  | `bun run tree` | Generate directory structure doc |
295
306
  | `bun run format` | Auto-fix formatting |
307
+ | `bun run format:unsafe` | Apply behavior-changing Biome fixes for manual review |
296
308
  | `bun run test` | Run tests |
297
309
  | `bun run lint:mcp` | Validate MCP definitions against spec |
298
310
  | `bun run lint:packaging` | Validate env var alignment between `manifest.json` and `server.json` (skipped cleanly when `manifest.json` is absent) |
299
311
  | `bun run list-skills` | List skills in `skills/` with name + description |
300
312
  | `bun run release:github` | Create GitHub Release from the latest annotated tag (attach `.mcpb`, enforce title format) |
301
313
  | `bun run bundle` | Build and pack as `dist/eurostat-mcp-server.mcpb` for one-click Claude Desktop install |
314
+ | `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
315
+ | `bun run changelog:check` | Verify `CHANGELOG.md` is in sync with `changelog/` |
302
316
  | `bun run start:stdio` | Production mode (stdio) |
303
317
  | `bun run start:http` | Production mode (HTTP) |
304
318
 
@@ -314,6 +328,14 @@ When you complete a skill's checklist, check the boxes and add a completion time
314
328
 
315
329
  ---
316
330
 
331
+ ## Changelog
332
+
333
+ The source of truth is one file per release under `changelog/<major.minor>.x/<version>.md`. `CHANGELOG.md` is a generated navigation index; never hand-edit it. `changelog/template.md` is a pristine framework reference and must remain synced from the installed package.
334
+
335
+ Per-version frontmatter requires a one-line `summary`; use `breaking: true` only for consumer-facing breaks and `security: true` only for a security fix in this server's own source. Optional `agent-notes` carry downstream adoption instructions and do not render in `CHANGELOG.md`.
336
+
337
+ ---
338
+
317
339
  ## Publishing
318
340
 
319
341
  Run the `release-and-publish` skill after git wrapup — it runs the verification gate (`devcheck`, `rebuild`, `test`), pushes commits and tags, and publishes to npm, the MCP Registry, GHCR, and attaches the `.mcpb` bundle to the GitHub Release, halting on the first failure. For reference, the underlying commands are:
@@ -350,6 +372,7 @@ import { getMyService } from '@/services/my-domain/my-service.js';
350
372
  - [ ] Optional nested objects: handler guards for empty inner values from form-based clients (`if (input.obj?.field && ...)`, not just `if (input.obj)`). When regex/length constraints matter, use `z.union([z.literal(''), z.string().regex(...).describe(...)])` — literal variants are exempt from `describe-on-fields`.
351
373
  - [ ] JSDoc `@fileoverview` + `@module` on every file
352
374
  - [ ] `ctx.log` for logging, `ctx.state` for storage
375
+ - [ ] Missing input reads `ctx.inputs` first, then returns `ctx.requestInput(...)`
353
376
  - [ ] Handlers throw on failure — error factories or plain `Error`, no try/catch
354
377
  - [ ] `format()` renders all data the LLM needs — different clients forward different surfaces (Claude Code → `structuredContent`, Claude Desktop → `content[]`); both must carry the same data
355
378
  - [ ] If wrapping external API: raw/domain/output schemas reviewed against real upstream sparsity/nullability before finalizing required vs optional fields
package/Dockerfile CHANGED
@@ -1,7 +1,7 @@
1
1
  # ==============================================================================
2
2
  # Build Stage
3
3
  # ==============================================================================
4
- FROM oven/bun:1.3.14 AS build
4
+ FROM --platform=$BUILDPLATFORM oven/bun:1.4.0 AS build
5
5
 
6
6
  WORKDIR /usr/src/app
7
7
 
@@ -27,7 +27,7 @@ RUN bun run build
27
27
  # application. It uses a slim base image and only includes production
28
28
  # dependencies and build artifacts.
29
29
  # ==============================================================================
30
- FROM oven/bun:1.3.14-slim AS production
30
+ FROM oven/bun:1.4.0-slim AS production
31
31
 
32
32
  WORKDIR /usr/src/app
33
33
 
@@ -38,7 +38,7 @@ ENV NODE_ENV=production
38
38
  # OCI image metadata (https://github.com/opencontainers/image-spec/blob/main/annotations.md)
39
39
  ARG APP_VERSION
40
40
  LABEL org.opencontainers.image.title="@cyanheads/eurostat-mcp-server"
41
- LABEL org.opencontainers.image.description="Search and query 8,933 Eurostat datasets — EU economy, demography, trade, health, and NUTS regional data via MCP. STDIO or Streamable HTTP."
41
+ LABEL org.opencontainers.image.description="Search and query the Eurostat catalogue — EU economy, demography, trade, health, and NUTS regional data via MCP. STDIO or Streamable HTTP."
42
42
  LABEL org.opencontainers.image.licenses="Apache-2.0"
43
43
  LABEL org.opencontainers.image.version="${APP_VERSION}"
44
44
  LABEL org.opencontainers.image.source="https://github.com/cyanheads/eurostat-mcp-server"
@@ -52,7 +52,7 @@ COPY package.json bun.lock ./
52
52
  # the canvas is gated at runtime by CANVAS_PROVIDER_TYPE, not at build time, so the
53
53
  # image always carries the binding and a deployment turns the feature on with an env var.
54
54
  RUN --mount=type=cache,target=/root/.bun/install/cache \
55
- bun install --production --frozen-lockfile --ignore-scripts
55
+ bun install --production --omit=peer --frozen-lockfile --ignore-scripts
56
56
 
57
57
  # Conditionally install OpenTelemetry optional peer dependencies (Tier 3).
58
58
  # These are not bundled by default to keep the base image lean. Enable at build time
@@ -60,7 +60,7 @@ RUN --mount=type=cache,target=/root/.bun/install/cache \
60
60
  ARG OTEL_ENABLED=true
61
61
  RUN --mount=type=cache,target=/root/.bun/install/cache \
62
62
  if [ "$OTEL_ENABLED" = "true" ]; then \
63
- bun add --omit=dev --ignore-scripts @hono/otel \
63
+ bun add --omit=dev --omit=peer --ignore-scripts @hono/otel \
64
64
  @opentelemetry/instrumentation-http \
65
65
  @opentelemetry/exporter-metrics-otlp-http \
66
66
  @opentelemetry/exporter-trace-otlp-http \
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
 
11
11
 
12
- [![Version](https://img.shields.io/badge/Version-0.5.0-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/eurostat-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.30.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/eurostat-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/eurostat-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.14-blueviolet.svg?style=flat-square)](https://bun.sh/)
12
+ [![Version](https://img.shields.io/badge/Version-0.6.1-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/eurostat-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/eurostat-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/eurostat-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.0-blueviolet.svg?style=flat-square)](https://bun.sh/)
13
13
 
14
14
  </div>
15
15
 
@@ -100,7 +100,7 @@ Fetch statistical data from a Eurostat dataset.
100
100
  - Accepts dimension filters as a map of `{dimension_code: [value1, value2, ...]}`
101
101
  - NUTS geo-level filter (`aggregate`, `country`, `nuts1`, `nuts2`, `nuts3`) — mutually exclusive with a non-empty `geo` entry in filters; an empty array is treated as no filter and dropped
102
102
  - Time range via `since_period`/`until_period` (e.g., `"2020"`, `"2023-Q1"`) or `last_n_periods` for the N most recent
103
- - Returns decoded observations with dimension codes and labels, numeric values, and status flags (`p` = provisional, `e` = estimated, etc.)
103
+ - Returns decoded observations with dimension codes and labels, numeric values, an `OBS_FLAG` status (`p` = provisional, `e` = estimated, etc.) and a separate `CONF_STATUS` confidentiality marker (`C` = confidential, usually the reason a value is null)
104
104
  - Reports total observation count, missing value count, and the effective time range of the result, each period bound omitted when neither the observations nor Eurostat report it
105
105
  - Inline rows are capped at 5,000, applied while decoding so a broad query never builds the rest; `obsCount`, `missingObsCount` and `timeRange` still describe the whole match, and `truncated` flags when the cap bit. Filter the query to shrink what Eurostat sends — the cap bounds the decode, not the transfer
106
106
  - With the dataframe canvas enabled, a match past the cap is also staged whole as a SQL table and the response returns `canvasId` / `tableName` / `stagedRowCount`; the rows are streamed into the table one at a time from the response body already in memory, so nothing extra is fetched and the match is never materialized as an array. Without a canvas those fields are absent and narrowing the query is the way to the rest
@@ -132,8 +132,8 @@ SQL over the results `eurostat_query_dataset` and `eurostat_download_dataset` st
132
132
 
133
133
  - `eurostat_dataframe_describe` lists the staged tables with row counts and column names and types — call it before writing SQL
134
134
  - `eurostat_dataframe_query` runs a single read-only `SELECT`. Statement chaining, non-`SELECT` verbs, and functions that read files or external data are rejected with a typed error
135
- - Staged columns are flat, and the two stagers write different sets — call `eurostat_dataframe_describe` rather than assuming. `eurostat_query_dataset` gives each dimension a code column named after the dimension (`geo`) plus a label companion (`geo_label`), followed by `obs_value`, `obs_flag`, `obs_flag_label`. `eurostat_download_dataset` gives code columns only, since the bulk endpoint carries no labels, plus a `time` column and `obs_value`, `obs_flag`, `obs_flag_label`, `conf_status`, `conf_status_label`
136
- - Tables from the two stagers join on their dimension code columns and `time` — same names, same `VARCHAR` type, with `obs_value` `DOUBLE` on both. `obs_flag` is the one column that shares a name without sharing a meaning: JSON-stat folds confidentiality into the observation status, so a confidential cell reads `obs_flag = '|C'` on a query-staged table and `obs_flag = NULL` with `conf_status = 'C'` on a bulk-staged one. Join on the codes, not on the flag
135
+ - Staged columns are flat, and the two stagers write different dimension columns — call `eurostat_dataframe_describe` rather than assuming. `eurostat_query_dataset` gives each dimension a code column named after the dimension (`geo`) plus a label companion (`geo_label`); `eurostat_download_dataset` gives code columns only, since the bulk endpoint carries no labels, plus a `time` column. Both write the same five measure columns: `obs_value`, `obs_flag`, `obs_flag_label`, `conf_status`, `conf_status_label`
136
+ - Tables from the two stagers join on their dimension code columns and `time` — same names, same `VARCHAR` type, `obs_value` `DOUBLE` on both — and their measure columns carry the same codes for the same observation. JSON-stat has no `CONF_STATUS` field and folds the marker into the observation status as `|C`; `eurostat_query_dataset` splits it back out before staging, so a confidential cell reads `obs_flag = NULL` with `conf_status = 'C'` on either table
137
137
  - The DuckDB binding ships with the server, so `CANVAS_PROVIDER_TYPE=duckdb` is the only switch. The exception is the one-click `.mcpb` bundle, which strips platform-specific native bindings to stay portable — a bundle install cannot run the canvas, so reach for the npm, Docker, or from-source install for SQL analytics
138
138
 
139
139
  ## Resource
@@ -159,7 +159,7 @@ Eurostat-specific:
159
159
  - JSON-stat 2.0 stride-based decoder for the Statistics API response format
160
160
  - Async-response detection — Eurostat returns a warning object rather than an error for over-limit queries; the server intercepts it and returns an actionable error with filter guidance
161
161
  - NUTS hierarchy geo-level filtering across query and dimension-value tools
162
- - Status flag decoding (provisional, estimated, definition differs, etc.)
162
+ - Status decoding against both published codelists — the `OBS_FLAG` observation flag (provisional, estimated, definition differs) and the `CONF_STATUS` confidentiality marker, each in its own field. JSON-stat folds the two into one string and SDMX TSV into one cell; both are split on their separator, so a given observation reads the same whichever endpoint served it
163
163
  - Optional DuckDB dataframe canvas — a query matching more than the inline cap is streamed row by row into a SQL table, reaching the observations the cap drops without a second request to Eurostat
164
164
  - SDMX 2.1 TSV bulk downloads with streaming gzip detection, a mid-transfer byte budget, wide-to-long expansion, and SOAP fault classification — the whole-dataset counterpart to the per-query path
165
165
 
@@ -321,7 +321,7 @@ All configuration is validated at startup via Zod schemas in `src/config/server-
321
321
 
322
322
  | Directory | Purpose |
323
323
  |:---|:---|
324
- | `src/mcp-server/tools` | Tool definitions (`*.tool.ts`). Five tools for discovery and data access, plus two canvas-gated dataframe tools. |
324
+ | `src/mcp-server/tools` | Tool definitions (`*.tool.ts`). Six tools for discovery and data access, plus two canvas-gated dataframe tools. |
325
325
  | `src/mcp-server/resources` | Resource definitions. Dataset metadata resource. |
326
326
  | `src/services/eurostat-catalogue` | Catalogue service — fetches and parses the Eurostat TOC TXT file; TTL-bounded in-memory cache. |
327
327
  | `src/services/eurostat-data` | Data service — Statistics API HTTP client, JSON-stat 2.0 decoder, async-response detection, dataframe row source. |
@@ -0,0 +1,20 @@
1
+ ---
2
+ summary: "Initial release — Eurostat statistical data server with 5 tools and 1 resource"
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.1.0 — 2026-05-23
8
+
9
+ ## Added
10
+
11
+ - **`eurostat_search_datasets`** — keyword search across 8,933 Eurostat datasets using the session-cached TOC TXT file
12
+ - **`eurostat_browse_themes`** — tree navigation of the Eurostat theme hierarchy (11 root themes, hierarchical subthemes)
13
+ - **`eurostat_get_dataset_info`** — dataset metadata including dimensions, valid values, time range, obs count, and last-updated date
14
+ - **`eurostat_get_dimension_values`** — full list of valid values for a specific dataset dimension; supports NUTS geo-level filtering
15
+ - **`eurostat_query_dataset`** — decoded JSON-stat 2.0 observations with dimension filters, NUTS geo-level, and time-range support
16
+ - **`eurostat://dataset/{dataset_code}`** resource — dataset metadata accessible by URI
17
+ - `EurostatCatalogueService` — fetches and parses the TOC TXT file; session-level in-memory cache for search and tree navigation
18
+ - `EurostatDataService` — Statistics API HTTP client with JSON-stat 2.0 stride-based decoder, async-response detection, and retry logic
19
+ - `EUROSTAT_BASE_URL` env var — override API base URL (default: `https://ec.europa.eu/eurostat/api/dissemination`)
20
+ - `EUROSTAT_REQUEST_TIMEOUT_MS` env var — HTTP request timeout in ms (default: `30000`)