@cyanheads/congressgov-mcp-server 0.7.3 → 0.7.4
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 +13 -10
- package/CLAUDE.md +13 -10
- package/Dockerfile +79 -47
- package/README.md +5 -3
- package/changelog/0.7.x/0.7.4.md +31 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/tools/definitions/committee-reports.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/committee-reports.tool.js +0 -1
- package/dist/mcp-server/tools/definitions/committee-reports.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/daily-record.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/daily-record.tool.js +0 -1
- package/dist/mcp-server/tools/definitions/daily-record.tool.js.map +1 -1
- package/dist/mcp-server/tools/tool-helpers.d.ts +2 -2
- package/dist/mcp-server/tools/tool-helpers.js +2 -2
- package/dist/services/congress-documents/congress-documents-service.d.ts.map +1 -1
- package/dist/services/congress-documents/congress-documents-service.js +23 -31
- package/dist/services/congress-documents/congress-documents-service.js.map +1 -1
- package/package.json +10 -10
- package/server.json +11 -25
package/AGENTS.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Agent Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** congressgov-mcp-server
|
|
4
|
-
**Version:** 0.7.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.
|
|
4
|
+
**Version:** 0.7.4
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.14`
|
|
6
6
|
**Engines:** Bun ≥1.4.0, Node ≥24.0.0
|
|
7
|
-
**MCP SDK:** `@modelcontextprotocol/server` ^2.
|
|
7
|
+
**MCP SDK:** `@modelcontextprotocol/server` ^2.2.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.
|
|
@@ -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.
|
|
@@ -217,10 +218,12 @@ All tools share these patterns. The service layer handles them uniformly:
|
|
|
217
218
|
| Invalid params | `validationError('...', { field })` |
|
|
218
219
|
| Network error | `serviceUnavailable('Unable to reach the Congress.gov API.')` |
|
|
219
220
|
|
|
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
|
|
221
|
+
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
222
|
|
|
222
223
|
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
224
|
|
|
225
|
+
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.
|
|
226
|
+
|
|
224
227
|
---
|
|
225
228
|
|
|
226
229
|
## Naming
|
|
@@ -250,7 +253,7 @@ import { getServerConfig } from '@/config/server-config.js';
|
|
|
250
253
|
|
|
251
254
|
## Skills
|
|
252
255
|
|
|
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.
|
|
256
|
+
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
257
|
|
|
255
258
|
**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
259
|
|
|
@@ -271,18 +274,18 @@ Available skills:
|
|
|
271
274
|
| `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
|
|
272
275
|
| `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
|
|
273
276
|
| `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
|
|
274
|
-
| `git-wrapup` | Land
|
|
277
|
+
| `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
278
|
| `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
|
|
279
|
+
| `release-and-publish` | Fast-forward merge (release PR mode) + tag + push + npm + MCP Registry + GH Release + Docker. Picks up from `git-wrapup` |
|
|
277
280
|
| `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
|
|
278
|
-
| `report-issue-framework` | File
|
|
279
|
-
| `report-issue-local` | File
|
|
281
|
+
| `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
|
|
282
|
+
| `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
|
|
280
283
|
| `api-auth` | Auth modes, scopes, JWT/OAuth |
|
|
281
284
|
| `api-config` | AppConfig, parseConfig, env vars |
|
|
282
285
|
| `api-context` | Context interface, RequestContext, logger, state, multi-round-trip input |
|
|
283
286
|
| `api-errors` | McpError, JsonRpcErrorCode, error patterns |
|
|
284
287
|
| `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 |
|
|
288
|
+
| `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
|
|
286
289
|
| `api-mirror` | MirrorService: persistent self-refreshing local mirror (embedded SQLite + FTS5) of a bulk upstream dataset — Tier 3 opt-in |
|
|
287
290
|
| `api-services` | LLM, Speech, Graph services |
|
|
288
291
|
| `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
|
package/CLAUDE.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Agent Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** congressgov-mcp-server
|
|
4
|
-
**Version:** 0.7.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.
|
|
4
|
+
**Version:** 0.7.4
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.14`
|
|
6
6
|
**Engines:** Bun ≥1.4.0, Node ≥24.0.0
|
|
7
|
-
**MCP SDK:** `@modelcontextprotocol/server` ^2.
|
|
7
|
+
**MCP SDK:** `@modelcontextprotocol/server` ^2.2.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.
|
|
@@ -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.
|
|
@@ -217,10 +218,12 @@ All tools share these patterns. The service layer handles them uniformly:
|
|
|
217
218
|
| Invalid params | `validationError('...', { field })` |
|
|
218
219
|
| Network error | `serviceUnavailable('Unable to reach the Congress.gov API.')` |
|
|
219
220
|
|
|
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
|
|
221
|
+
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
222
|
|
|
222
223
|
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
224
|
|
|
225
|
+
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.
|
|
226
|
+
|
|
224
227
|
---
|
|
225
228
|
|
|
226
229
|
## Naming
|
|
@@ -250,7 +253,7 @@ import { getServerConfig } from '@/config/server-config.js';
|
|
|
250
253
|
|
|
251
254
|
## Skills
|
|
252
255
|
|
|
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.
|
|
256
|
+
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
257
|
|
|
255
258
|
**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
259
|
|
|
@@ -271,18 +274,18 @@ Available skills:
|
|
|
271
274
|
| `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
|
|
272
275
|
| `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
|
|
273
276
|
| `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
|
|
274
|
-
| `git-wrapup` | Land
|
|
277
|
+
| `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
278
|
| `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
|
|
279
|
+
| `release-and-publish` | Fast-forward merge (release PR mode) + tag + push + npm + MCP Registry + GH Release + Docker. Picks up from `git-wrapup` |
|
|
277
280
|
| `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
|
|
278
|
-
| `report-issue-framework` | File
|
|
279
|
-
| `report-issue-local` | File
|
|
281
|
+
| `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
|
|
282
|
+
| `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
|
|
280
283
|
| `api-auth` | Auth modes, scopes, JWT/OAuth |
|
|
281
284
|
| `api-config` | AppConfig, parseConfig, env vars |
|
|
282
285
|
| `api-context` | Context interface, RequestContext, logger, state, multi-round-trip input |
|
|
283
286
|
| `api-errors` | McpError, JsonRpcErrorCode, error patterns |
|
|
284
287
|
| `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 |
|
|
288
|
+
| `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
|
|
286
289
|
| `api-mirror` | MirrorService: persistent self-refreshing local mirror (embedded SQLite + FTS5) of a bulk upstream dataset — Tier 3 opt-in |
|
|
287
290
|
| `api-services` | LLM, Speech, Graph services |
|
|
288
291
|
| `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
|
package/Dockerfile
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
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
|
|
11
|
-
#
|
|
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
12
|
FROM --platform=$BUILDPLATFORM oven/bun:1.4.2 AS build
|
|
13
13
|
|
|
14
14
|
WORKDIR /usr/src/app
|
|
@@ -33,73 +33,105 @@ RUN bun run build
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
# ==============================================================================
|
|
36
|
-
# Production Stage
|
|
36
|
+
# Production Dependencies Stage
|
|
37
37
|
#
|
|
38
|
-
#
|
|
39
|
-
#
|
|
40
|
-
#
|
|
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
|
|
48
|
+
FROM --platform=$BUILDPLATFORM oven/bun:1.4.2 AS deps
|
|
43
49
|
|
|
44
50
|
WORKDIR /usr/src/app
|
|
45
51
|
|
|
46
|
-
#
|
|
47
|
-
#
|
|
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
|
-
#
|
|
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.
|
|
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
|
|
76
|
-
#
|
|
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
|
-
|
|
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.2-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
|
|
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
|
-
[](./CHANGELOG.md) [](./LICENSE) [](https://github.com/users/cyanheads/packages/container/package/congressgov-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/@cyanheads/congressgov-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -365,7 +365,7 @@ See [`.env.example`](./.env.example) for the full list of optional overrides.
|
|
|
365
365
|
bun run start:http # or start:stdio
|
|
366
366
|
```
|
|
367
367
|
|
|
368
|
-
- **Build the bill search mirror** (with `CONGRESS_MIRROR_ENABLED=true`):
|
|
368
|
+
- **Build the bill search mirror from this checkout** (with `CONGRESS_MIRROR_ENABLED=true`):
|
|
369
369
|
|
|
370
370
|
```sh
|
|
371
371
|
bun run mirror:init # full build
|
|
@@ -373,6 +373,8 @@ See [`.env.example`](./.env.example) for the full list of optional overrides.
|
|
|
373
373
|
bun run mirror:verify # readiness and integrity check
|
|
374
374
|
```
|
|
375
375
|
|
|
376
|
+
The mirror CLI requires this checkout or the Docker image's path mapping; an npm installation cannot run these scripts.
|
|
377
|
+
|
|
376
378
|
- **Run checks and tests:**
|
|
377
379
|
|
|
378
380
|
```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.
|
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
|
|
95
|
+
tagline: 'U.S. legislative data (bills, votes, members, committees) via MCP.',
|
|
96
96
|
requireAuth: false,
|
|
97
97
|
},
|
|
98
98
|
async setup(core) {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;GAGG;AAQH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0DAA0D,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EA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C,cAAc,2BAA2B,MAAM,CAAC,KAAK,GAAG,EACnH,MAAM,CACP,CAAC;IACJ,CAAC,EACD,8EAA8E,CAC/E,CAAC;IACF,gBAAgB,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"committee-reports.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/committee-reports.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAiCjD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"committee-reports.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/committee-reports.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAiCjD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8K/B,CAAC"}
|
|
@@ -85,7 +85,6 @@ export const committeeReportsTool = tool('congressgov_committee_reports', {
|
|
|
85
85
|
const formats = collectReportFormats(result.text);
|
|
86
86
|
if (formats.length === 0) {
|
|
87
87
|
throw ctx.fail('document_unavailable', `Committee report ${citation} publishes no document formats.`, {
|
|
88
|
-
...ctx.recoveryFor('document_unavailable'),
|
|
89
88
|
congress: input.congress,
|
|
90
89
|
reportType: input.reportType,
|
|
91
90
|
reportNumber: input.reportNumber,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"committee-reports.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/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AsB,CAC7C;gBACE,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,UAAU,EAAE,KAAK,CAAC,UAAU;gBAC5B,YAAY,EAAE,KAAK,CAAC,YAAY;aACjC,EACD,GAAG,CACJ,CAAC;YAEF,MAAM,OAAO,GAAG,oBAAoB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAClD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACzB,MAAM,GAAG,CAAC,IAAI,CACZ,sBAAsB,EACtB,oBAAoB,QAAQ,iCAAiC,EAC7D;oBACE,
|
|
1
|
+
{"version":3,"file":"committee-reports.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/committee-reports.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,iBAAiB,GAClB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AACnG,OAAO,EACL,cAAc,EACd,iBAAiB,GAClB,MAAM,mDAAmD,CAAC;AAE3D;;;;GAIG;AACH,SAAS,oBAAoB,CAAC,IAAa;IACzC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IACpC,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,MAAM,OAAO,GAAI,KAAkD,EAAE,OAAO,CAAC;QAC7E,OAAO,KAAK,CAAC,OAAO,CAAC,OA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{"version":3,"file":"daily-record.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/daily-record.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAqBjD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"daily-record.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/daily-record.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAqBjD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiK1B,CAAC"}
|
|
@@ -79,7 +79,6 @@ export const dailyRecordTool = tool('congressgov_daily_record', {
|
|
|
79
79
|
const url = selectDocumentUrl(article.text, input.format);
|
|
80
80
|
if (!url) {
|
|
81
81
|
throw ctx.fail('format_unavailable', `This article publishes no '${input.format}' document (looked for ${describeFormat(input.format)}). The Congressional Record publishes Formatted Text and PDF only.`, {
|
|
82
|
-
...ctx.recoveryFor('format_unavailable'),
|
|
83
82
|
format: input.format,
|
|
84
83
|
articleIndex: input.articleIndex,
|
|
85
84
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daily-record.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/daily-record.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sC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,KAAK,CAAC,YAAY,cAAc,YAAY,WAAW,WAAW,sBAAsB,QAAQ,CAAC,UAAU,CAAC,KAAK,cAAc,EACtJ;oBACE,GAAG,GAAG,CAAC,WAAW,CAAC,sBAAsB,CAAC;oBAC1C,YAAY,EAAE,KAAK,CAAC,YAAY;oBAChC,SAAS,EAAE,QAAQ,CAAC,UAAU,CAAC,KAAK;iBACrC,CACF,CAAC;YACJ,CAAC;YAED,sEAAsE;YACtE,MAAM,GAAG,GAAG,iBAAiB,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YAC1D,IAAI,CAAC,GAAG,EAAE,CAAC;gBACT,MAAM,GAAG,CAAC,IAAI,CACZ,oBAAoB,EACpB,8BAA8B,KAAK,CAAC,MAAM,0BAA0B,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,oEAAoE,EACpK;oBACE,
|
|
1
|
+
{"version":3,"file":"daily-record.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/daily-record.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AACnG,OAAO,EACL,cAAc,EACd,iBAAiB,GAClB,MAAM,mDAAmD,CAAC;AAE3D,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,0BAA0B,EAAE;IAC9D,KAAK,EAAE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,MAAM;oBACpB,SAAS,EAAE,GAAG;oBACd,aAAa,EAAE,YAAY;iBAC5B;aACF,CAAC;QACJ,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,gBAAgB,CACvC;YACE,YAAY;YACZ,WAAW;YACX,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,MAAM,EAAE,KAAK,CAAC,MAAM;SACrB,EACD,GAAG,CACJ,CAAC;QACF,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,iCAAiC,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC,CAAC;QAC/E,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,uBAAuB,YAAY,WAAW,WAAW,EAAE,CAAC,CAAC;QAC7E,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAC1C,iBAAiB,CACf,GAAG,EACH,MAAM,EACN,gCAAgC,YAAY,WAAW,WAAW,GAAG,CACtE,CAAC;QACF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -187,8 +187,8 @@ export declare const documentWindowInput: {
|
|
|
187
187
|
* reach it.
|
|
188
188
|
*
|
|
189
189
|
* `CongressDocumentsService` raises each with a matching `data.reason` and
|
|
190
|
-
*
|
|
191
|
-
*
|
|
190
|
+
* the framework fills the `recovery` hint declared here, so the hint lives in
|
|
191
|
+
* exactly one place. Direct-handler tests retain explicit forwards where needed.
|
|
192
192
|
* Resolves cyanheads/congressgov-mcp-server#53.
|
|
193
193
|
*/
|
|
194
194
|
export declare const documentErrorContracts: readonly [{
|
|
@@ -329,8 +329,8 @@ export const documentWindowInput = {
|
|
|
329
329
|
* reach it.
|
|
330
330
|
*
|
|
331
331
|
* `CongressDocumentsService` raises each with a matching `data.reason` and
|
|
332
|
-
*
|
|
333
|
-
*
|
|
332
|
+
* the framework fills the `recovery` hint declared here, so the hint lives in
|
|
333
|
+
* exactly one place. Direct-handler tests retain explicit forwards where needed.
|
|
334
334
|
* Resolves cyanheads/congressgov-mcp-server#53.
|
|
335
335
|
*/
|
|
336
336
|
export const documentErrorContracts = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"congress-documents-service.d.ts","sourceRoot":"","sources":["../../../src/services/congress-documents/congress-documents-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAgBtD,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEvE;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,WAAa,CAAC;AAE7C,0FAA0F;AAC1F,eAAO,MAAM,kBAAkB,QAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"congress-documents-service.d.ts","sourceRoot":"","sources":["../../../src/services/congress-documents/congress-documents-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAgBtD,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEvE;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,WAAa,CAAC;AAE7C,0FAA0F;AAC1F,eAAO,MAAM,kBAAkB,QAAS,CAAC;AAqCzC,qBAAa,wBAAwB;IACvB,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IAA7C,YAA6B,gBAAgB,GAAE,MAA2B,EAAI;IAE9E;;;;;;;OAOG;IACG,aAAa,CAAC,MAAM,EAAE,mBAAmB,EAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,CAiBvF;IAED,iFAAiF;IACjF,OAAO,CAAC,cAAc;IA4BtB,OAAO,CAAC,iBAAiB;YAmBX,OAAO;IAqBrB;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IAwB1B,OAAO,CAAC,iBAAiB;IAezB,0FAA0F;IAC1F,OAAO,CAAC,oBAAoB;IAQ5B;;;;;;;;;;OAUG;YACW,UAAU;IAqCxB;;;OAGG;YACW,SAAS;IAcvB,OAAO,CAAC,QAAQ;IAYhB,OAAO,CAAC,gBAAgB;IAOxB;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,cAAc;CAIvB;AAID,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C;AAED,wBAAgB,oBAAoB,IAAI,wBAAwB,CAO/D"}
|
|
@@ -42,9 +42,8 @@ const ALLOWED_HOSTS = new Set(['www.congress.gov']);
|
|
|
42
42
|
const ALLOWED_CONTENT_TYPES = new Set(['application/xml', 'text/html', 'text/plain', 'text/xml']);
|
|
43
43
|
/**
|
|
44
44
|
* Contract reasons this service raises. The matching `recovery` hints live once
|
|
45
|
-
* in `documentErrorContracts` (tool-helpers)
|
|
46
|
-
*
|
|
47
|
-
* `data` plus the resolved hint gives clients the same shape.
|
|
45
|
+
* in `documentErrorContracts` (tool-helpers). Carrying `reason` in `data` lets
|
|
46
|
+
* the framework fill that hint on both client surfaces.
|
|
48
47
|
*/
|
|
49
48
|
const DOCUMENT_UNAVAILABLE = 'document_unavailable';
|
|
50
49
|
const DOCUMENT_FETCH_FAILED = 'document_fetch_failed';
|
|
@@ -78,11 +77,11 @@ export class CongressDocumentsService {
|
|
|
78
77
|
* general-purpose fetcher.
|
|
79
78
|
*/
|
|
80
79
|
async fetchDocument(params, ctx) {
|
|
81
|
-
this.assertAllowedHost(params.url
|
|
80
|
+
this.assertAllowedHost(params.url);
|
|
82
81
|
const operation = 'CongressDocumentsService GET document';
|
|
83
82
|
const requestContext = this.getRequestContext(ctx, operation);
|
|
84
83
|
const signal = this.getAbortSignal(ctx);
|
|
85
|
-
const window = await withRetry(() => this.doFetch(params, requestContext,
|
|
84
|
+
const window = await withRetry(() => this.doFetch(params, requestContext, signal), {
|
|
86
85
|
operation,
|
|
87
86
|
context: requestContext,
|
|
88
87
|
baseDelayMs: BASE_BACKOFF_MS,
|
|
@@ -90,17 +89,16 @@ export class CongressDocumentsService {
|
|
|
90
89
|
isTransient: (error) => this.isRetryableError(error),
|
|
91
90
|
...(signal ? { signal } : {}),
|
|
92
91
|
});
|
|
93
|
-
return this.describeWindow(window, params
|
|
92
|
+
return this.describeWindow(window, params);
|
|
94
93
|
}
|
|
95
94
|
/** Describe the extracted `[offset, offset + limit)` window and what remains. */
|
|
96
|
-
describeWindow(window, params
|
|
95
|
+
describeWindow(window, params) {
|
|
97
96
|
const { text, totalCharacters } = window;
|
|
98
97
|
const offset = params.characterOffset;
|
|
99
98
|
/** An empty document is a real (if unusual) answer at offset 0 — not a bad offset. */
|
|
100
99
|
if (totalCharacters > 0 && offset >= totalCharacters) {
|
|
101
100
|
throw invalidParams(`characterOffset ${offset} is past the end of this document, which has ${totalCharacters} characters.`, {
|
|
102
101
|
reason: OFFSET_PAST_END,
|
|
103
|
-
...ctx.recoveryFor(OFFSET_PAST_END),
|
|
104
102
|
totalCharacters,
|
|
105
103
|
offset,
|
|
106
104
|
retryable: false,
|
|
@@ -116,7 +114,7 @@ export class CongressDocumentsService {
|
|
|
116
114
|
nextOffset: truncated ? end : null,
|
|
117
115
|
};
|
|
118
116
|
}
|
|
119
|
-
assertAllowedHost(url
|
|
117
|
+
assertAllowedHost(url) {
|
|
120
118
|
let host;
|
|
121
119
|
try {
|
|
122
120
|
const parsed = new URL(url);
|
|
@@ -129,12 +127,11 @@ export class CongressDocumentsService {
|
|
|
129
127
|
if (host === undefined || !ALLOWED_HOSTS.has(host.toLowerCase())) {
|
|
130
128
|
throw notFound('The upstream metadata points at a document this server does not retrieve — only documents hosted on www.congress.gov are read.', {
|
|
131
129
|
reason: DOCUMENT_UNAVAILABLE,
|
|
132
|
-
...ctx.recoveryFor(DOCUMENT_UNAVAILABLE),
|
|
133
130
|
retryable: false,
|
|
134
131
|
});
|
|
135
132
|
}
|
|
136
133
|
}
|
|
137
|
-
async doFetch(params, requestContext,
|
|
134
|
+
async doFetch(params, requestContext, signal) {
|
|
138
135
|
let response;
|
|
139
136
|
try {
|
|
140
137
|
response = await fetchWithTimeout(params.url, REQUEST_TIMEOUT_MS, requestContext, {
|
|
@@ -144,18 +141,18 @@ export class CongressDocumentsService {
|
|
|
144
141
|
});
|
|
145
142
|
}
|
|
146
143
|
catch (error) {
|
|
147
|
-
throw this.classifyFetchError(error
|
|
144
|
+
throw this.classifyFetchError(error);
|
|
148
145
|
}
|
|
149
|
-
this.assertContentType(response
|
|
150
|
-
this.assertAdvertisedSize(response
|
|
151
|
-
return this.readWindow(response, params
|
|
146
|
+
this.assertContentType(response);
|
|
147
|
+
this.assertAdvertisedSize(response);
|
|
148
|
+
return this.readWindow(response, params);
|
|
152
149
|
}
|
|
153
150
|
/**
|
|
154
151
|
* A 404 means Congress.gov's metadata named a document its own file host does
|
|
155
152
|
* not hold — a missing document, not a transport failure. Everything else
|
|
156
153
|
* (5xx, timeout, socket error) is the transport, and stays retryable.
|
|
157
154
|
*/
|
|
158
|
-
classifyFetchError(error
|
|
155
|
+
classifyFetchError(error) {
|
|
159
156
|
if (!(error instanceof McpError))
|
|
160
157
|
return error;
|
|
161
158
|
if (error.code === JsonRpcErrorCode.RequestCancelled)
|
|
@@ -163,39 +160,36 @@ export class CongressDocumentsService {
|
|
|
163
160
|
if (error.code === JsonRpcErrorCode.NotFound) {
|
|
164
161
|
return notFound('Congress.gov does not hold the document its metadata pointed to.', {
|
|
165
162
|
reason: DOCUMENT_UNAVAILABLE,
|
|
166
|
-
...ctx.recoveryFor(DOCUMENT_UNAVAILABLE),
|
|
167
163
|
retryable: false,
|
|
168
164
|
}, { cause: error });
|
|
169
165
|
}
|
|
170
|
-
/**
|
|
166
|
+
/** Keep the document-specific message; the framework redacts the cause's URL. */
|
|
171
167
|
return serviceUnavailable('Unable to retrieve the document from Congress.gov.', {
|
|
172
168
|
reason: DOCUMENT_FETCH_FAILED,
|
|
173
|
-
...ctx.recoveryFor(DOCUMENT_FETCH_FAILED),
|
|
174
169
|
...(error.data?.retryable === false ? { retryable: false } : {}),
|
|
175
170
|
}, { cause: error });
|
|
176
171
|
}
|
|
177
|
-
assertContentType(response
|
|
172
|
+
assertContentType(response) {
|
|
178
173
|
const raw = response.headers.get('content-type') ?? '';
|
|
179
174
|
const mediaType = raw.split(';')[0]?.trim().toLowerCase() ?? '';
|
|
180
175
|
if (ALLOWED_CONTENT_TYPES.has(mediaType))
|
|
181
176
|
return;
|
|
182
177
|
throw serviceUnavailable(`Congress.gov returned content type '${mediaType || 'unknown'}', which this server cannot read as text.`, {
|
|
183
178
|
reason: DOCUMENT_FETCH_FAILED,
|
|
184
|
-
...ctx.recoveryFor(DOCUMENT_FETCH_FAILED),
|
|
185
179
|
contentType: mediaType,
|
|
186
180
|
/** A wrong media type is deterministic — retrying re-downloads the same bytes. */
|
|
187
181
|
retryable: false,
|
|
188
182
|
});
|
|
189
183
|
}
|
|
190
184
|
/** Refuse an oversized document on its advertised length, before reading a byte of it. */
|
|
191
|
-
assertAdvertisedSize(response
|
|
185
|
+
assertAdvertisedSize(response) {
|
|
192
186
|
const header = response.headers.get('content-length');
|
|
193
187
|
if (header === null)
|
|
194
188
|
return;
|
|
195
189
|
const contentLength = Number(header);
|
|
196
190
|
if (!Number.isFinite(contentLength) || contentLength <= this.maxDocumentBytes)
|
|
197
191
|
return;
|
|
198
|
-
throw this.tooLarge(
|
|
192
|
+
throw this.tooLarge({ contentLength });
|
|
199
193
|
}
|
|
200
194
|
/**
|
|
201
195
|
* Extract the requested character window as the body streams, under a hard
|
|
@@ -208,7 +202,7 @@ export class CongressDocumentsService {
|
|
|
208
202
|
* buffered read of the same document — but it is garbage, not live, so it is
|
|
209
203
|
* concurrent reads rather than one large read that the ceiling has to survive.
|
|
210
204
|
*/
|
|
211
|
-
async readWindow(response, params
|
|
205
|
+
async readWindow(response, params) {
|
|
212
206
|
const reader = response.body?.getReader();
|
|
213
207
|
const decoder = new TextDecoder('utf-8');
|
|
214
208
|
const extractor = createStreamingExtractor({
|
|
@@ -218,7 +212,7 @@ export class CongressDocumentsService {
|
|
|
218
212
|
let bytes = 0;
|
|
219
213
|
if (reader) {
|
|
220
214
|
for (;;) {
|
|
221
|
-
const { done, value } = await this.readChunk(reader
|
|
215
|
+
const { done, value } = await this.readChunk(reader);
|
|
222
216
|
if (done)
|
|
223
217
|
break;
|
|
224
218
|
if (!value)
|
|
@@ -226,7 +220,7 @@ export class CongressDocumentsService {
|
|
|
226
220
|
bytes += value.byteLength;
|
|
227
221
|
if (bytes > this.maxDocumentBytes) {
|
|
228
222
|
await reader.cancel().catch(() => undefined);
|
|
229
|
-
throw this.tooLarge(
|
|
223
|
+
throw this.tooLarge({ bytesRead: bytes });
|
|
230
224
|
}
|
|
231
225
|
extractor.push(decoder.decode(value, { stream: true }));
|
|
232
226
|
}
|
|
@@ -234,7 +228,6 @@ export class CongressDocumentsService {
|
|
|
234
228
|
if (bytes === 0) {
|
|
235
229
|
throw serviceUnavailable('Congress.gov returned an empty document body.', {
|
|
236
230
|
reason: DOCUMENT_FETCH_FAILED,
|
|
237
|
-
...ctx.recoveryFor(DOCUMENT_FETCH_FAILED),
|
|
238
231
|
retryable: false,
|
|
239
232
|
});
|
|
240
233
|
}
|
|
@@ -245,18 +238,17 @@ export class CongressDocumentsService {
|
|
|
245
238
|
* A body that dies partway through is the transport failing, not a malformed
|
|
246
239
|
* document — the same classification a connection that never opened gets.
|
|
247
240
|
*/
|
|
248
|
-
async readChunk(reader
|
|
241
|
+
async readChunk(reader) {
|
|
249
242
|
try {
|
|
250
243
|
return await reader.read();
|
|
251
244
|
}
|
|
252
245
|
catch (error) {
|
|
253
|
-
throw serviceUnavailable('The document body from Congress.gov ended before it was complete.', { reason: DOCUMENT_FETCH_FAILED
|
|
246
|
+
throw serviceUnavailable('The document body from Congress.gov ended before it was complete.', { reason: DOCUMENT_FETCH_FAILED }, { cause: error });
|
|
254
247
|
}
|
|
255
248
|
}
|
|
256
|
-
tooLarge(
|
|
249
|
+
tooLarge(data) {
|
|
257
250
|
return invalidParams(`This document exceeds the ${this.maxDocumentBytes.toLocaleString('en-US')}-byte ceiling this server retrieves.`, {
|
|
258
251
|
reason: DOCUMENT_TOO_LARGE,
|
|
259
|
-
...ctx.recoveryFor(DOCUMENT_TOO_LARGE),
|
|
260
252
|
...data,
|
|
261
253
|
maxBytes: this.maxDocumentBytes,
|
|
262
254
|
retryable: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"congress-documents-service.js","sourceRoot":"","sources":["../../../src/services/congress-documents/congress-documents-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,kBAAkB,GACnB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,EACrB,SAAS,GACV,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,wBAAwB,EAAwB,MAAM,0BAA0B,CAAC;AAG1F;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC;AAE7C,0FAA0F;AAC1F,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAEzC,MAAM,YAAY,GAAG,CAAC,CAAC;AACvB,MAAM,eAAe,GAAG,GAAG,CAAC;AAE5B,iFAAiF;AACjF,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAEpD,sFAAsF;AACtF,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC,CAAC,iBAAiB,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC;AAElG
|
|
1
|
+
{"version":3,"file":"congress-documents-service.js","sourceRoot":"","sources":["../../../src/services/congress-documents/congress-documents-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;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aAAa,CAClB,6BAA6B,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,OAAO,CAAC,sCAAsC,EAChH;YACE,MAAM,EAAE,kBAAkB;YAC1B,GAAG,IAAI;YACP,QAAQ,EAAE,IAAI,CAAC,gBAAgB;YAC/B,SAAS,EAAE,KAAK;SACjB,CACF,CAAC;IACJ,CAAC;IAEO,gBAAgB,CAAC,KAAc;QACrC,OAAO,CACL,CAAC,CAAC,KAAK,YAAY,QAAQ,IAAI,KAAK,CAAC,IAAI,KAAK,gBAAgB,CAAC,WAAW,CAAC;YAC3E,kBAAkB,CAAC,KAAK,CAAC,CAC1B,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACK,iBAAiB,CAAC,GAAY,EAAE,SAAiB;QACvD,OAAO,qBAAqB,CAAC,oBAAoB,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC;IACvF,CAAC;IAEO,cAAc,CAAC,GAAY;QACjC,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;QAC1B,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IAC1D,CAAC;CACF;AAED,IAAI,QAA8C,CAAC;AAEnD,MAAM,UAAU,qBAAqB;IACnC,QAAQ,GAAG,IAAI,wBAAwB,EAAE,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,oBAAoB;IAClC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CACb,oFAAoF,CACrF,CAAC;IACJ,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyanheads/congressgov-mcp-server",
|
|
3
|
-
"version": "0.7.
|
|
4
|
-
"description": "Access U.S. congressional data
|
|
3
|
+
"version": "0.7.4",
|
|
4
|
+
"description": "Access U.S. congressional data (bills, votes, members, committees) via MCP. STDIO or Streamable HTTP.",
|
|
5
5
|
"mcpName": "io.github.cyanheads/congressgov-mcp-server",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -95,21 +95,21 @@
|
|
|
95
95
|
"access": "public"
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
|
-
"@cyanheads/mcp-ts-core": "^0.13.
|
|
98
|
+
"@cyanheads/mcp-ts-core": "^0.13.14",
|
|
99
99
|
"better-sqlite3": "^13.0.3",
|
|
100
|
-
"fast-xml-parser": "^5.11.
|
|
100
|
+
"fast-xml-parser": "^5.11.2",
|
|
101
101
|
"node-cron": "^4.6.0",
|
|
102
|
-
"pino-pretty": "^13.
|
|
102
|
+
"pino-pretty": "^13.2.0",
|
|
103
103
|
"zod": "^4.6.5"
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
|
-
"@biomejs/biome": "^2.5.
|
|
106
|
+
"@biomejs/biome": "^2.5.15",
|
|
107
107
|
"@socketsecurity/bun-security-scanner": "^1.1.3",
|
|
108
|
-
"@types/node": "^26.6.
|
|
108
|
+
"@types/node": "^26.6.4",
|
|
109
109
|
"depcheck": "^1.4.7",
|
|
110
|
-
"ignore": "^7.0.
|
|
111
|
-
"tsc-alias": "^1.9.
|
|
110
|
+
"ignore": "^7.0.12",
|
|
111
|
+
"tsc-alias": "^1.9.7",
|
|
112
112
|
"typescript": "^7.0.2",
|
|
113
|
-
"vitest": "^5.0.
|
|
113
|
+
"vitest": "^5.0.3"
|
|
114
114
|
}
|
|
115
115
|
}
|
package/server.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
3
|
"name": "io.github.cyanheads/congressgov-mcp-server",
|
|
4
|
-
"description": "Access U.S. congressional data
|
|
4
|
+
"description": "Access U.S. congressional data (bills, votes, members, committees) via MCP.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/cyanheads/congressgov-mcp-server",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.7.
|
|
9
|
+
"version": "0.7.4",
|
|
10
10
|
"remotes": [
|
|
11
11
|
{
|
|
12
12
|
"type": "streamable-http",
|
|
@@ -18,18 +18,8 @@
|
|
|
18
18
|
"registryType": "npm",
|
|
19
19
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
20
20
|
"identifier": "@cyanheads/congressgov-mcp-server",
|
|
21
|
-
"runtimeHint": "
|
|
22
|
-
"version": "0.7.
|
|
23
|
-
"packageArguments": [
|
|
24
|
-
{
|
|
25
|
-
"type": "positional",
|
|
26
|
-
"value": "run"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"type": "positional",
|
|
30
|
-
"value": "start:stdio"
|
|
31
|
-
}
|
|
32
|
-
],
|
|
21
|
+
"runtimeHint": "npx",
|
|
22
|
+
"version": "0.7.4",
|
|
33
23
|
"environmentVariables": [
|
|
34
24
|
{
|
|
35
25
|
"name": "CONGRESS_API_KEY",
|
|
@@ -53,19 +43,15 @@
|
|
|
53
43
|
"registryType": "npm",
|
|
54
44
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
55
45
|
"identifier": "@cyanheads/congressgov-mcp-server",
|
|
56
|
-
"runtimeHint": "
|
|
57
|
-
"version": "0.7.
|
|
58
|
-
"
|
|
46
|
+
"runtimeHint": "npx",
|
|
47
|
+
"version": "0.7.4",
|
|
48
|
+
"environmentVariables": [
|
|
59
49
|
{
|
|
60
|
-
"
|
|
61
|
-
"
|
|
50
|
+
"name": "MCP_TRANSPORT_TYPE",
|
|
51
|
+
"description": "Selects the HTTP transport.",
|
|
52
|
+
"format": "string",
|
|
53
|
+
"value": "http"
|
|
62
54
|
},
|
|
63
|
-
{
|
|
64
|
-
"type": "positional",
|
|
65
|
-
"value": "start:http"
|
|
66
|
-
}
|
|
67
|
-
],
|
|
68
|
-
"environmentVariables": [
|
|
69
55
|
{
|
|
70
56
|
"name": "CONGRESS_API_KEY",
|
|
71
57
|
"description": "API key from api.data.gov \u2014 optional (falls back to DEMO_KEY: 30 req/hr). Own key: 5000 req/hr. Free signup at api.data.gov.",
|