@cyanheads/congressgov-mcp-server 0.7.3 → 0.8.0

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 (57) hide show
  1. package/AGENTS.md +20 -14
  2. package/CLAUDE.md +20 -14
  3. package/Dockerfile +80 -48
  4. package/README.md +13 -7
  5. package/changelog/0.7.x/0.7.4.md +31 -0
  6. package/changelog/0.8.x/0.8.0.md +25 -0
  7. package/dist/config/server-config.js +1 -1
  8. package/dist/config/server-config.js.map +1 -1
  9. package/dist/index.js +1 -1
  10. package/dist/index.js.map +1 -1
  11. package/dist/mcp-server/tools/definitions/bill-lookup.tool.d.ts +21 -8
  12. package/dist/mcp-server/tools/definitions/bill-lookup.tool.d.ts.map +1 -1
  13. package/dist/mcp-server/tools/definitions/bill-lookup.tool.js +9 -5
  14. package/dist/mcp-server/tools/definitions/bill-lookup.tool.js.map +1 -1
  15. package/dist/mcp-server/tools/definitions/bill-summaries.tool.d.ts +9 -2
  16. package/dist/mcp-server/tools/definitions/bill-summaries.tool.d.ts.map +1 -1
  17. package/dist/mcp-server/tools/definitions/committee-lookup.tool.d.ts +9 -2
  18. package/dist/mcp-server/tools/definitions/committee-lookup.tool.d.ts.map +1 -1
  19. package/dist/mcp-server/tools/definitions/committee-lookup.tool.js +12 -15
  20. package/dist/mcp-server/tools/definitions/committee-lookup.tool.js.map +1 -1
  21. package/dist/mcp-server/tools/definitions/committee-reports.tool.d.ts +17 -4
  22. package/dist/mcp-server/tools/definitions/committee-reports.tool.d.ts.map +1 -1
  23. package/dist/mcp-server/tools/definitions/committee-reports.tool.js +5 -3
  24. package/dist/mcp-server/tools/definitions/committee-reports.tool.js.map +1 -1
  25. package/dist/mcp-server/tools/definitions/crs-reports.tool.d.ts +15 -2
  26. package/dist/mcp-server/tools/definitions/crs-reports.tool.d.ts.map +1 -1
  27. package/dist/mcp-server/tools/definitions/crs-reports.tool.js +6 -2
  28. package/dist/mcp-server/tools/definitions/crs-reports.tool.js.map +1 -1
  29. package/dist/mcp-server/tools/definitions/daily-record.tool.d.ts +17 -4
  30. package/dist/mcp-server/tools/definitions/daily-record.tool.d.ts.map +1 -1
  31. package/dist/mcp-server/tools/definitions/daily-record.tool.js +5 -3
  32. package/dist/mcp-server/tools/definitions/daily-record.tool.js.map +1 -1
  33. package/dist/mcp-server/tools/definitions/enacted-laws.tool.d.ts +9 -2
  34. package/dist/mcp-server/tools/definitions/enacted-laws.tool.d.ts.map +1 -1
  35. package/dist/mcp-server/tools/definitions/member-lookup.tool.d.ts +9 -2
  36. package/dist/mcp-server/tools/definitions/member-lookup.tool.d.ts.map +1 -1
  37. package/dist/mcp-server/tools/definitions/roll-votes.tool.d.ts +15 -2
  38. package/dist/mcp-server/tools/definitions/roll-votes.tool.d.ts.map +1 -1
  39. package/dist/mcp-server/tools/definitions/roll-votes.tool.js +5 -2
  40. package/dist/mcp-server/tools/definitions/roll-votes.tool.js.map +1 -1
  41. package/dist/mcp-server/tools/definitions/senate-nominations.tool.d.ts +15 -2
  42. package/dist/mcp-server/tools/definitions/senate-nominations.tool.d.ts.map +1 -1
  43. package/dist/mcp-server/tools/definitions/senate-nominations.tool.js +5 -2
  44. package/dist/mcp-server/tools/definitions/senate-nominations.tool.js.map +1 -1
  45. package/dist/mcp-server/tools/tool-helpers.d.ts +22 -7
  46. package/dist/mcp-server/tools/tool-helpers.d.ts.map +1 -1
  47. package/dist/mcp-server/tools/tool-helpers.js +25 -7
  48. package/dist/mcp-server/tools/tool-helpers.js.map +1 -1
  49. package/dist/services/congress-api/congress-api-service.d.ts +8 -3
  50. package/dist/services/congress-api/congress-api-service.d.ts.map +1 -1
  51. package/dist/services/congress-api/congress-api-service.js +83 -18
  52. package/dist/services/congress-api/congress-api-service.js.map +1 -1
  53. package/dist/services/congress-documents/congress-documents-service.d.ts.map +1 -1
  54. package/dist/services/congress-documents/congress-documents-service.js +26 -34
  55. package/dist/services/congress-documents/congress-documents-service.js.map +1 -1
  56. package/package.json +11 -11
  57. package/server.json +13 -27
package/AGENTS.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** congressgov-mcp-server
4
- **Version:** 0.7.3
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.9`
4
+ **Version:** 0.8.0
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.15`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
- **MCP SDK:** `@modelcontextprotocol/server` ^2.1.0
7
+ **MCP SDK:** `@modelcontextprotocol/server` ^2.3.1
8
8
  **Zod:** ^4.6.5
9
9
 
10
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.
@@ -40,7 +40,7 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
40
40
 
41
41
  | Env Var | Required | Description |
42
42
  |:--------|:---------|:------------|
