@cyanheads/congressgov-mcp-server 0.7.2 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** congressgov-mcp-server
4
- **Version:** 0.7.2
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.6`
4
+ **Version:** 0.7.3
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.9`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
- **MCP SDK:** `@modelcontextprotocol/server` + `@modelcontextprotocol/client` ^2.0.0
7
+ **MCP SDK:** `@modelcontextprotocol/server` ^2.1.0
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.
@@ -53,7 +53,7 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
53
53
 
54
54
  - **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.
55
55
  - **Use `ctx.log`** for request-scoped logging. No `console` calls.
56
- - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
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
59
  - **All tools are read-only.** Every tool gets `annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true }`.
@@ -272,7 +272,7 @@ Available skills:
272
272
  | `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
273
273
  | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
274
274
  | `git-wrapup` | Land the commit stack, version bump, and changelog on a release branch; open the release PR |
275
- | `release-pr-review` | Review the release PR and land fixes as ordinary commits; keep its body in sync |
275
+ | `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
276
  | `release-and-publish` | Fast-forward main, tag, push, and publish to npm, MCP Registry, GitHub Releases, and Docker |
277
277
  | `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
278
278
  | `report-issue-framework` | File bugs/features against `@cyanheads/mcp-ts-core` |
@@ -281,9 +281,9 @@ Available skills:
281
281
  | `api-config` | AppConfig, parseConfig, env vars |
282
282
  | `api-context` | Context interface, RequestContext, logger, state, multi-round-trip input |
283
283
  | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
284
- | `api-linter` | MCP definition linter rules reference — look up `format-parity`, `schema-*`, `name-*`, `server-json-*` diagnostics |
284
+ | `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
285
285
  | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper — Tier 3 opt-in |
286
- | `api-mirror` | MirrorService: persistent local SQLite mirror of bulk upstream datasets — Tier 3 opt-in |
286
+ | `api-mirror` | MirrorService: persistent self-refreshing local mirror (embedded SQLite + FTS5) of a bulk upstream dataset — Tier 3 opt-in |
287
287
  | `api-services` | LLM, Speech, Graph services |
288
288
  | `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
289
289
  | `api-testing` | createMockContext, test patterns |
@@ -315,8 +315,8 @@ When you complete a skill's checklist, check the boxes and add a completion time
315
315
  | `bun run bundle` | Build and pack as `.mcpb` for one-click Claude Desktop install |
316
316
  | `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
317
317
  | `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
318
- | `bun run release:github` | Create GitHub Release from the current annotated tag |
319
- | `bun run test` | Run tests |
318
+ | `bun run release:github` | Validate the current annotated tag and create its GitHub Release; `-- --check` validates only |
319
+ | `bun run test` | Run tests (Vitest — use `bun run test`, not `bun test`) |
320
320
  | `bun run dev:stdio` | Dev mode (stdio) |
321
321
  | `bun run dev:http` | Dev mode (HTTP) |
322
322
  | `bun run start:stdio` | Production mode (stdio) |
@@ -392,6 +392,6 @@ Remind the user to run these after completing a release flow.
392
392
  - [ ] Registered in `createApp()` arrays (directly or via barrel exports)
393
393
  - [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
394
394
  - [ ] `.codex-plugin/plugin.json` populated — `name` and `interface.displayName` = unscoped repo name; `version`, `description`, `repository`, `license` and `interface.shortDescription` from `package.json`
395
- - [ ] `.codex-plugin/mcp.json` updated — server name key matches `package.json` name; env vars added for any required API keys
396
- - [ ] `.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
395
+ - [ ] `.codex-plugin/mcp.json` updated — server name key is the unscoped repo name; every user-supplied variable is listed in `env_vars`. Never write `"KEY": ""` into `env` — it overrides the user's exported key
396
+ - [ ] `.claude-plugin/plugin.json` populated — unscoped `name`, `version`, `description`, `author`, `repository`, `license`, `keywords`; inline `mcpServers` entry keyed by the unscoped repo name. User-supplied variables use `userConfig` and `"KEY": "${user_config.<option>}"` env references, matching `manifest.json`
397
397
  - [ ] `bun run devcheck` passes
package/CLAUDE.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** congressgov-mcp-server
4
- **Version:** 0.7.2
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.6`
4
+ **Version:** 0.7.3
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.9`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
- **MCP SDK:** `@modelcontextprotocol/server` + `@modelcontextprotocol/client` ^2.0.0
7
+ **MCP SDK:** `@modelcontextprotocol/server` ^2.1.0
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.
@@ -53,7 +53,7 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
53
53
 
54
54
  - **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.
55
55
  - **Use `ctx.log`** for request-scoped logging. No `console` calls.
56
- - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
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
59
  - **All tools are read-only.** Every tool gets `annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true }`.
@@ -272,7 +272,7 @@ Available skills:
272
272
  | `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
273
273
  | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
274
274
  | `git-wrapup` | Land the commit stack, version bump, and changelog on a release branch; open the release PR |
275
- | `release-pr-review` | Review the release PR and land fixes as ordinary commits; keep its body in sync |
275
+ | `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
276
  | `release-and-publish` | Fast-forward main, tag, push, and publish to npm, MCP Registry, GitHub Releases, and Docker |
277
277
  | `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
278
278
  | `report-issue-framework` | File bugs/features against `@cyanheads/mcp-ts-core` |
@@ -281,9 +281,9 @@ Available skills:
281
281
  | `api-config` | AppConfig, parseConfig, env vars |
282
282
  | `api-context` | Context interface, RequestContext, logger, state, multi-round-trip input |
283
283
  | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
284
- | `api-linter` | MCP definition linter rules reference — look up `format-parity`, `schema-*`, `name-*`, `server-json-*` diagnostics |
284
+ | `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
285
285
  | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper — Tier 3 opt-in |
286
- | `api-mirror` | MirrorService: persistent local SQLite mirror of bulk upstream datasets — Tier 3 opt-in |
286
+ | `api-mirror` | MirrorService: persistent self-refreshing local mirror (embedded SQLite + FTS5) of a bulk upstream dataset — Tier 3 opt-in |
287
287
  | `api-services` | LLM, Speech, Graph services |
288
288
  | `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
289
289
  | `api-testing` | createMockContext, test patterns |
@@ -315,8 +315,8 @@ When you complete a skill's checklist, check the boxes and add a completion time
315
315
  | `bun run bundle` | Build and pack as `.mcpb` for one-click Claude Desktop install |
316
316
  | `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
