@pipeworx/congress

Connect: https://pipeworx.io/mcp — every tool in the catalog, including @pipeworx/congress’s. Install: one-click buttons

Connect to just the @pipeworx/congress pack

https://gateway.pipeworx.io/congress/mcp — only @pipeworx/congress’s own tools, nothing else in the catalog.

No MCP client? Skip the connection: POST https://gateway.pipeworx.io/v1/tools/search_packs {"query":"..."} to find a tool below, GET /v1/tools/<name> for its schema, POST the same URL with arguments for the data — see For AI agents.

Tools: 10

US federal bills (House and Senate), enacted public/private laws, and members of Congress, served from the Library of Congress’s official congress.gov API, plus a full-text keyword search over the GPO’s GovInfo index of the same bill documents. Bill status, sponsors, enacted laws, member rosters. Requires a free api.data.gov key.

Why this matters for AI agents

For policy research, agents need to know what bills exist, who’s sponsoring them, where they are in the legislative process, and which laws have actually been enacted. Congress.gov is the canonical record. Pair with Federal Register (rules implementing legislation) and USAspending (where the money goes after authorization).

Common flows:

  • Bill search. “What bills are pending on AI regulation?” → search by keyword, filter by Congress.
  • Bill detail. “Status of HR 9876?” → get the bill record with sponsor, current status and whether it became law.
  • Public laws. “How many laws has the 119th Congress enacted? What’s the most recent?” → get_public_laws.
  • Member lookup. “Current members of the House” → get_members.

Auth