43
- | `CONGRESS_API_KEY` | No | Optional. Defaults to `DEMO_KEY` (30 req/hr). Own key from [api.data.gov](https://api.data.gov/signup/): 5,000 req/hr. |
43
+ | `CONGRESS_API_KEY` | No | Optional. Fallbacks: `DEMO_KEY` 30/hour and 50/day per IP; registered key from [api.data.gov](https://api.data.gov/signup/) 5,000/hour. Valid upstream hourly quota headers take precedence. |
44
44
  | `CONGRESS_API_BASE_URL` | No | Defaults to `https://api.congress.gov/v3` |
45
45
  | `CONGRESS_MIRROR_ENABLED` | No | Enable the local bill search mirror and `congressgov_search_bills`. Defaults to `false`. |
46
46
  | `CONGRESS_MIRROR_PATH` | No | Filesystem path to the SQLite mirror index. Defaults to `.mirror/bills.sqlite3`. |
@@ -56,6 +56,7 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
56
56
  - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly. Values round-trip as JSON; a `Date` reads back as an ISO string.
57
57
  - **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.
58
58
  - **Secrets in env vars only** — never hardcoded.
59
+ - **Cut noise.** Add only what earns its place: no speculative generality, no guards for states the framework already prevents (Zod-validated params, classified errors), no abstraction until a third caller proves it, no option nothing sets.
59
60
  - **All tools are read-only.** Every tool gets `annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true }`.
60
61
  - **API key stays out of logs.** The service sends it in the `X-Api-Key` header — never log credentials.
61
62
  - **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.
@@ -168,7 +169,7 @@ Four services. `CongressApiService` backs nine tools and the House branch of `co
168
169
  **`CongressApiService`** — wraps the Congress.gov REST API v3:
169
170
  - API key via `X-Api-Key` header (never logged; kept out of the URL so it can't leak in upstream error messages)
170
171
  - Pagination: `offset` + `limit` query params, max 250 per request
171
- - Rate limiting: 5,000 requests/hour per key
172
+ - Rate limiting: rolling process-local attempt budgets, reserved before every dispatch (failures, retries, concurrent calls included). Credential fallbacks are demo 30/hour + 50/day and registered 5,000/hour; valid upstream hourly headers override the fallback. Observed remaining is a conservative shared-quota bound, expires one local hour after observation, and never claims an upstream reset time. Other clients are outside local accounting
172
173
  - Response normalization: request `format=json`, return typed data
173
174
  - Native `fetch` — no SDK dependency
174
175
 
@@ -207,20 +208,25 @@ async handler(input, ctx) {
207
208
 
208
209
  ## Error Patterns
209
210
 
211
+ `identityErrorContracts` declares `incompatible_identity` (`ValidationError`, -32007) only on bill lookup, roll votes, nominations, CRS reports, committee reports, and daily record. Their `list` handlers reject meaningful entity identifiers before any service call, preserving the explicit operation and harmless pagination/defaulted selectors. Optional blank string identities remain unset. Bill `type`/`number` and CRS `id`/`reportId`/`report_id` aliases normalize before that check; collisions retain the framework's rejection policy. Bill types and `relatedbills` values normalize through schema-preserving preprocessors.
212
+
210
213
  All tools share these patterns. The service layer handles them uniformly:
211
214
 
212
215
  | Condition | Error |
213
216
  |:----------|:------|
214
- | Rate limit hit | `rateLimited('Congress.gov API rate limit reached (5,000 requests/hour).')` |
217
+ | Rate limit hit | `rateLimited(...)` with `rate_limited`, credential/shared-quota guidance and upstream `Retry-After` when supplied |
218
+ | Deadline or HTTP timeout | `Timeout` (-32004), `upstream_timeout`; HTTP responses retain status |
215
219
  | API unavailable (5xx) | `serviceUnavailable('Congress.gov API returned HTTP {status}.')` |
216
220
  | Entity not found (404) | `notFound('{entity} not found', { ...identifiers })` |
217
221
  | Invalid params | `validationError('...', { field })` |
218
222
  | Network error | `serviceUnavailable('Unable to reach the Congress.gov API.')` |
219
223
 
220
- The `content` operation adds `documentErrorContracts` (tool-helpers) on top: `document_unavailable`, `format_unavailable`, `document_fetch_failed`, `document_too_large`, and `offset_past_end` — the last of which `congressgov_bill_lookup` also raises from its `summaries` branch when `characterOffset` is past the end of every returned row's text. `CongressDocumentsService` raises each with a matching `data.reason` and resolves the hint via `ctx.recoveryFor` — note that `ctx.fail` does **not** auto-populate `recovery`, so handler-side `ctx.fail` calls must spread `ctx.recoveryFor(reason)` into their data or the hint never reaches the wire.
224
+ The `content` operation adds `documentErrorContracts` (tool-helpers) on top: `document_unavailable`, `format_unavailable`, `document_fetch_failed`, `document_too_large`, and `offset_past_end` — the last of which `congressgov_bill_lookup` also raises from its `summaries` branch when `characterOffset` is past the end of every returned row's text. `CongressDocumentsService` raises each with a matching `data.reason`; the framework fills the declared `recovery` hint when the throw carries none, service throws included. Explicit recovery overrides win. A direct `definition.handler(...)` test sees the throw unchanged; retain `ctx.recoveryFor` where such a test asserts the hint, or assert the filled hint through `runToolContract`.
221
225
 
222
226
  Service-only contract reasons carry `thrownBy: 'service'`; handler-local reasons remain checked by `error-contract-unthrown`. `RequestCancelled` is a baseline code and needs no contract entry. Retry predicates compose `defaultIsTransient` with the existing exclusion of `RateLimited` codes and preserve upstream `retryable: false`.
223
227
 
228
+ Framework-handled tool, resource, and prompt errors carry `data.requestId`, matching that call's server log records; a tool's `content[]` closes with `request <id>`. Protocol-level rejections and resource-parameter errors containing only `{ uri }` are excluded. `runToolContract` fills declared recovery hints but adds no request ID.
229
+
224
230
  ---
225
231
 
226
232
  ## Naming
@@ -250,7 +256,7 @@ import { getServerConfig } from '@/config/server-config.js';
250
256
 
251
257
  ## Skills
252
258
 
253
- Skills are modular instructions in `framework-skills/` at the project root. Read them directly when a task matches — e.g., `framework-skills/add-tool/SKILL.md` when adding a tool. Plugin hosts auto-load a root `skills/`, so development guidance belongs in `framework-skills/`.
259
+ Skills are modular instructions in `framework-skills/` at the project root. Read them directly when a task matches — e.g., `framework-skills/add-tool/SKILL.md` when adding a tool. `bun run list-skills` prints the full registry. The directory is deliberately not `skills/`: Claude Code and Codex auto-load a plugin's root `skills/`, so a server that ships `.claude-plugin/` or `.codex-plugin/` would hand these development skills to every agent that installs it. Keep `skills/` free for skills meant for those agents.
254
260
 
255
261
  **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 `framework-skills/` paths manually. After framework updates, run the `maintenance` skill — it re-syncs the agent directory automatically (Phase B).
256
262
 
@@ -271,18 +277,18 @@ Available skills:
271
277
  | `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
272
278
  | `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
273
279
  | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
274
- | `git-wrapup` | Land the commit stack, version bump, and changelog on a release branch; open the release PR |
280
+ | `git-wrapup` | Land working-tree changes as a commit stack — version bump, changelog, verify, commit by concern, release commit on top. No tag, no push to main; opens the release PR when the project declares release PR mode |
275
281
  | `release-pr-review` | Review pass on an open release PR — simplifier + correctness review, fixes as ordinary commits on top of the stack, PR body kept in sync. Release PR mode only |
276
- | `release-and-publish` | Fast-forward main, tag, push, and publish to npm, MCP Registry, GitHub Releases, and Docker |
282
+ | `release-and-publish` | Fast-forward merge (release PR mode) + tag + push + npm + MCP Registry + GH Release + Docker. Picks up from `git-wrapup` |
277
283
  | `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
278
- | `report-issue-framework` | File bugs/features against `@cyanheads/mcp-ts-core` |
279
- | `report-issue-local` | File bugs/features against this server's repo |
284
+ | `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
285
+ | `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
280
286
  | `api-auth` | Auth modes, scopes, JWT/OAuth |
281
287
  | `api-config` | AppConfig, parseConfig, env vars |
282
288
  | `api-context` | Context interface, RequestContext, logger, state, multi-round-trip input |
283
289
  | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
284
290
  | `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
285
- | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper — Tier 3 opt-in |
291
+ | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
286
292
  | `api-mirror` | MirrorService: persistent self-refreshing local mirror (embedded SQLite + FTS5) of a bulk upstream dataset — Tier 3 opt-in |
287
293
  | `api-services` | LLM, Speech, Graph services |
288
294
  | `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
@@ -374,7 +380,7 @@ docker buildx build --platform linux/amd64,linux/arm64 \
374
380
  --push .
375
381
  ```
376
382
 
377
- Remind the user to run these after completing a release flow.
383
+ The `release-and-publish` run handles npm, MCP Registry, bundle, GitHub Release, and GHCR publishing.
378
384
 
379
385
  ---
380
386
 
package/CLAUDE.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** congressgov-mcp-server
4
- **Version:** 0.7.3
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.9`
4
+ **Version:** 0.8.0
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.15`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
- **MCP SDK:** `@modelcontextprotocol/server` ^2.1.0
7
+ **MCP SDK:** `@modelcontextprotocol/server` ^2.3.1
8
8
  **Zod:** ^4.6.5
9
9
 
10
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.
@@ -40,7 +40,7 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
40
40
 
41
41
  | Env Var | Required | Description |
42
42
  |:--------|:---------|:------------|
43
- | `CONGRESS_API_KEY` | No | Optional. Defaults to `DEMO_KEY` (30 req/hr). Own key from [api.data.gov](https://api.data.gov/signup/): 5,000 req/hr. |
43
+ | `CONGRESS_API_KEY` | No | Optional. Fallbacks: `DEMO_KEY` 30/hour and 50/day per IP; registered key from [api.data.gov](https://api.data.gov/signup/) 5,000/hour. Valid upstream hourly quota headers take precedence. |
44
44
  | `CONGRESS_API_BASE_URL` | No | Defaults to `https://api.congress.gov/v3` |
45
45
  | `CONGRESS_MIRROR_ENABLED` | No | Enable the local bill search mirror and `congressgov_search_bills`. Defaults to `false`. |
46
46
  | `CONGRESS_MIRROR_PATH` | No | Filesystem path to the SQLite mirror index. Defaults to `.mirror/bills.sqlite3`. |
@@ -56,6 +56,7 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
56
56
  - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly. Values round-trip as JSON; a `Date` reads back as an ISO string.
57
57
  - **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.
58
58
  - **Secrets in env vars only** — never hardcoded.
59
+ - **Cut noise.** Add only what earns its place: no speculative generality, no guards for states the framework already prevents (Zod-validated params, classified errors), no abstraction until a third caller proves it, no option nothing sets.
59
60
  - **All tools are read-only.** Every tool gets `annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true }`.
60
61
  - **API key stays out of logs.** The service sends it in the `X-Api-Key` header — never log credentials.
61
62
  - **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.
@@ -168,7 +169,7 @@ Four services. `CongressApiService` backs nine tools and the House branch of `co
168
169
  **`CongressApiService`** — wraps the Congress.gov REST API v3:
169
170
  - API key via `X-Api-Key` header (never logged; kept out of the URL so it can't leak in upstream error messages)
170
171
  - Pagination: `offset` + `limit` query params, max 250 per request
171
- - Rate limiting: 5,000 requests/hour per key
172
+ - Rate limiting: rolling process-local attempt budgets, reserved before every dispatch (failures, retries, concurrent calls included). Credential fallbacks are demo 30/hour + 50/day and registered 5,000/hour; valid upstream hourly headers override the fallback. Observed remaining is a conservative shared-quota bound, expires one local hour after observation, and never claims an upstream reset time. Other clients are outside local accounting
172
173
  - Response normalization: request `format=json`, return typed data
173
174
  - Native `fetch` — no SDK dependency
174
175
 
@@ -207,20 +208,25 @@ async handler(input, ctx) {
207
208
 
208
209
  ## Error Patterns
209
210
 
211
+ `identityErrorContracts` declares `incompatible_identity` (`ValidationError`, -32007) only on bill lookup, roll votes, nominations, CRS reports, committee reports, and daily record. Their `list` handlers reject meaningful entity identifiers before any service call, preserving the explicit operation and harmless pagination/defaulted selectors. Optional blank string identities remain unset. Bill `type`/`number` and CRS `id`/`reportId`/`report_id` aliases normalize before that check; collisions retain the framework's rejection policy. Bill types and `relatedbills` values normalize through schema-preserving preprocessors.
212
+
210
213
  All tools share these patterns. The service layer handles them uniformly:
211
214
 
212
215
  | Condition | Error |
213
216
  |:----------|:------|
214
- | Rate limit hit | `rateLimited('Congress.gov API rate limit reached (5,000 requests/hour).')` |
217
+ | Rate limit hit | `rateLimited(...)` with `rate_limited`, credential/shared-quota guidance and upstream `Retry-After` when supplied |
218
+ | Deadline or HTTP timeout | `Timeout` (-32004), `upstream_timeout`; HTTP responses retain status |
215
219
  | API unavailable (5xx) | `serviceUnavailable('Congress.gov API returned HTTP {status}.')` |
216
220
  | Entity not found (404) | `notFound('{entity} not found', { ...identifiers })` |
217
221
  | Invalid params | `validationError('...', { field })` |
218
222
  | Network error | `serviceUnavailable('Unable to reach the Congress.gov API.')` |
219
223
 
220
- The `content` operation adds `documentErrorContracts` (tool-helpers) on top: `document_unavailable`, `format_unavailable`, `document_fetch_failed`, `document_too_large`, and `offset_past_end` — the last of which `congressgov_bill_lookup` also raises from its `summaries` branch when `characterOffset` is past the end of every returned row's text. `CongressDocumentsService` raises each with a matching `data.reason` and resolves the hint via `ctx.recoveryFor` — note that `ctx.fail` does **not** auto-populate `recovery`, so handler-side `ctx.fail` calls must spread `ctx.recoveryFor(reason)` into their data or the hint never reaches the wire.
224
+ The `content` operation adds `documentErrorContracts` (tool-helpers) on top: `document_unavailable`, `format_unavailable`, `document_fetch_failed`, `document_too_large`, and `offset_past_end` — the last of which `congressgov_bill_lookup` also raises from its `summaries` branch when `characterOffset` is past the end of every returned row's text. `CongressDocumentsService` raises each with a matching `data.reason`; the framework fills the declared `recovery` hint when the throw carries none, service throws included. Explicit recovery overrides win. A direct `definition.handler(...)` test sees the throw unchanged; retain `ctx.recoveryFor` where such a test asserts the hint, or assert the filled hint through `runToolContract`.
221
225
 
222
226
  Service-only contract reasons carry `thrownBy: 'service'`; handler-local reasons remain checked by `error-contract-unthrown`. `RequestCancelled` is a baseline code and needs no contract entry. Retry predicates compose `defaultIsTransient` with the existing exclusion of `RateLimited` codes and preserve upstream `retryable: false`.
223
227
 
228
+ Framework-handled tool, resource, and prompt errors carry `data.requestId`, matching that call's server log records; a tool's `content[]` closes with `request <id>`. Protocol-level rejections and resource-parameter errors containing only `{ uri }` are excluded. `runToolContract` fills declared recovery hints but adds no request ID.
229
+
224
230
  ---
225
231
 
226
232
  ## Naming
@@ -250,7 +256,7 @@ import { getServerConfig } from '@/config/server-config.js';
250
256
 
251
257
  ## Skills
252
258
 
253
- Skills are modular instructions in `framework-skills/` at the project root. Read them directly when a task matches — e.g., `framework-skills/add-tool/SKILL.md` when adding a tool. Plugin hosts auto-load a root `skills/`, so development guidance belongs in `framework-skills/`.
259
+ Skills are modular instructions in `framework-skills/` at the project root. Read them directly when a task matches — e.g., `framework-skills/add-tool/SKILL.md` when adding a tool. `bun run list-skills` prints the full registry. The directory is deliberately not `skills/`: Claude Code and Codex auto-load a plugin's root `skills/`, so a server that ships `.claude-plugin/` or `.codex-plugin/` would hand these development skills to every agent that installs it. Keep `skills/` free for skills meant for those agents.
254
260
 
255
261
  **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 `framework-skills/` paths manually. After framework updates, run the `maintenance` skill — it re-syncs the agent directory automatically (Phase B).
256
262
 
@@ -271,18 +277,18 @@ Available skills:
271
277
  | `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
272
278
  | `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
273
279
  | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
274
- | `git-wrapup` | Land the commit stack, version bump, and changelog on a release branch; open the release PR |
280
+ | `git-wrapup` | Land working-tree changes as a commit stack — version bump, changelog, verify, commit by concern, release commit on top. No tag, no push to main; opens the release PR when the project declares release PR mode |
275
281
  | `release-pr-review` | Review pass on an open release PR — simplifier + correctness review, fixes as ordinary commits on top of the stack, PR body kept in sync. Release PR mode only |
276
- | `release-and-publish` | Fast-forward main, tag, push, and publish to npm, MCP Registry, GitHub Releases, and Docker |
282
+ | `release-and-publish` | Fast-forward merge (release PR mode) + tag + push + npm + MCP Registry + GH Release + Docker. Picks up from `git-wrapup` |
277
283
  | `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
278
- | `report-issue-framework` | File bugs/features against `@cyanheads/mcp-ts-core` |
279
- | `report-issue-local` | File bugs/features against this server's repo |
284
+ | `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
285
+ | `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
280
286
  | `api-auth` | Auth modes, scopes, JWT/OAuth |
281
287
  | `api-config` | AppConfig, parseConfig, env vars |
282
288
  | `api-context` | Context interface, RequestContext, logger, state, multi-round-trip input |
283
289
  | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
284
290
  | `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
285
- | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper — Tier 3 opt-in |
291
+ | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
286
292
  | `api-mirror` | MirrorService: persistent self-refreshing local mirror (embedded SQLite + FTS5) of a bulk upstream dataset — Tier 3 opt-in |
287
293
  | `api-services` | LLM, Speech, Graph services |
288
294
  | `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
@@ -374,7 +380,7 @@ docker buildx build --platform linux/amd64,linux/arm64 \
374
380
  --push .
375
381
  ```
376
382
 
377
- Remind the user to run these after completing a release flow.
383
+ The `release-and-publish` run handles npm, MCP Registry, bundle, GitHub Release, and GHCR publishing.
378
384
 
379
385
  ---
380
386
 
package/Dockerfile CHANGED
@@ -7,9 +7,9 @@
7
7
  # Pinned to $BUILDPLATFORM: bun >= 1.4 aborts under QEMU user-mode emulation, so
8
8
  # leaving the build stage on the target platform kills the linux/amd64 leg of a
9
9
  # multi-arch buildx run on an arm64 host. This stage only runs tsc and emits
10
- # architecture-independent JavaScript, and the production stage installs its own
11
- # dependencies natively, so building it on the host architecture is safe.
12
- FROM --platform=$BUILDPLATFORM oven/bun:1.4.2 AS build
10
+ # architecture-independent JavaScript; the native deps stage cross-installs the
11
+ # production tree, so both build-time Bun stages run on the host architecture.
12
+ FROM --platform=$BUILDPLATFORM oven/bun:1.4.3 AS build
13
13
 
14
14
  WORKDIR /usr/src/app
15
15
 
@@ -33,73 +33,105 @@ RUN bun run build
33
33
 
34
34
 
35
35
  # ==============================================================================
36
- # Production Stage
36
+ # Production Dependencies Stage
37
37
  #
38
- # This stage creates a minimal, optimized, and secure image for running the
39
- # application. It uses a slim base image and only includes production
40
- # dependencies and build artifacts.
38
+ # Installs the production dependency tree for the target platform. Every step
39
+ # here can run JavaScript — bunfig.toml's security scanner runs as a Bun
40
+ # program, and so do the OTel and musl-prune scripts — so the stage runs on
41
+ # $BUILDPLATFORM and cross-installs with `--os`/`--cpu`, which pick each
42
+ # platform-specific optional dependency (native bindings such as DuckDB's) for
43
+ # the target. Only `node_modules` leaves this stage.
44
+ #
45
+ # A clean image rather than `FROM build`: the build stage's node_modules holds
46
+ # devDependencies.
41
47
  # ==============================================================================
42
- FROM oven/bun:1.4.2-slim AS production
48
+ FROM --platform=$BUILDPLATFORM oven/bun:1.4.3 AS deps
43
49
 
44
50
  WORKDIR /usr/src/app
45
51
 
46
- # Set the environment to production for performance and to ensure only
47
- # production dependencies are installed.
48
- ENV NODE_ENV=production
49
-
50
- # OCI image metadata (https://github.com/opencontainers/image-spec/blob/main/annotations.md)
51
- ARG APP_VERSION
52
- LABEL org.opencontainers.image.title="congressgov-mcp-server"
53
- LABEL org.opencontainers.image.description="Access U.S. congressional data - bills, votes, members, committees - through MCP. STDIO & Streamable HTTP."
54
- LABEL org.opencontainers.image.source="https://github.com/cyanheads/congressgov-mcp-server"
55
- LABEL org.opencontainers.image.licenses="Apache-2.0"
56
- LABEL org.opencontainers.image.version="${APP_VERSION}"
57
-
58
- # Copy dependency manifests and preserve the release-age gate and scanner.
52
+ # Copy dependency manifests. `bunfig.toml` rides along so every install below
53
+ # passes its release-age gate and security scanner, as a local install does.
59
54
  COPY package.json bun.lock bunfig.toml ./
60
55
 
61
- # Seed the scanner because the production install omits this devDependency.
56
+ # The scanner bunfig.toml names is a devDependency, and Bun installs a missing
57
+ # scanner through the same production-filtered install, which omits it and
58
+ # aborts. Seed it from the build stage's full install instead. Remove this line,
59
+ # and the `rm` at the end of this stage, if bunfig.toml stops naming a scanner.
62
60
  COPY --from=build /usr/src/app/node_modules/@socketsecurity/bun-security-scanner ./node_modules/@socketsecurity/bun-security-scanner
63
61
 
62
+ # Docker names the target architecture `amd64`/`arm64`; Bun's `--cpu` takes
63
+ # `x64`/`arm64`. Mapped once here, read by both installs below. `oven/bun`
64
+ # publishes only these two architectures, so any other target fails here.
65
+ ARG TARGETOS
66
+ ARG TARGETARCH
67
+ RUN case "$TARGETARCH" in \
68
+ amd64) echo x64 ;; \
69
+ arm64) echo arm64 ;; \
70
+ *) echo "Unsupported TARGETARCH '$TARGETARCH': expected amd64 or arm64" >&2; exit 1 ;; \
71
+ esac > .bun-cpu
72
+
64
73
  # Install only production dependencies, ignoring any lifecycle scripts (like 'prepare')
65
74
  # that are not needed in the final production image.
66
75
  # `--omit=peer` drops the framework's optional peer tiers (test runner, service
67
76
  # SDKs, parsers) that Bun would otherwise auto-install. Anything this server
68
77
  # actually imports belongs in its own `dependencies`, so nothing needed at
69
- # runtime is lost. The OTEL step below carries the same flag — without it, that
70
- # install re-resolves the graph and pulls every optional peer back in.
78
+ # runtime is lost.
71
79
  RUN --mount=type=cache,target=/root/.bun/install/cache \
72
- bun install --production --omit=peer --frozen-lockfile --ignore-scripts
80
+ bun install --production --omit=peer --frozen-lockfile --ignore-scripts \
81
+ --os="$TARGETOS" --cpu="$(cat .bun-cpu)"
73
82
 
74
83
  # Conditionally install OpenTelemetry optional peer dependencies (Tier 3).
75
- # Installed by default; omit with --build-arg OTEL_ENABLED=false.
76
- # Resolve each package inside the installed framework's tested peer range.
84
+ # Installed by default. Omit them for a leaner image at build time
85
+ # with: docker build --build-arg OTEL_ENABLED=false
86
+ # The script reads the list and each range from the installed framework's
87
+ # `peerDependencies` and passes the target flags on to its `bun install`.
88
+ COPY scripts/install-otel.ts ./scripts/
77
89
  ARG OTEL_ENABLED=true
78
90
  RUN --mount=type=cache,target=/root/.bun/install/cache \
79
91
  if [ "$OTEL_ENABLED" = "true" ]; then \
80
- specs=$(bun -e ' \
81
- const { peerDependencies: peers } = await Bun.file("node_modules/@cyanheads/mcp-ts-core/package.json").json(); \
82
- const names = process.argv.slice(1); \
83
- const missing = names.filter((name) => !peers?.[name]); \
84
- if (missing.length > 0) throw new Error(`no peerDependencies range for ${missing.join(", ")}`); \
85
- console.log(names.map((name) => `${name}@${peers[name]}`).join(" ")); \
86
- ' \
87
- @hono/otel \
88
- @opentelemetry/api-logs \
89
- @opentelemetry/exporter-logs-otlp-http \
90
- @opentelemetry/exporter-metrics-otlp-http \
91
- @opentelemetry/exporter-trace-otlp-http \
92
- @opentelemetry/instrumentation-http \
93
- @opentelemetry/instrumentation-pino \
94
- @opentelemetry/resources \
95
- @opentelemetry/sdk-logs \
96
- @opentelemetry/sdk-metrics \
97
- @opentelemetry/sdk-node \
98
- @opentelemetry/sdk-trace-node \
99
- @opentelemetry/semantic-conventions) \
100
- && bun add --omit=dev --omit=peer --ignore-scripts $specs; \
92
+ bun scripts/install-otel.ts --os="$TARGETOS" --cpu="$(cat .bun-cpu)"; \
101
93
  fi
102
94
 
95
+ # `--os`/`--cpu` have no libc counterpart, so a native dependency published in
96
+ # glibc and musl variants (DuckDB's bindings, for one) installs both. The
97
+ # runtime image is Debian (glibc) and never loads the musl copy; the script
98
+ # deletes every package whose own `libc` admits only musl. It follows every
99
+ # install, since a later `bun install` restores what it removes. A server on a
100
+ # musl (Alpine) runtime image drops these two lines.
101
+ COPY scripts/prune-musl-packages.ts ./scripts/
102
+ RUN bun scripts/prune-musl-packages.ts
103
+
104
+ # The seeded scanner served only the installs above; keep it out of the image.
105
+ RUN rm -rf node_modules/@socketsecurity/bun-security-scanner
106
+
107
+
108
+ # ==============================================================================
109
+ # Production Stage
110
+ #
111
+ # This stage creates a minimal, optimized, and secure image for running the
112
+ # application. It uses a slim base image and only includes production
113
+ # dependencies and build artifacts.
114
+ # ==============================================================================
115
+ FROM oven/bun:1.4.3-slim AS production
116
+
117
+ WORKDIR /usr/src/app
118
+
119
+ # Set the environment to production for performance and to ensure only
120
+ # production dependencies are installed.
121
+ ENV NODE_ENV=production
122
+
123
+ # OCI image metadata (https://github.com/opencontainers/image-spec/blob/main/annotations.md)
124
+ ARG APP_VERSION
125
+ LABEL org.opencontainers.image.title="congressgov-mcp-server"
126
+ LABEL org.opencontainers.image.description="Access U.S. congressional data (bills, votes, members, committees) via MCP. STDIO or Streamable HTTP."
127
+ LABEL org.opencontainers.image.source="https://github.com/cyanheads/congressgov-mcp-server"
128
+ LABEL org.opencontainers.image.licenses="Apache-2.0"
129
+ LABEL org.opencontainers.image.version="${APP_VERSION}"
130
+
131
+ # The deps manifest is rewritten by the OTel install; retain the server manifest.
132
+ COPY package.json ./
133
+ COPY --from=deps /usr/src/app/node_modules ./node_modules
134
+
103
135
  # Copy the compiled application code from the build stage
104
136
  COPY --from=build /usr/src/app/dist ./dist
105
137
 
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  <div align="center">
2
2
  <h1>@cyanheads/congressgov-mcp-server</h1>
3
- <p><b>Access U.S. congressional data - bills, votes, members, committees - through MCP. STDIO & Streamable HTTP.</b>
3
+ <p><b>Access U.S. congressional data (bills, votes, members, committees) via MCP. STDIO or Streamable HTTP.</b>
4
4
  <div>11 Tools • 5 Resources • 2 Prompts</div>
5
5
  </p>
6
6
  </div>
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-0.7.3-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/congressgov-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.1.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/congressgov-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/congressgov-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.2-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.8.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/congressgov-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.3.1-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/congressgov-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/congressgov-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.3-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -71,6 +71,7 @@ Bill, member, and committee data is also reachable through `congressgov_bill_loo
71
71
  ### `congressgov_bill_lookup` <sub>tool</sub>
72
72
 
73
73
  - `list` browses one `congress`, narrowed by `billType` and a `fromDateTime`/`toDateTime` range on the record's update date, newest first unless `order: 'oldest'`; `get`, `actions`, `amendments`, `cosponsors`, `committees`, `subjects`, `summaries`, `text`, `titles`, `related`, and `content` need `congress` + `billType` + `billNumber`
74
+ - Copied bill-row keys `type` and `number` are accepted as `billType` and `billNumber`; bill type codes are case-insensitive, and `relatedbills` (any case) selects `related`. Send one name per field: canonical and alias keys together are rejected.
74
75
  - `content` reads the text version at `textVersionIndex` (0-based in `text` order, 0 is the most recent) and returns one character window in `content.text` with `totalCharacters`, `truncated`, and `nextOffset`
75
76
  - `summaries` takes an optional `versionCode` (`00` introduced, `49` public law) and applies the same page budget and row window as `congressgov_bill_summaries`, steered by `characterOffset`/`characterLimit`; a cut row carries `textTotalCharacters`, `textTruncated`, and `textNextOffset`
76
77
 
@@ -94,6 +95,7 @@ Bill, member, and committee data is also reachable through `congressgov_bill_loo
94
95
 
95
96
  - `committeeCode` is a chamber prefix (`h`/`s`/`j`), letters, and a 2-digit suffix (e.g. `hsju00`); `get`, `bills`, `reports`, and the Senate-only `nominations` infer `chamber` from the prefix
96
97
  - A committee name in `committeeCode` resolves when exactly one committee matches, and otherwise returns the candidate rows with a notice; `list` with `filter` name-matches every committee in scope, past the 250-row page cap, and fuzzy hits carry `approximate: true`
98
+ - Exact matches require every query token; typo matches require each token to match a name token at the similarity floor. Blank filters browse normally; unrelated tokens return no matches.
97
99
  - `bills` is newest first by default (`order`), and its rows carry no titles, so chain `congressgov_bill_lookup` `get` per row
98
100
 
99
101
  ---
@@ -124,6 +126,7 @@ Bill, member, and committee data is also reachable through `congressgov_bill_loo
124
126
  ### `congressgov_crs_reports` <sub>tool</sub>
125
127
 
126
128
  - `list` browses the catalog; `get` takes a `reportNumber` such as `R40097`, `RL33612`, or `IF12345`
129
+ - `id`, `reportId`, and `report_id` are accepted as `reportNumber`. Send only one identifier key; canonical and alias keys together, or multiple aliases, are rejected.
127
130
  - `get` returns authors, topics, summary, and download formats
128
131
 
129
132
  ---
@@ -206,14 +209,15 @@ Congress.gov-specific:
206
209
  - Type-safe client for the Congress.gov REST API v3, plus a client for the Senate's LIS XML feed that backs Senate roll votes
207
210
  - The Congress.gov API has no keyword search, so tools browse by congress, type, date range, chamber, state, and district, and address bills by `congress` + `billType` + `billNumber`, members by `bioguideId`, and committees by system code; list operations page with `limit` 1–250 (default 20) and `offset`
208
211
  - `content` on bill text, committee reports, and Record articles reads `format` `text` (default) or `xml` through a `characterOffset`/`characterLimit` window (1–100,000 characters, default 25,000), fetched only from `www.congress.gov` under a 25 MB ceiling and a 30s deadline
209
- - Optional API key from [api.data.gov](https://api.data.gov/signup/): `DEMO_KEY` allows 30 req/hr, your own key 5,000 req/hr
212
+ - Optional API key from [api.data.gov](https://api.data.gov/signup/): documented fallbacks are `DEMO_KEY` 30 requests/hour and 50/day per IP, registered keys 5,000/hour. Valid upstream hourly quota headers override the fallback; actual quotas vary
210
213
  - Opt-in local SQLite FTS5 mirror (`CONGRESS_MIRROR_ENABLED`) adds keyword search over bill titles and CRS summaries
211
214
 
212
215
  Agent-friendly output:
213
216
 
214
217
  - Every list response carries `effectiveQuery` and `totalCount`; a `notice` fires when nothing matched, and a page past the end says so in the rendered output
218
+ - `list` rejects entity identities it would discard: bill `billNumber`, vote `voteNumber`, nomination `nominationNumber`, CRS/committee `reportNumber`, and Record `volumeNumber`. The `incompatible_identity` domain error names the detail operation to select or the field to remove; pagination and defaulted selectors remain accepted.
215
219
  - Exact character windows: `content` returns `offset`, `truncated`, and `nextOffset`, so walking a multi-megabyte bill never skips or repeats a character
216
- - Typed `content` failures (`document_unavailable`, `format_unavailable`, `document_fetch_failed`, `document_too_large`, `offset_past_end`) alongside the shared `not_found`, `rate_limited`, `invalid_request`, and `upstream_error` reasons, each with a recovery hint
220
+ - Typed `content` failures (`document_unavailable`, `format_unavailable`, `document_fetch_failed`, `document_too_large`, `offset_past_end`) alongside the shared `not_found`, `rate_limited`, `invalid_request`, `upstream_error`, and `upstream_timeout` reasons, each with a recovery hint. Document byte ceilings and exhausted document/summary offsets use domain validation (-32007); malformed arguments remain protocol invalid parameters (-32602)
217
221
 
218
222
  ## Getting started
219
223
 
@@ -301,7 +305,7 @@ MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 CONGRESS_API_KEY=your-api-key bun run
301
305
  ### Prerequisites
302
306
 
303
307
  - [Bun v1.4.0](https://bun.sh/) or higher (or Node.js v24+).
304
- - Optional: a free [api.data.gov key](https://api.data.gov/signup/) raises the limit from 30 to 5,000 requests per hour.
308
+ - Optional: a free [api.data.gov key](https://api.data.gov/signup/) uses a documented fallback of 5,000 requests/hour instead of the demo fallback of 30/hour and 50/day per IP. Upstream hourly headers may advertise a different quota.
305
309
 
306
310
  ### Installation
307
311
 
@@ -334,7 +338,7 @@ cp .env.example .env
334
338
 
335
339
  | Variable | Description | Default |
336
340
  |:---|:---|:---|
337
- | `CONGRESS_API_KEY` | API key from [api.data.gov](https://api.data.gov/signup/). `DEMO_KEY` allows 30 req/hr; your own key 5,000 req/hr. | `DEMO_KEY` |
341
+ | `CONGRESS_API_KEY` | API key from [api.data.gov](https://api.data.gov/signup/). Fallbacks: `DEMO_KEY` 30/hour and 50/day per IP; registered key 5,000/hour. Upstream hourly quota headers take precedence. | `DEMO_KEY` |
338
342
  | `CONGRESS_API_BASE_URL` | Congress.gov API base URL. | `https://api.congress.gov/v3` |
339
343
  | `CONGRESS_MIRROR_ENABLED` | Enable the local bill search mirror and the `congressgov_search_bills` tool. | `false` |
340
344
  | `CONGRESS_MIRROR_PATH` | Filesystem path to the SQLite mirror index. | `.mirror/bills.sqlite3` |
@@ -365,7 +369,7 @@ See [`.env.example`](./.env.example) for the full list of optional overrides.
365
369
  bun run start:http # or start:stdio
366
370
  ```
367
371
 
368
- - **Build the bill search mirror** (with `CONGRESS_MIRROR_ENABLED=true`):
372
+ - **Build the bill search mirror from this checkout** (with `CONGRESS_MIRROR_ENABLED=true`):
369
373
 
370
374
  ```sh
371
375
  bun run mirror:init # full build
@@ -373,6 +377,8 @@ See [`.env.example`](./.env.example) for the full list of optional overrides.
373
377
  bun run mirror:verify # readiness and integrity check
374
378
  ```
375
379
 
380
+ The mirror CLI requires this checkout or the Docker image's path mapping; an npm installation cannot run these scripts.
381
+
376
382
  - **Run checks and tests:**
377
383
 
378
384
  ```sh
@@ -0,0 +1,31 @@
1
+ ---
2
+ summary: "Tool argument repair and native Docker dependency installs."
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.7.4 — 2026-10-10
8
+
9
+ ## Changed
10
+
11
+ - **Tool argument repair** accepts numeric `congress`/`limit`/`offset` strings in committee-report listings, boolean `currentMember` strings in member listings, and `null` as an omitted optional `reportType` filter. Numeric-string repair applies to directly declared number fields, not values behind preprocessing.
12
+ - **Error correlation** adds a generated `data.requestId` matching the call's log records to framework-handled tool, resource, and prompt errors; rendered tool errors include the same ID. Protocol-level rejections and resource-parameter errors containing only `{ uri }` are excluded.
13
+ - **Document recovery** relies on declared hints instead of redundant forwards in the document service and selected report/Record handlers, preserving error codes, reasons, and recovery text on both client surfaces.
14
+ - **Development guidance** and checks sync with the framework; mirror CLI documentation specifies the checkout or Docker path mapping requirement, and logging examples include `LOG_LLM_INTERACTIONS`.
15
+
16
+ ## Fixed
17
+
18
+ - **Docker builds** install target-platform production dependencies in a native build-platform stage, derive OTel installs from framework peer ranges, and remove musl-only packages from the glibc image.
19
+ - **Registry launches** use `npx` without npm-script arguments and fix `MCP_TRANSPORT_TYPE=http` for the HTTP package entry.
20
+
21
+ ## Dependencies
22
+
23
+ - `@cyanheads/mcp-ts-core` ^0.13.9 → ^0.13.14.
24
+ - `fast-xml-parser` ^5.11.1 → ^5.11.2.
25
+ - `pino-pretty` ^13.1.3 → ^13.2.0.
26
+ - Dev: `@biomejs/biome` ^2.5.14 → ^2.5.15.
27
+ - Dev: `@types/node` ^26.6.2 → ^26.6.4.
28
+ - Dev: `ignore` ^7.0.10 → ^7.0.12.
29
+ - Dev: `tsc-alias` ^1.9.5 → ^1.9.7.
30
+ - Dev: `vitest` ^5.0.1 → ^5.0.3.
31
+ - Lockfile only: `@modelcontextprotocol/core` and `@modelcontextprotocol/server` 2.1.0 → 2.3.1; `source-map-js` 1.2.1 → 1.2.2.
@@ -0,0 +1,25 @@
1
+ ---
2
+ summary: "Congress.gov identifier aliases, meaningful committee matches, and quota-aware errors."
3
+ breaking: true
4
+ security: false
5
+ ---
6
+
7
+ # 0.8.0 — 2026-10-13
8
+
9
+ ## Changed
10
+
11
+ - **Document and summary bounds** now return `ValidationError` (-32007) for `document_too_large` and `offset_past_end`, replacing `InvalidParams` (-32602). Consumers matching numeric codes must migrate; malformed arguments still use -32602. ([#74](https://github.com/cyanheads/congressgov-mcp-server/issues/74))
12
+ - **List operations** reject entity identities they formerly ignored with `incompatible_identity` and compatible-operation guidance; remove the identity to browse or select the detail operation. ([#68](https://github.com/cyanheads/congressgov-mcp-server/issues/68))
13
+ - **Bill inputs** accept `type`/`number`, case-insensitive bill types, and any-case `relatedbills`; **CRS inputs** accept `id`, `reportId`, and `report_id`. Alias collisions reject; advertised canonical input schemas stay unchanged. ([#79](https://github.com/cyanheads/congressgov-mcp-server/issues/79), [#81](https://github.com/cyanheads/congressgov-mcp-server/issues/81))
14
+ - **Development tooling** pins Bun 1.4.2 → 1.4.3 in package-manager and Docker surfaces, synchronizes framework skills, and corrects the MCP SDK documentation baseline to the already-installed 2.3.1.
15
+
16
+ ## Fixed
17
+
18
+ - **Committee typo matching** requires every query token to qualify and ranks ties deterministically before pagination; unrelated candidates disappear, and capped suggestions may contain different tied rows. ([#69](https://github.com/cyanheads/congressgov-mcp-server/issues/69))
19
+ - **Quota protection** reserves failed, retried, and concurrent attempts before dispatch, honors upstream hourly bounds, and applies demo 30/hour plus 50/day and registered 5,000/hour fallbacks. Recovery retains `Retry-After` and distinguishes local accounting from shared quotas. ([#71](https://github.com/cyanheads/congressgov-mcp-server/issues/71))
20
+ - **Request deadlines and HTTP timeouts** return `upstream_timeout` with recovery and retry metadata; HTTP timeout responses retain their status, and cancellation remains cancellation. ([#78](https://github.com/cyanheads/congressgov-mcp-server/issues/78))
21
+
22
+ ## Dependencies
23
+
24
+ - **@cyanheads/mcp-ts-core** ^0.13.14 → ^0.13.15.
25
+ - **@types/node** ^26.6.4 → ^26.6.5.
@@ -36,7 +36,7 @@ const ServerConfigSchema = z.object({
36
36
  apiKey: z
37
37
  .string()
38
38
  .default('DEMO_KEY')
39
- .describe('Congress.gov API key from api.data.gov — optional (DEMO_KEY: 30 req/hr, own key: 5000 req/hr)'),
39
+ .describe('Congress.gov API key from api.data.gov — optional (fallbacks: DEMO_KEY 30/hour and 50/day per IP, registered key 5000/hour; upstream hourly quota headers take precedence)'),
40
40
  baseUrl: z
41
41
  .string()
42
42
  .url()
@@ -1 +1 @@
1
- {"version":3,"file":"server-config.js","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,8DAA8D;AAC9D,MAAM,CAAC,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAI,GAAS,IAAI,IAAI,EAAE;IAC3D,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAC5D,CAAC;AAED;;;;;;GAMG;AACH,SAAS,eAAe,CAAC,KAAc;IACrC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACrD,OAAO,KAAK;aACT,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;aACzC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACjD,CAAC;IACD,MAAM,OAAO,GAAG,qBAAqB,EAAE,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UAAU,iBAAiB;IAC/B,OAAO,GAAG,SAAS,CAAC;AACtB,CAAC"}
package/dist/index.js CHANGED
@@ -92,7 +92,7 @@ await createApp({
92
92
  instructions: `Use the congressgov_* tools to access U.S. legislative data via the Congress.gov API v3: bills, enacted laws, members, committees, roll call votes, presidential nominations, CRS reports, and the daily Congressional Record. The Congress.gov API itself has no keyword search — browse by congress number, bill/report type, date range, chamber, state, and district. An optional local FTS mirror adds congressgov_search_bills (keyword search over bill titles and summaries) when CONGRESS_MIRROR_ENABLED is set; it is off by default, and the tool is not offered at all unless that flag is set. Bills are addressed by congress + billType + billNumber (e.g. 118/hr/1234), members by bioguideId, committees by chamber-prefix codes. congressgov_roll_votes serves both chambers via its 'chamber' parameter — House votes come from the Congress.gov API, Senate votes from the Senate's official LIS feed.`,
93
93
  landing: {
94
94
  repoRoot: REPO_ROOT,
95
- tagline: 'U.S. legislative data — bills, votes, members, committees — via MCP.',
95
+ tagline: 'U.S. legislative data (bills, votes, members, committees) via MCP.',
96
96
  requireAuth: false,
97
97
  },
98
98
  async setup(core) {