317
317
  | `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
318
- | `bun run release:github` | Create GitHub Release from the current annotated tag |
319
- | `bun run test` | Run tests |
318
+ | `bun run release:github` | Validate the current annotated tag and create its GitHub Release; `-- --check` validates only |
319
+ | `bun run test` | Run tests (Vitest — use `bun run test`, not `bun test`) |
320
320
  | `bun run dev:stdio` | Dev mode (stdio) |
321
321
  | `bun run dev:http` | Dev mode (HTTP) |
322
322
  | `bun run start:stdio` | Production mode (stdio) |
@@ -392,6 +392,6 @@ Remind the user to run these after completing a release flow.
392
392
  - [ ] Registered in `createApp()` arrays (directly or via barrel exports)
393
393
  - [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
394
394
  - [ ] `.codex-plugin/plugin.json` populated — `name` and `interface.displayName` = unscoped repo name; `version`, `description`, `repository`, `license` and `interface.shortDescription` from `package.json`
395
- - [ ] `.codex-plugin/mcp.json` updated — server name key matches `package.json` name; env vars added for any required API keys
396
- - [ ] `.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
395
+ - [ ] `.codex-plugin/mcp.json` updated — server name key is the unscoped repo name; every user-supplied variable is listed in `env_vars`. Never write `"KEY": ""` into `env` — it overrides the user's exported key
396
+ - [ ] `.claude-plugin/plugin.json` populated — unscoped `name`, `version`, `description`, `author`, `repository`, `license`, `keywords`; inline `mcpServers` entry keyed by the unscoped repo name. User-supplied variables use `userConfig` and `"KEY": "${user_config.<option>}"` env references, matching `manifest.json`
397
397
  - [ ] `bun run devcheck` passes
package/Dockerfile CHANGED
@@ -9,7 +9,7 @@
9
9
  # multi-arch buildx run on an arm64 host. This stage only runs tsc and emits
10
10
  # architecture-independent JavaScript, and the production stage installs its own
11
11
  # dependencies natively, so building it on the host architecture is safe.
12
- FROM --platform=$BUILDPLATFORM oven/bun:1.4.0 AS build
12
+ FROM --platform=$BUILDPLATFORM oven/bun:1.4.2 AS build
13
13
 
14
14
  WORKDIR /usr/src/app
15
15
 
@@ -39,7 +39,7 @@ RUN bun run build
39
39
  # application. It uses a slim base image and only includes production
40
40
  # dependencies and build artifacts.
41
41
  # ==============================================================================
42
- FROM oven/bun:1.4.0-slim AS production
42
+ FROM oven/bun:1.4.2-slim AS production
43
43
 
44
44
  WORKDIR /usr/src/app
45
45
 
@@ -55,8 +55,11 @@ LABEL org.opencontainers.image.source="https://github.com/cyanheads/congressgov-
55
55
  LABEL org.opencontainers.image.licenses="Apache-2.0"
56
56
  LABEL org.opencontainers.image.version="${APP_VERSION}"
57
57
 
58
- # Copy dependency manifests
59
- COPY package.json bun.lock ./
58
+ # Copy dependency manifests and preserve the release-age gate and scanner.
59
+ COPY package.json bun.lock bunfig.toml ./
60
+
61
+ # Seed the scanner because the production install omits this devDependency.
62
+ COPY --from=build /usr/src/app/node_modules/@socketsecurity/bun-security-scanner ./node_modules/@socketsecurity/bun-security-scanner
60
63
 
61
64
  # Install only production dependencies, ignoring any lifecycle scripts (like 'prepare')
62
65
  # that are not needed in the final production image.
@@ -69,21 +72,32 @@ RUN --mount=type=cache,target=/root/.bun/install/cache \
69
72
  bun install --production --omit=peer --frozen-lockfile --ignore-scripts
70
73
 
71
74
  # Conditionally install OpenTelemetry optional peer dependencies (Tier 3).
72
- # These are installed by default. Omit them for a smaller image with:
73
- # docker build --build-arg OTEL_ENABLED=false
75
+ # Installed by default; omit with --build-arg OTEL_ENABLED=false.
76
+ # Resolve each package inside the installed framework's tested peer range.
74
77
  ARG OTEL_ENABLED=true
75
78
  RUN --mount=type=cache,target=/root/.bun/install/cache \
76
79
  if [ "$OTEL_ENABLED" = "true" ]; then \
77
- bun add --omit=dev --omit=peer --ignore-scripts @hono/otel \
78
- @opentelemetry/instrumentation-http \
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 \
79
90
  @opentelemetry/exporter-metrics-otlp-http \
80
91
  @opentelemetry/exporter-trace-otlp-http \
92
+ @opentelemetry/instrumentation-http \
81
93
  @opentelemetry/instrumentation-pino \
82
94
  @opentelemetry/resources \
95
+ @opentelemetry/sdk-logs \
83
96
  @opentelemetry/sdk-metrics \
84
97
  @opentelemetry/sdk-node \
85
98
  @opentelemetry/sdk-trace-node \
86
- @opentelemetry/semantic-conventions; \
99
+ @opentelemetry/semantic-conventions) \
100
+ && bun add --omit=dev --omit=peer --ignore-scripts $specs; \
87
101
  fi
88
102
 
89
103
  # Copy the compiled application code from the build stage
@@ -128,7 +142,6 @@ ENV MCP_TRANSPORT_TYPE="http"
128
142
  ENV MCP_SESSION_MODE="stateless"
129
143
  ENV MCP_LOG_LEVEL="info"
130
144
  ENV LOGS_DIR="/var/log/congressgov-mcp-server"
131
- ENV MCP_FORCE_CONSOLE_LOGGING="true"
132
145
 
133
146
  # Expose the port the server listens on
134
147
  EXPOSE ${MCP_HTTP_PORT}
package/README.md CHANGED
@@ -7,13 +7,13 @@
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-0.7.2-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.0.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.0-blueviolet.svg?style=flat-square)](https://bun.sh/)
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/)
11
11
 
12
12
  </div>
13
13
 
14
14
  <div align="center">
15
15
 