Requires an API key. A free api.data.gov key (https://api.data.gov/signup/) authenticates every tool in this pack — the same key works for congress.gov and GovInfo both. Called through the Pipeworx gateway this is supplied automatically; called directly, pass it as _apiKey.

2026-10-16: moved off GovTrack

This pack used to call GovTrack’s public API. GovTrack now answers every endpoint it has — bills, members, votes — with a Cloudflare bot-challenge page served as HTTP 403, so every tool that relied on it failed on every call. search_bills, get_bill, get_recent_bills and get_members now call the official sources instead (congress.gov, plus GovInfo for search_bills’s keyword search — see below). get_votes now serves the House from congress.gov and the Senate from the Congressional Record (see “Roll-call votes” below) — it briefly refused outright between #3164 and #3183 because congress.gov’s roll-call endpoint is House-only.

Search ranking (search_bills)

congress.gov’s own bill listing has no free-text search parameter at all — it only browses/filters by Congress, type and date. The GPO’s GovInfo index of the same bill documents (what congress.gov’s own search box is built on) does support a keyword query, so search_bills searches there and re-ranks the results locally:

  • Candidates. One GovInfo full-text search (up to 100 results), which already returns a reasonable relevancy order.
  • Dedup. A bill shows up once per PUBLISHED VERSION (introduced, reported, engrossed, enrolled, …) — these are collapsed to one row per (Congress, bill type, number), keeping whichever version scores best.
  • Ranking. Every candidate’s title is scored: exact title match, then a title containing the phrase (shorter wins), then all query words present (prefix-tolerant, so “lower” matches “Lowering”), then partial overlap. Each returned bill carries match (exact / phrase / all_words / partial / none) and matched_title.
  • congress filter. Applied LOCALLY against the search results (not a documented GovInfo query field) — a match outside GovInfo’s own top 100 results for that query may be missed. Pass it to narrow, not to guarantee exhaustive coverage of one Congress the way the old GovTrack-backed version did.
  • Sponsor, status and introduced-date on each result come from congress.gov (a follow-up lookup per candidate), since GovInfo’s search result carries only title and date.

Public laws (get_public_laws) — new

GovTrack never had an endpoint for enacted laws. congress.gov does: pass a Congress number (and optionally law_type: "priv" for private laws) to get the count, the most recent law, and the list — newest first.

Committees and subcommittees (committee_leadership, committee_members)

Baked from a SEPARATE public-domain source (github.com/unitedstates/congress-legislators) — neither congress.gov nor GovTrack has a committee-membership or committee-leadership endpoint at all. data_as_of on every response is that source’s own last-update date.

committee_members identifies a committee OR a subcommittee by committee_id (exact) or by name. Name search (fleet #3203, 2026-10-16) looks at SUBCOMMITTEE names too, not just the ~230 top-level committees — “Cybersecurity” alone finds the Senate Armed Services Subcommittee on Cybersecurity (SSAS21) directly, and so does the fuller “Senate Armed Services Subcommittee on Cybersecurity” (disambiguating it from House Armed Services’ own Cyber-named subcommittee). Matching is word-token (every query word must appear in, or be a prefix/suffix of, a candidate word) and exact-first ranked: an unambiguous exact name match wins outright even when several looser matches exist, and those are disclosed as alternatives rather than silently dropped. A name that matches only the PARENT committee (no subcommittee) is returned as the committee, with parent_only_match: true and a note — never presented as if it were a more specific subcommittee. A subcommittee’s own record always names its parent separately (parent_committee_id/parent_committee_name); its chair/ranking_member are its OWN, resolved from its own roster, never the parent’s.

Roll-call votes (get_votes) — two sources, one tool

(fleet #3183, 2026-10-16 — follow-up to #3164, which left this tool refusing outright.) Pass chamber: "house" or "senate"; the two chambers number their roll-call votes independently, so there is no single combined listing.

  • House — the Clerk of the House’s own roll-call vote records, via congress.gov’s official API. Requires the same API key as the rest of this pack.
  • Senate — the Congressional Record, published by the U.S. Government Publishing Office (through GovInfo, with the same API key as the rest of this pack). The Record prints every Senate roll call with its tally and its Yeas / Nays / Present / Not Voting lists; this pack reads those. The Secretary of the Senate’s own site refuses automated requests (HTTP 403 from a web-application firewall, root page included), and congress.gov has no Senate roll-call endpoint, so it is not read.
    • date is the Record’s issue date, i.e. the Senate’s legislative day: a day that runs past midnight is printed under the earlier date (the 1 July 2025 vote on H.R. 1 is under 30 June).
    • question and result are the Record’s own sentences (The question is, Will the Senate advise and consent... / The nomination was confirmed.). When the Record has no outcome sentence this tool can match, result is null with a result_note — it is never inferred from the tally, because cloture and treaty votes need more than a simple majority.
    • A roll-call block is returned only if its Yeas/Nays lists match the counts the Record announces, in two places. One that does not is listed under unparsed with the reason, and a gap in the returned range of vote numbers is named in note.
    • total is the highest roll-call number printed so far in the session (Senate roll numbers run 1..N), not a count of what this call read.
    • Per-senator positions, attendance and party-line share are congress-member-votes with chamber: "senate".

Every response names its own chamber, congress, session and source. Omit congress/session for the CURRENT session; session (1 or 2 — each Congress has exactly two, one per calendar year) can only be inferred for the current Congress — naming a different, past Congress without a session is a named argument error, not a guess. A chamber/congress/session nothing has been published for returns a named reason, never a silent empty list.

total (House) is congress.gov’s own session vote count (pagination.count), the same at any limit — the House list endpoint carries no sort and this pack fetches/re-ranks only enough rows to satisfy limit, so total is read from the API’s own count, never backfilled from however many rows this one call happened to fetch (fleet #3215). If congress.gov ever omits that count, total is left out entirely with a note, rather than silently reporting the fetched-row count as the real total. other_votes was dropped from House vote records (fleet #3215) — it was a sum of present_votes + not_voting that, on every observed live vote, read identically to not_voting alone (present votes are rare); sum the two yourself if you want that figure.

House votes are NOT read from the list endpoint at all, at any offset — confirmed live, 2026-10-17: even a page fetched from the TAIL of the list (an earlier attempt at this fix) can have holes (one real session’s limit:10 came back 314..307, 304, 303 — rolls 306 and 305 were simply missing from that page). House roll-call numbers are sequential 1..pagination.count within a session, so the newest votes are addressed DIRECTLY by number (count, count-1, …) via the single-vote detail endpoint — no list page, no jitter, no holes. This is capped at 25 per call for House (each vote costs its own upstream request); a higher limit is clamped with a note. A roll number congress.gov has no record of (vacated/stricken and never reused) is skipped and named in note — total itself is unaffected, since it already comes from pagination.count, not from counting what was successfully fetched.

Member statistics (member_legislative_stats)

member_legislative_stats({ bioguide_id, congress? }) returns, for one member in one Congress: bills sponsored, bills cosponsored, sponsored bills that became law, and the share of the member’s newest sponsored bills (up to 60, reported as bills_analysed) that drew at least one cosponsor from the other major party. These are counts Pipeworx computes from Library of Congress records, not an official score. GovTrack’s report-card figures (bills joined from the other party, rank and percentile among members) are not computed: they need every member’s record, and GovTrack blocks automated access. The response says so in not_computed.

Congress numbering

Congresses are numbered sequentially: 119th Congress = 2025-2027 (started Jan 2025), 118th = 2023-2025, etc. Bills carry their Congress number — HR1 of the 119th is a different bill than HR1 of the 118th.

Bill type prefixes

PrefixWhat it isChamber
HRHouse BillHouse
HRESHouse Resolution (procedural)House
HJRESHouse Joint ResolutionHouse
HCONRESHouse Concurrent ResolutionHouse
SSenate BillSenate
SRESSenate ResolutionSenate
SJRESSenate Joint ResolutionSenate
SCONRESSenate Concurrent ResolutionSenate

For “regular legislation” purposes, HR and S are the meaningful types. Resolutions don’t have force of law (HRES, SRES) or are limited (HJRES, SJRES — the latter can amend the Constitution if ratified).

Common pitfalls

  • Bill status nuance. “Introduced” is the start. “Reported” by committee is meaningful progress. “Engrossed” / “passed chamber” matters. “Enrolled” / “presented to president” is near-final. Most bills die quietly in committee; “introduced” alone is weak signal. status_label on each bill is congress.gov’s free-text latestAction, not a coded status — read it rather than pattern-matching it.
  • Companion bills. Identical legislation often introduced in both chambers as paired bills (HR 1234 + S 567). Both must pass.
  • Roll-call votes only. get_votes covers recorded roll calls — many congressional decisions happen by voice vote or unanimous consent and never appear in either chamber’s roll-call records at all.
  • Committee referrals. A bill can be referred to multiple committees (sequential, joint, or split). It must clear all to advance. The committee structure matters more than the introduction.
  • Cosponsorship is cheap. Members cosponsor freely. A 100-cosponsor bill is meaningful; a 5-cosponsor bill in a 435-member House isn’t necessarily.

Tools

  • search_bills — ANSWERS “what bills about X has Congress introduced” / “recent congressional bills on X” / “federal legislation about X” / “find the Act” — searches US FEDERAL congressional bills (US House &
  • get_bill — Look up one congressional bill from congress.gov (the Library of Congress’s official API) by its real-world identifier — congress number, bill type and bill number, e.g. the 118th Congress H.R. 1. Ret
  • get_public_laws — ANSWERS “how many public laws has the 119th Congress passed” / “most recent public law” / “list of laws enacted this Congress” — returns public (or private) laws enacted in one Congress, from congress
  • get_members — Get current members of Congress with their name, party, state, district (for representatives), chamber and first term-start year, from congress.gov. Requires an API key (see get_bill).
  • get_votes — ANSWERS “how did the Senate vote on X” / “recent House roll calls” / “cloture vote tally” — recent roll-call votes for ONE chamber, newest first within that chamber + session. House votes come from th
  • get_recent_bills — List the most recent congressional bills — newest first by introduction date or by latest update — from congress.gov. This tool takes NO subject or keyword: it returns whatever Congress touched most r
  • committee_leadership — ANSWERS “who chairs X committee” / “who are the ranking members of every House committee” / “list of committee chairs in Congress” — returns EVERY standing committee in one chamber (or all three chamb
  • committee_members — ANSWERS “who is on the House Appropriations committee” / “roster of the Senate Judiciary committee” / “Democratic members of Ways and Means” / “chair of the Armed Services Subcommittee on Cybersecurit
  • member_committees — ANSWERS “what committees is X on” / “committee assignments for Senator X” — returns every committee and subcommittee assignment (committee name, chamber, rank, title) for one member of the 119th Congr
  • member_legislative_stats — ANSWERS “how many bills has Rep. X sponsored”, “how bipartisan is Senator Y”, “what share of X’s bills have other-party cosponsors” — legislative activity statistics for ONE member of Congress in one

Tools

  • committee_leadership — ANSWERS who chairs X committee / who are the ranking members of every House committee / list of committee chairs in Congress — returns EVERY standing committee in one chamber (or all three chambers) o
  • committee_members — ANSWERS who is on the House Appropriations committee / roster of the Senate Judiciary committee / Democratic members of Ways and Means / chair of the Armed Services Subcommittee on Cybersecurity — ret
  • get_bill — Look up one congressional bill from congress.gov (the Library of Congress's official API) by its real-world identifier — congress number, bill type and bill number, e.g. the 118th Congress H.R. 1. Ret
  • get_members — Get current members of Congress with their name, party, state, district (for representatives), chamber and first term-start year, from congress.gov. Requires an API key (see get_bill).
  • get_public_laws — ANSWERS how many public laws has the 119th Congress passed / most recent public law / list of laws enacted this Congress — returns public (or private) laws enacted in one Congress, from congress.gov's
  • get_recent_bills — List the most recent congressional bills — newest first by introduction date or by latest update — from congress.gov. This tool takes NO subject or keyword: it returns whatever Congress touched most r
  • get_votes — ANSWERS how did the Senate vote on X / recent House roll calls / cloture vote tally — recent roll-call votes for ONE chamber, newest first within that chamber + session. House votes come from the Cler
  • member_committees — ANSWERS what committees is X on / committee assignments for Senator X — returns every committee and subcommittee assignment (committee name, chamber, rank, title) for one member of the 119th Congress,
  • member_legislative_stats — ANSWERS how many bills has Rep. X sponsored , how bipartisan is Senator Y , what share of X's bills have other-party cosponsors — legislative activity statistics for ONE member of Congress in one Cong
  • search_bills — ANSWERS what bills about X has Congress introduced / recent congressional bills on X / federal legislation about X / find the <Named> Act — searches US FEDERAL congressional bills (US House & Senate,

Regenerated from source · build October 30, 2026