16
- [![Install in Claude Desktop](https://img.shields.io/badge/Install_in-Claude_Desktop-D97757?style=for-the-badge&logo=anthropic&logoColor=white)](https://github.com/cyanheads/congressgov-mcp-server/releases/latest/download/congressgov-mcp-server.mcpb) [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=congressgov-mcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjeWFuaGVhZHMvY29uZ3Jlc3Nnb3YtbWNwLXNlcnZlciJdLCJlbnYiOnsiQ09OR1JFU1NfQVBJX0tFWSI6InlvdXItYXBpLWtleSJ9fQ==) [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode:mcp/install?%7B%22name%22%3A%22congressgov-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cyanheads/congressgov-mcp-server%22%5D%2C%22env%22%3A%7B%22CONGRESS_API_KEY%22%3A%22your-api-key%22%7D%7D)
16
+ [![Install in Claude Desktop](https://img.shields.io/badge/Install_in-Claude_Desktop-D97757?style=for-the-badge&logo=anthropic&logoColor=white)](https://github.com/cyanheads/congressgov-mcp-server/releases/latest/download/congressgov-mcp-server.mcpb) [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=congressgov-mcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjeWFuaGVhZHMvY29uZ3Jlc3Nnb3YtbWNwLXNlcnZlciJdLCJlbnYiOnsiQ09OR1JFU1NfQVBJX0tFWSI6InlvdXItYXBpLWtleSJ9fQ==) [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode:mcp/install?%7B%22name%22%3A%22congressgov-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cyanheads%2Fcongressgov-mcp-server%22%5D%2C%22env%22%3A%7B%22CONGRESS_API_KEY%22%3A%22your-api-key%22%7D%7D)
17
17
 
18
18
  [![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-67E8F9?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
19
19
 
@@ -29,23 +29,23 @@
29
29
 
30
30
  ## Overview
31
31
 
32
- U.S. congressional data from the Congress.gov API v3 and the Senate's official vote feed — bills, enacted laws, members, committees, roll call votes, and presidential nominations. Browse legislative activity, read bill and report text, and track the Senate confirmation pipeline from any MCP client. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.
32
+ U.S. congressional data from the Congress.gov API v3 and the Senate's official vote feed: bills, enacted laws, members, committees, roll call votes, nominations, CRS and committee reports, and the Congressional Record. Browse legislative activity, read bill and report text, and follow the Senate confirmation pipeline from any MCP client. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.
33
33
 
34
34
  ### Tools
35
35
 
36
36
  | Tool | Description |
37
37
  |:---|:---|
38
- | `congressgov_bill_lookup` | Browse and retrieve U.S. legislative bill data — actions, sponsors, summaries, text, related bills |
38
+ | `congressgov_bill_lookup` | Browse and retrieve bills: actions, sponsors, summaries, text, related bills |
39
39
  | `congressgov_enacted_laws` | Browse enacted public and private laws by congress |
40
- | `congressgov_member_lookup` | Discover congressional members by state/district/congress, retrieve legislative portfolios |
41
- | `congressgov_committee_lookup` | Browse congressional committees and their legislation, reports, and nominations |
42
- | `congressgov_roll_votes` | Retrieve House and Senate roll call votes and individual member voting positions |
43
- | `congressgov_senate_nominations` | Browse presidential nominations to federal positions and track the Senate confirmation process |
44
- | `congressgov_bill_summaries` | Browse recent CRS bill summaries — the "what's happening" feed |
45
- | `congressgov_crs_reports` | Browse and retrieve nonpartisan CRS policy analysis reports |
46
- | `congressgov_committee_reports` | Browse and retrieve committee reports accompanying legislation |
47
- | `congressgov_daily_record` | Browse the daily Congressional Record — floor speeches, debates, and proceedings |
48
- | `congressgov_search_bills` | Keyword-search bill titles and CRS summaries via a local full-text mirror (opt-in, off by default) |
40
+ | `congressgov_member_lookup` | Find members by state, district, or congress, and retrieve their legislative portfolios |
41
+ | `congressgov_committee_lookup` | Browse committees and their legislation, reports, and nominations |
42
+ | `congressgov_roll_votes` | Retrieve House and Senate roll call votes and each member's position |
43
+ | `congressgov_senate_nominations` | Browse presidential nominations and track Senate confirmation |
44
+ | `congressgov_bill_summaries` | Browse recently updated CRS bill summaries |
45
+ | `congressgov_crs_reports` | Browse and retrieve nonpartisan CRS policy reports |
46
+ | `congressgov_committee_reports` | Browse and read committee reports accompanying legislation |
47
+ | `congressgov_daily_record` | Browse and read the daily Congressional Record |
48
+ | `congressgov_search_bills` | Keyword-search bill titles and CRS summaries via a local full-text mirror (opt-in) |
49
49
 
50
50
  ### Resources
51
51
 
@@ -57,7 +57,7 @@ U.S. congressional data from the Congress.gov API v3 and the Senate's official v
57
57
  | `congress://bill/{congress}/{billType}/{billNumber}` | Bill detail by congress, type, and number |
58
58
  | `congress://committee/{committeeCode}` | Committee detail by committee code |
59
59
 
60
- Bill, member, and committee data is also reachable through `congressgov_bill_lookup`, `congressgov_member_lookup`, and `congressgov_committee_lookup` (operation `get`) — many MCP clients are tool-only and never surface resources.
60
+ Bill, member, and committee data is also reachable through `congressgov_bill_lookup`, `congressgov_member_lookup`, and `congressgov_committee_lookup` (operation `get`), since many MCP clients are tool-only and never surface resources.
61
61
 
62
62
  ### Prompts
63
63
 
@@ -70,150 +70,132 @@ Bill, member, and committee data is also reachable through `congressgov_bill_loo
70
70
 
71
71
  ### `congressgov_bill_lookup` <sub>tool</sub>
72
72
 
73
- - Operations: `list` (browse by congress/billType/date range — no keyword search), `get` (full detail), or drill into `actions`, `amendments`, `cosponsors`, `committees`, `subjects`, `summaries`, `text`, `titles`, `related`
74
- - `list` defaults to `order='recent'` (newest update-date first); `limit` 1–250, `offset` pagination
75
- - `content` reads a text version's actual document text: select the version with `textVersionIndex` (0-based, against `text`'s order), the window with `characterOffset`/`characterLimit` (1–100,000 chars, default 25,000), and follow `nextOffset` to walk a full bill
76
- - `summaries` selects one version with `versionCode` (the code a summary row carries — `00` introduced, `49` public law) and reads each row's text through the same `characterOffset`/`characterLimit` window; a row past the window carries `textTotalCharacters`, `textTruncated`, and `textNextOffset`, and a window end never splits an HTML tag or character reference, so following `textNextOffset` reassembles the upstream text exactly
77
- - Typed failures on `content`: `document_unavailable`, `format_unavailable`, `document_fetch_failed`, `document_too_large`, `offset_past_end`, alongside the shared `not_found` / `rate_limited` / `invalid_request` / `upstream_error` set — `offset_past_end` also covers a `summaries` call whose `characterOffset` is past the end of every returned row
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
+ - `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
+ - `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`
78
76
 
79
77
  ---
80
78
 
81
79
  ### `congressgov_enacted_laws` <sub>tool</sub>
82
80
 
83
- - `list` filters by congress and `lawType` (`pub` public laws, `priv` private) — the enactment-status filter `congressgov_bill_lookup` doesn't offer
84
- - `get` returns the origin bill record; the law citation lives on the bill's `laws[]` array (e.g. `{"number":"118-2","type":"Public Law"}`)
85
- - `lawNumber` accepts either the bare number (`90`) or the full `{congress}-{number}` citation a `list` row carries; a citation naming a different congress than the `congress` param is rejected rather than silently resolved
86
- - `limit` 1–250, `offset` pagination for `list`
81
+ - `list` browses one `congress`, optionally by `lawType` (`pub` or `priv`), the enactment filter `congressgov_bill_lookup` lacks; `get` needs `lawType` + `lawNumber`, taken from a list row's `laws[].number` (`118-90`) or its bare number (`90`)
82
+ - `get` returns the origin bill record, with the law citation on its `laws[]` array
87
83
 
88
84
  ---
89
85
 
90
86
  ### `congressgov_member_lookup` <sub>tool</sub>
91
87
 
92
- - No name search — `list` filters by `stateCode` (+ optional `district`, which requires `stateCode`), `congress`, and `currentMember`
93
- - `get` returns the full profile by `bioguideId` (e.g. `P000197`); `sponsored`/`cosponsored` return that member's legislative portfolio
94
- - `limit` 1–250, `offset` pagination
88
+ - No name search: `list` filters by `stateCode` (plus `district`, `0` for at-large, which requires `stateCode`), `congress`, and `currentMember`
89
+ - `get` returns the profile for a `bioguideId` (e.g. `P000197`); `sponsored` and `cosponsored` return that member's legislation
95
90
 
96
91
  ---
97
92
 
98
93
  ### `congressgov_committee_lookup` <sub>tool</sub>
99
94
 
100
- - Committee codes are chamber-prefix (`h`/`s`/`j`) + abbreviation + 2-digit number (e.g. `hsju00`); `get` and sub-resources infer chamber from the prefix, or accept an explicit override
101
- - `committeeCode` also accepts a committee name, resolved automatically (all-token match, then a bigram-similarity fallback labeled `approximate: true`) against the full cross-chamber roster
102
- - `list` with `filter` name-matches the same way, paging past the 250-row upstream cap to search the complete roster before filtering
103
- - `bills` sub-resource defaults to `order='recent'` (newest update-date first, computed client-side since upstream ignores sort); rows carry no titles — chain `congressgov_bill_lookup get` per row
104
- - `nominations` sub-resource is Senate-only
95
+ - `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
+ - 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`
97
+ - `bills` is newest first by default (`order`), and its rows carry no titles, so chain `congressgov_bill_lookup` `get` per row
105
98
 
106
99
  ---
107
100
 
108
101
  ### `congressgov_roll_votes` <sub>tool</sub>
109
102
 
110
- - `chamber` is `house` (default, Congress.gov API) or `senate` (the Senate's official LIS XML feed — the API exposes no Senate votes)
111
- - `list` browses by congress + session (1 or 2), newest-first by default (computed client-side for strict ordering); `get` returns tallies and party breakdown, `members` returns each member's recorded position
112
- - Senate `list` rows carry the feed's year-less `voteDate` ("19-Dec") alongside a derived `voteDateIso` (`2023-12-19`), resolved across the whole session — including the January votes of a session that sat past December 31
113
- - Roll call numbers reset each session and are specific to one chamber
114
- - `limit` 1–250, `offset` pagination for `list` and `members`
103
+ - `chamber` is `house` (default, Congress.gov API) or `senate` (the Senate's LIS feed); every call needs `congress` + `session` (1 or 2), and `get`/`members` add `voteNumber`, which resets each session and is specific to one chamber
104
+ - `list` is newest first unless `order: 'oldest'`; `get` returns the question, result, tallies, and party breakdown, and `members` returns each member's position
105
+ - Senate votes start at the 101st Congress (1989), and Senate rows pair the feed's year-less `voteDate` with a derived `voteDateIso`
115
106
 
116
107
  ---
117
108
 
118
109
  ### `congressgov_senate_nominations` <sub>tool</sub>
119
110
 
120
- - Nominations use `PN` numbering; `list` browses by congress, `get` returns detail, `actions`/`committees`/`hearings` cover the confirmation pipeline, `nominees` returns individuals in a batch (requires `ordinal`)
121
- - Multi-part parents (e.g. `PN851`) carry no activity of their own — sub-resources live on partitioned children (`851-1`, `851-2`, …); a bare-parent sub-resource call on such a nomination returns an enrichment notice pointing at the partitioned form
122
- - `ordinal` is discovered from the nomination's `nominees` array via `get` first
111
+ - `list` browses one `congress`; `get`, `actions`, `committees`, `hearings`, and `nominees` need a `nominationNumber` (`1000` for PN1000), and `nominees` also needs an `ordinal` from the `nominees` array `get` returns
112
+ - Multi-part nominations (e.g. PN851) keep their activity on partitioned children (`851-1`, `851-2`, …); an empty sub-resource call on the bare number returns a notice pointing there
123
113
 
124
114
  ---
125
115
 
126
116
  ### `congressgov_bill_summaries` <sub>tool</sub>
127
117
 
128
- - Filters by `congress` and `billType` (requires `congress`); date filters apply to the CRS summary's update time, not the bill's action date
129
- - Defaults to summaries updated in the last 7 days when neither date bound is supplied
130
- - A page stops adding rows once they reach a fixed response-character budget: at least one row always returns, `pagination.nextOffset` resumes at the first row not returned, and a notice discloses the stop
131
- - A summary past the per-row window arrives as an exact character window carrying `textTotalCharacters`, `textTruncated`, and `textNextOffset`; the notice names the `congressgov_bill_lookup` call that reads on from there
132
- - For summaries of one specific bill — and to read a windowed summary to the end — use `congressgov_bill_lookup` with `operation='summaries'` instead
118
+ - Optional `congress` and `billType` (which requires `congress`); `fromDateTime`/`toDateTime` filter on the summary's update time, not the bill's action date, and cover the last 7 days when both are omitted
119
+ - A page stops adding rows at 50,000 serialized characters (at least one row always returns, and `pagination.nextOffset` resumes); a summary over 25,000 characters arrives windowed with `textTotalCharacters`, `textTruncated`, and `textNextOffset`
120
+ - For one bill's summaries, or to read a windowed summary to the end, use `congressgov_bill_lookup` `summaries`
133
121
 
134
122
  ---
135
123
 
136
124
  ### `congressgov_crs_reports` <sub>tool</sub>
137
125
 
138
- - Report IDs use letter-number codes (e.g. `R40097`, `RL33612`, `IF12345`)
139
- - `list` browses the catalog; `get` returns full detail (authors, topics, summary, download formats) by `reportNumber`
140
- - `limit` 1–250, `offset` pagination for `list`
126
+ - `list` browses the catalog; `get` takes a `reportNumber` such as `R40097`, `RL33612`, or `IF12345`
127
+ - `get` returns authors, topics, summary, and download formats
141
128
 
142
129
  ---
143
130
 
144
131
  ### `congressgov_committee_reports` <sub>tool</sub>
145
132
 
146
- - Report types: `hrpt` (House), `srpt` (Senate), `erpt` (Executive); `list` browses by congress + optional `reportType`, `get` returns citation/title/committees/associated bill
147
- - `text` lists each format's `{type, url}` link (report formats arrive one per entry, unlike bill text versions); `content` then reads the actual text, a bounded character window at a time via `characterOffset`/`characterLimit` (1–100,000 chars, default 25,000)
148
- - Typed failures on `content`: `document_unavailable`, `format_unavailable`, `document_fetch_failed`, `document_too_large`, `offset_past_end`
133
+ - `list` browses one `congress`, optionally by `reportType` (`hrpt` House, `srpt` Senate, `erpt` Executive); `get`, `text`, and `content` need `reportType` + `reportNumber`
134
+ - `get` returns the citation, title, committees, and associated bill; `text` lists `{type, url}` format links, and `content` reads the report as one character window
149
135
 
150
136
  ---
151
137
 
152
138
  ### `congressgov_daily_record` <sub>tool</sub>
153
139
 
154
- - Hierarchical navigation: `list` (volumes) → `issues` (within a volume) → `articles` (within an issue)
155
- - `content` reads one article's text, selected by `articleIndex` (0-based) and bounded by `characterOffset`/`characterLimit`; the Congressional Record publishes Formatted Text and PDF only (no XML)
156
- - Typed failures on `content`: `document_unavailable`, `format_unavailable`, `document_fetch_failed`, `document_too_large`, `offset_past_end`
140
+ - Navigation runs `list` (volumes) → `issues` (by `volumeNumber`) → `articles` (by `volumeNumber` + `issueNumber`)
141
+ - `content` reads the article at `articleIndex` (0-based across the issue) as one character window; Record articles publish Formatted Text and PDF only, so `format: 'xml'` fails as `format_unavailable`
157
142
 
158
143
  ---
159
144
 
160
145
  ### `congressgov_search_bills` <sub>tool</sub>
161
146
 
162
- - **Opt-in:** off by default and absent from `tools/list` entirely until `CONGRESS_MIRROR_ENABLED=true`
163
- - Keyword-searches a local SQLite FTS5 mirror of bill titles + CRS summaries — the discovery path the Congress.gov API itself lacks; policy area and full bill text are not indexed
164
- - Narrows with `congress`, `billType`, and `originChamber`; returns BM25-ranked matches with each bill's derived id, ready for a follow-up `congressgov_bill_lookup` call
165
- - With the flag set but the index not yet built (`bun run mirror:init`), the tool answers with an empty result and a build-the-index notice instead of an error
166
- - `limit` 1–100 (a narrower cap than the other tools' 1–250), `offset` pagination
147
+ - `query` keywords (AND-combined) over bill titles and CRS summaries, narrowed by `congress`, `billType`, and `originChamber`; `limit` 1–100, `offset` pagination
148
+ - BM25-ranked rows carry `billId` plus `congress`/`billType`/`billNumber` for `congressgov_bill_lookup`, and a `summaryPreview`; policy area and full bill text are not indexed
149
+ - Listed only when `CONGRESS_MIRROR_ENABLED=true`; until `bun run mirror:init` builds the index, it returns an empty result with a notice
167
150
 
168
151
  ---
169
152
 
170
153
  ### `congress://current` <sub>resource</sub>
171
154
 
172
- - Current congress number, session dates, and chamber info — baseline context for other queries
155
+ - Current congress number, session dates, and chamber info, the baseline for other queries
173
156
  - Cached publicly for 1 hour
174
157
 
175
158
  ---
176
159
 
177
160
  ### `congress://bill-types` <sub>resource</sub>
178
161
 
179
- - Static reference table of the 8 valid bill type codes (`hr`, `s`, `hjres`, `sjres`, `hconres`, `sconres`, `hres`, `sres`) with chamber and an example citation
180
- - Cached publicly for 24 hours — fixed by chamber rules, not fetched upstream
162
+ - The 8 bill type codes (`hr`, `s`, `hjres`, `sjres`, `hconres`, `sconres`, `hres`, `sres`) with description, chamber, and an example citation
163
+ - Static, with no upstream call; cached publicly for 24 hours
181
164
 
182
165
  ---
183
166
 
184
167
  ### `congress://member/{bioguideId}` <sub>resource</sub>
185
168
 
186
- - `bioguideId` must match one uppercase letter followed by 6 digits (e.g. `P000197`)
187
- - Returns the member profile — name, state, party, terms, leadership, office, legislation counts
169
+ - `bioguideId` is one uppercase letter and 6 digits (e.g. `P000197`)
170
+ - Returns the member profile: name, state, party, terms, leadership, office, legislation counts
188
171
 
189
172
  ---
190
173
 
191
174
  ### `congress://bill/{congress}/{billType}/{billNumber}` <sub>resource</sub>
192
175
 
193
- - `congress` and `billNumber` must be positive integers; `billType` must be a valid bill type code
194
- - Returns bill detail — sponsor, status, policy area, committees, latest action
176
+ - `congress` and `billNumber` are positive integers; `billType` is one of the 8 bill type codes
177
+ - Returns bill detail: sponsor, status, policy area, committees, latest action
195
178
 
196
179
  ---
197
180
 
198
181
  ### `congress://committee/{committeeCode}` <sub>resource</sub>
199
182
 
200
- - `committeeCode` must match `h`/`s`/`j` followed by 3–8 lowercase alphanumeric characters (e.g. `hsju00`); chamber is inferred from the first letter
201
- - Returns committee detail — name, chamber, subcommittees, history, legislation counts
183
+ - `committeeCode` is `h`/`s`/`j` followed by 3–8 lowercase alphanumeric characters (e.g. `hsju00`); chamber comes from the first letter
184
+ - Returns committee detail: name, chamber, subcommittees, history, legislation counts
202
185
 
203
186
  ---
204
187
 
205
188
  ### `congressgov_bill_analysis` <sub>prompt</sub>
206
189
 
207
- - Arguments: `congress`, `billType`, `billNumber` — all required strings
208
- - Returns one user message framing a structured analysis (summary, sponsors, committee referrals, action timeline, related legislation, policy implications, outlook) and naming which tools to call for each section
190
+ - Arguments: `congress`, `billType`, and `billNumber`, all required
191
+ - Returns one user message framing a seven-part analysis, from summary to outlook, with the tools to call for each part
209
192
 
210
193
  ---
211
194
 
212
195
  ### `congressgov_legislative_research` <sub>prompt</sub>
213
196
 
214
- - Arguments: `topic` required; `congress` optional (defaults to the current congress)
215
- - The discovery plan is configuration-aware: with `CONGRESS_MIRROR_ENABLED` it opens with `congressgov_search_bills`; without it, it asks for a seed (a bill, member, committee, or CRS report id) since no registered tool accepts a topic string
216
- - Synthesizes findings into landscape, key players, substance, recent activity, and outlook
197
+ - Arguments: `topic` required; `congress` optional, defaulting to the current congress
198
+ - With `CONGRESS_MIRROR_ENABLED`, the plan opens with `congressgov_search_bills`; without it, the prompt asks for a seed bill, member, committee, or CRS report ID, since no other tool takes a topic
217
199
 
218
200
  ## Features
219
201
 
@@ -221,17 +203,17 @@ Built on [`@cyanheads/mcp-ts-core`](https://github.com/cyanheads/mcp-ts-core): s
221
203
 
222
204
  Congress.gov-specific:
223
205
 
224
- - Type-safe client for the Congress.gov REST API v3, plus a second client for the Senate's official LIS XML feed (`fast-xml-parser`) backing Senate roll votes
225
- - Optional API key from [api.data.gov](https://api.data.gov/signup/) — defaults to `DEMO_KEY` (30 req/hr); own key gets 5,000 req/hr
226
- - Bounded document-text retrieval for bill text, committee reports, and Congressional Record articles — a 25 MB fetch ceiling, 30s deadline, and a `www.congress.gov` host allowlist
227
- - Opt-in local SQLite FTS5 mirror (`CONGRESS_MIRROR_ENABLED`) adds keyword search over bill titles and CRS summaries, the one discovery path the API itself lacks
228
- - All tools are read-only and idempotent
206
+ - 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
+ - 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
+ - `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
210
+ - Opt-in local SQLite FTS5 mirror (`CONGRESS_MIRROR_ENABLED`) adds keyword search over bill titles and CRS summaries
229
211
 
230
212
  Agent-friendly output:
231
213
 
232
- - Effective-query echo and total-count enrichment on every browse/list operation, plus a notice when a query resolves to zero matches or an offset runs past the end
233
- - Character-exact document windows — `content` operations return `offset`/`nextOffset` so walking a multi-megabyte bill or report never skips or repeats a character
234
- - Typed failure reasons on document reads (`document_unavailable`, `format_unavailable`, `document_too_large`, `offset_past_end`, …) alongside the shared upstream-error set, each resolved to a recovery hint
214
+ - 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
215
+ - 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
235
217
 
236
218
  ## Getting started
237
219
 
@@ -309,8 +291,6 @@ Or with Docker:
309
291
  }
310
292
  ```
311
293
 
312
- Get a free API key at [api.data.gov/signup](https://api.data.gov/signup/) for 5,000 req/hr. Without a key the server falls back to `DEMO_KEY` (30 req/hr).
313
-
314
294
  For Streamable HTTP, set the transport and start the server:
315
295
 
316
296
  ```sh
@@ -321,6 +301,7 @@ MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 CONGRESS_API_KEY=your-api-key bun run
321
301
  ### Prerequisites
322
302
 
323
303
  - [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.
324
305
 
325
306
  ### Installation
326
307
 
@@ -346,27 +327,30 @@ bun install
346
327
 
347
328
  ```sh
348
329
  cp .env.example .env
349
- # edit .env and set required vars
330
+ # edit .env and set CONGRESS_API_KEY (and the mirror vars, if you want keyword search)
350
331
  ```
351
332
 
352
333
  ## Configuration
353
334
 
354
335
  | Variable | Description | Default |
355
336
  |:---|:---|:---|
356
- | `CONGRESS_API_KEY` | API key from [api.data.gov](https://api.data.gov/signup/). Omit to use `DEMO_KEY` (30 req/hr); own key: 5,000 req/hr. | `DEMO_KEY` |
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` |
357
338
  | `CONGRESS_API_BASE_URL` | Congress.gov API base URL. | `https://api.congress.gov/v3` |
358
339
  | `CONGRESS_MIRROR_ENABLED` | Enable the local bill search mirror and the `congressgov_search_bills` tool. | `false` |
359
340
  | `CONGRESS_MIRROR_PATH` | Filesystem path to the SQLite mirror index. | `.mirror/bills.sqlite3` |
360
- | `CONGRESS_MIRROR_REFRESH_CRON` | Cron schedule for the in-process mirror refresh (HTTP transport only). Unset runs `mirror:refresh` manually. | — |
341
+ | `CONGRESS_MIRROR_REFRESH_CRON` | Cron schedule for the in-process mirror refresh (HTTP transport only). Unset means running `mirror:refresh` yourself. | — |
361
342
  | `CONGRESS_MIRROR_CONGRESSES` | Comma-separated congress numbers to mirror (e.g. `118,119`). | current congress + 1 prior |
362
343
  | `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http`. | `stdio` |
363
344
  | `MCP_HTTP_PORT` | HTTP server port. | `3010` |
345
+ | `MCP_SESSION_MODE` | HTTP session mode: `stateless`, `stateful`, or `auto`; `auto` resolves to `stateful`. | `stateless` |
364
346
  | `MCP_AUTH_MODE` | Authentication: `none`, `jwt`, or `oauth`. | `none` |
365
- | `MCP_SESSION_MODE` | HTTP session mode: `auto`, `stateful`, or `stateless`; `auto` resolves to `stateful`. | `stateless` |
366
347
  | `MCP_LOG_LEVEL` | Log level (`debug`, `info`, `notice`, `warning`, `error`, etc.). | `info` |
367
348
  | `LOGS_DIR` | Directory for log files (Node.js only). | `<project-root>/logs` |
368
- | `STORAGE_PROVIDER_TYPE` | Storage backend. | `in-memory` |
369
- | `OTEL_ENABLED` | Enable [OpenTelemetry instrumentation](https://github.com/cyanheads/mcp-ts-core/tree/main/docs/telemetry) (spans, metrics, completion logs). | `false` |
349
+ | `OTEL_ENABLED` | Enable [OpenTelemetry](https://github.com/cyanheads/mcp-ts-core/tree/main/docs/telemetry). | `false` |
350
+ | `OTEL_EXPORTER_OTLP_ENDPOINT` | Base OTLP endpoint for traces and metrics. | — |
351
+ | `OTEL_EXPORTER_OTLP_LOGS_ENDPOINT` | Explicit OTLP logs endpoint; the base endpoint does not enable log export. | — |
352
+ | `LOG_TOOL_FAILURE_PAYLOADS` | Log failed-call input and output with key-based redaction; secrets inside free-form values are not redacted. | `false` |
353
+ | `LOG_TOOL_FAILURE_PAYLOAD_MAX_BYTES` | Maximum bytes per failed-call input or output record. | `16384` |
370
354
 
371
355
  See [`.env.example`](./.env.example) for the full list of optional overrides.
372
356
 
@@ -381,6 +365,14 @@ See [`.env.example`](./.env.example) for the full list of optional overrides.
381
365
  bun run start:http # or start:stdio
382
366
  ```
383
367
 
368
+ - **Build the bill search mirror** (with `CONGRESS_MIRROR_ENABLED=true`):
369
+
370
+ ```sh
371
+ bun run mirror:init # full build
372
+ bun run mirror:refresh # incremental refresh
373
+ bun run mirror:verify # readiness and integrity check
374
+ ```
375
+
384
376
  - **Run checks and tests:**
385
377
 
386
378
  ```sh
@@ -396,23 +388,23 @@ docker build -t congressgov-mcp-server .
396
388
  docker run --rm -e CONGRESS_API_KEY=your-api-key -p 3010:3010 congressgov-mcp-server
397
389
  ```
398
390
 
399
- The Dockerfile defaults to HTTP transport, stateless session mode, and logs to `/var/log/congressgov-mcp-server`. OpenTelemetry peer dependencies are installed by default — build with `--build-arg OTEL_ENABLED=false` to omit them.
391
+ The Dockerfile defaults to HTTP transport, stateless session mode, and logs to `/var/log/congressgov-mcp-server`. OpenTelemetry peer dependencies are installed by default; build with `--build-arg OTEL_ENABLED=false` to omit them. The image carries the mirror scripts, so `docker exec <container> bun run mirror:init` builds the index in place.
400
392
 
401
393
  ## Project structure
402
394
 
403
395
  | Directory | Purpose |
404
396
  |:---|:---|
405
- | `src/index.ts` | `createApp()` entry point — registers tools/resources/prompts and inits services. |
397
+ | `src/index.ts` | `createApp()` entry point: registers tools, resources, and prompts, inits services, and schedules the mirror refresh. |
406
398
  | `src/config/` | Server-specific environment variable parsing and validation with Zod. |
407
- | `src/mcp-server/tools/definitions/` | Tool definitions (`*.tool.ts`) — eleven Congress.gov tools. |
408
- | `src/mcp-server/resources/definitions/` | Resource definitions (`*.resource.ts`) — congress, bill, member, and committee resources. |
409
- | `src/mcp-server/prompts/definitions/` | Prompt definitions (`*.prompt.ts`) — bill analysis and legislative research. |
410
- | `src/services/congress-api/` | Congress.gov API client — auth, pagination, rate limiting. |
411
- | `src/services/congress-documents/` | Bounded document-text fetch — host allowlist, byte ceiling, character window. |
412
- | `src/services/congress-mirror/` | Local SQLite FTS5 bill-search mirror — ingest, normalize, schema. |
399
+ | `src/mcp-server/tools/` | Tool definitions (`definitions/*.tool.ts`) plus shared input, formatting, and summary-window helpers. |
400
+ | `src/mcp-server/resources/definitions/` | Resource definitions (`*.resource.ts`). |
401
+ | `src/mcp-server/prompts/definitions/` | Prompt definitions (`*.prompt.ts`). |
402
+ | `src/services/congress-api/` | Congress.gov API client: auth, pagination, rate limiting. |
403
+ | `src/services/congress-documents/` | Bounded document-text fetch: host allowlist, byte ceiling, character window. |
404
+ | `src/services/congress-mirror/` | Local SQLite FTS5 bill-search mirror: ingest, normalize, schema. |
413
405
  | `src/services/senate-lis/` | Senate LIS XML client for Senate roll call votes. |
414
- | `src/utils/` | Shared pure helpers — single-pass HTML/XML character-reference decoding. |
415
- | `scripts/` | Mirror lifecycle CLI scripts (`mirror:init` / `mirror:refresh` / `mirror:verify`). |
406
+ | `src/utils/` | HTML/XML character-reference decoding. |
407
+ | `scripts/` | Build, devcheck, and release tooling, plus the `mirror:init` / `mirror:refresh` / `mirror:verify` CLIs. |
416
408
  | `tests/` | Unit and integration tests, mirroring the `src/` structure. |
417
409
 
418
410
  ## Development guide
@@ -0,0 +1,36 @@
1
+ ---
2
+ summary: "Framework upkeep brings stricter HTTP validation, integer-to-string input repair, and optional telemetry logging."
3
+ breaking: true
4
+ security: false
5
+ ---
6
+
7
+ # 0.7.3 — 2026-09-26
8
+
9
+ ## Changed
10
+
11
+ - **HTTP clients** inherit MCP SDK 2.1.0 through framework 0.13.9: 2026-07-28 POSTs require `MCP-Protocol-Version` (otherwise `400` / `-32020`), and batches over 100 messages receive `400` / `-32600`. Clients relying on either previously accepted form must adapt.
12
+ - **Cancellation** inherits SDK 2.1.0 handling for `requestId: 0`; stdin EOF aborts in-flight stdio requests without answering them.
13
+ - **Error envelopes** inherit framework 0.13.7 stack removal and 0.13.8 request-context removal; output-contract violations now return `InternalError` (`-32603`) instead of `ValidationError` (`-32007`).
14
+ - **Telemetry** inherits framework 0.13.7 base OTLP endpoint resolution and 0.13.8 opt-in log export (`OTEL_EXPORTER_OTLP_LOGS_ENDPOINT`) and failed-call payload logging (`LOG_TOOL_FAILURE_PAYLOADS`, capped by `LOG_TOOL_FAILURE_PAYLOAD_MAX_BYTES`). Payload redaction matches keys, not secrets embedded in free-form values.
15
+ - **Docker** preserves the release-age gate and Socket scanner during production installs, resolves optional telemetry packages within framework peer ranges, includes OTLP log peers, and removes the unused `MCP_FORCE_CONSOLE_LOGGING` setting.
16
+ - **Packaging** excludes built `.mcpb` bundles from npm and excludes `docs/idea.md` and `logs/` from MCPB bundles.
17
+ - **Development checks** reject unloadable definitions and malformed `server.json`, enforce manifest version and Docker build-platform parity, and validate release annotations before GitHub publication.
18
+ - **Documentation** clarifies existing tool inputs, summary windows, pagination, and mirror commands; updates the VS Code install link, framework guidance, and synchronized development skills.
19
+
20
+ ## Fixed
21
+
22
+ - **String identifiers** inherit framework 0.13.9 safe-integer repair: an integer `nominationNumber`, for example `677`, reaches the handler as `"677"` when that string passes the schema. Argument rejection hints retain field paths and identify key rewrites.
23
+
24
+ ## Dependencies
25
+
26
+ - `@cyanheads/mcp-ts-core` ^0.13.6 → ^0.13.9 (locked to 0.13.9).
27
+ - `@socketsecurity/bun-security-scanner` ^1.1.2 → ^1.1.3 (development).
28
+ - `ignore` ^7.0.9 → ^7.0.10 (development).
29
+ - Bun 1.4.0 → 1.4.2 (`packageManager` and Docker base images).
30
+ - Transitive `@modelcontextprotocol/server` and `@modelcontextprotocol/core` 2.0.0 → 2.1.0; unused framework client, ext-apps, and dotenv dependencies leave the lockfile.
31
+ - Transitive `@babel/parser` 7.29.8 → 7.29.9.
32
+ - Transitive `@oxc-project/types` 0.150.0 → 0.151.0.
33
+ - Transitive `rolldown` and its platform bindings 1.2.9 → 1.2.10.
34
+ - Transitive `@vue/compiler-core`, `@vue/compiler-dom`, `@vue/compiler-sfc`, `@vue/compiler-ssr`, and `@vue/shared` 3.5.42 → 3.5.43.
35
+ - Transitive `is-core-module` 2.16.2 → 2.17.0.
36
+ - Transitive `magic-string` 1.4.1 → 1.4.2.
@@ -226,8 +226,8 @@ export declare const documentErrorContracts: readonly [{
226
226
  readonly recovery: "Restart the walk at characterOffset 0 and follow the response's nextOffset (or a summary row's textNextOffset), which goes null once the text has been read to the end.";
227
227
  }];
228
228
  /**
229
- * Shared `errors[]` contract for every Congress.gov tool. All ten tools reach
230
- * the same `CongressApiService` fetch path, so they surface the same four
229
+ * Shared `errors[]` contract for every Congress.gov API tool. Every tool except
230
+ * the mirror-backed `congressgov_search_bills` reaches the same `CongressApiService` fetch path, so they surface the same four
231
231
  * upstream failure modes. The service raises each with a matching `data.reason`
232
232
  * and `data.recovery.hint` (see `classifyUpstreamError`), making the failures
233
233
  * machine-readable; declaring them here advertises the contract in `tools/list`.
@@ -374,8 +374,8 @@ export const documentErrorContracts = [
374
374
  },
375
375
  ];
376
376
  /**
377
- * Shared `errors[]` contract for every Congress.gov tool. All ten tools reach
378
- * the same `CongressApiService` fetch path, so they surface the same four
377
+ * Shared `errors[]` contract for every Congress.gov API tool. Every tool except
378
+ * the mirror-backed `congressgov_search_bills` reaches the same `CongressApiService` fetch path, so they surface the same four
379
379
  * upstream failure modes. The service raises each with a matching `data.reason`
380
380
  * and `data.recovery.hint` (see `classifyUpstreamError`), making the failures
381
381
  * machine-readable; declaring them here advertises the contract in `tools/list`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyanheads/congressgov-mcp-server",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "Access U.S. congressional data - bills, votes, members, committees - through MCP. STDIO & Streamable HTTP.",
5
5
  "mcpName": "io.github.cyanheads/congressgov-mcp-server",
6
6
  "type": "module",
@@ -12,6 +12,7 @@
12
12
  "files": [
13
13
  "changelog/",
14
14
  "dist/",
15
+ "!dist/*.mcpb",
15
16
  "scripts/_mirror-context.ts",
16
17
  "scripts/congress-mirror-init.ts",
17
18
  "scripts/congress-mirror-refresh.ts",
@@ -85,7 +86,7 @@
85
86
  "url": "git+https://github.com/cyanheads/congressgov-mcp-server.git"
86
87
  },
87
88
  "license": "Apache-2.0",
88
- "packageManager": "bun@1.4.0",
89
+ "packageManager": "bun@1.4.2",
89
90
  "engines": {
90
91
  "node": ">=24.0.0",
91
92
  "bun": ">=1.4.0"
@@ -94,7 +95,7 @@
94
95
  "access": "public"
95
96
  },
96
97
  "dependencies": {
97
- "@cyanheads/mcp-ts-core": "^0.13.6",
98
+ "@cyanheads/mcp-ts-core": "^0.13.9",
98
99
  "better-sqlite3": "^13.0.3",
99
100
  "fast-xml-parser": "^5.11.1",
100
101
  "node-cron": "^4.6.0",
@@ -103,10 +104,10 @@
103
104
  },
104
105
  "devDependencies": {
105
106
  "@biomejs/biome": "^2.5.14",
106
- "@socketsecurity/bun-security-scanner": "^1.1.2",
107
+ "@socketsecurity/bun-security-scanner": "^1.1.3",
107
108
  "@types/node": "^26.6.2",
108
109
  "depcheck": "^1.4.7",
109
- "ignore": "^7.0.9",
110
+ "ignore": "^7.0.10",
110
111
  "tsc-alias": "^1.9.5",
111
112
  "typescript": "^7.0.2",
112
113
  "vitest": "^5.0.1"
package/server.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/cyanheads/congressgov-mcp-server",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.7.2",
9
+ "version": "0.7.3",
10
10
  "remotes": [
11
11
  {
12
12
  "type": "streamable-http",
@@ -19,7 +19,7 @@
19
19
  "registryBaseUrl": "https://registry.npmjs.org",
20
20
  "identifier": "@cyanheads/congressgov-mcp-server",
21
21
  "runtimeHint": "bun",
22
- "version": "0.7.2",
22
+ "version": "0.7.3",
23
23
  "packageArguments": [
24
24
  {
25
25
  "type": "positional",
@@ -54,7 +54,7 @@
54
54
  "registryBaseUrl": "https://registry.npmjs.org",
55
55
  "identifier": "@cyanheads/congressgov-mcp-server",
56
56
  "runtimeHint": "bun",
57
- "version": "0.7.2",
57
+ "version": "0.7.3",
58
58
  "packageArguments": [
59
59
  {
60
60
  "type": "positional",