Labsco
cyanheads logo

congressgov-mcp-server

โ˜… 1

from cyanheads

U.S. congressional data

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredAdvanced setup

@cyanheads/congressgov-mcp-server

Access U.S. congressional data - bills, votes, members, committees - through MCP. STDIO & Streamable HTTP.

11 Tools โ€ข 5 Resources โ€ข 2 Prompts

Install in Claude Desktop Install in Cursor Install in VS Code


Tools

Eleven read-only tools for querying U.S. legislative data:

ToolDescription
congressgov_bill_lookupBrowse and retrieve U.S. legislative bill data โ€” actions, sponsors, summaries, text, related bills
congressgov_enacted_lawsBrowse enacted public and private laws by congress
congressgov_member_lookupDiscover congressional members by state/district/congress, retrieve legislative portfolios
congressgov_committee_lookupBrowse congressional committees and their legislation, reports, and nominations
congressgov_roll_votesRetrieve House and Senate roll call votes and individual member voting positions
congressgov_senate_nominationsBrowse presidential nominations to federal positions and track the Senate confirmation process
congressgov_bill_summariesBrowse recent CRS bill summaries โ€” the "what's happening" feed
congressgov_crs_reportsBrowse and retrieve nonpartisan CRS policy analysis reports
congressgov_committee_reportsBrowse and retrieve committee reports accompanying legislation
congressgov_daily_recordBrowse the daily Congressional Record โ€” floor speeches, debates, and proceedings
congressgov_search_billsKeyword-search bill titles and CRS summaries via a local full-text mirror (opt-in, off by default)

congressgov_bill_lookup

Browse and retrieve U.S. legislative bill data from Congress.gov.

  • Filter by congress number, bill type, and update-date range
  • Retrieve detailed sub-resources: actions, amendments, committees, cosponsors, related bills, subjects, summaries, text versions, and titles
  • list defaults to order='recent' (newest update-date first); pass order='oldest' for ascending
  • Pagination support for browsing large result sets

congressgov_member_lookup

Discover congressional members and their legislative activity.

  • Browse by state, district, congress number, and chamber
  • Retrieve a member's sponsored and cosponsored legislation
  • Look up specific members by bioguide ID

congressgov_committee_lookup

Browse congressional committees and their legislation, reports, and nominations.

  • Filter by chamber (House, Senate, Joint)
  • Retrieve committee bills, reports, and nominations
  • Detail and sub-resource lookups need only committeeCode โ€” chamber is auto-detected from the code
  • Committee bills default to order='recent' (newest-first); pass order='oldest' for ascending update-date order

congressgov_roll_votes

Retrieve House and Senate roll call votes and individual member voting positions.

  • Set chamber to house (default, from the Congress.gov API) or senate (from the Senate's official LIS feed โ€” the API exposes no Senate votes)
  • list browses votes by congress and session, newest first; pass order='oldest' for ascending
  • get returns the question, result, tallies, party breakdown, and associated bill/nomination/amendment
  • members returns each member's recorded position

congressgov_bill_summaries

Browse recent CRS bill summaries.

  • Filter by congress and bill type
  • Browse chronologically to see what's moving through Congress

congressgov_crs_reports

Browse and retrieve CRS reports โ€” nonpartisan policy analyses written by subject-matter experts at the Library of Congress.

  • Browse the full report catalog
  • Retrieve individual reports by product number

congressgov_daily_record

Browse the daily Congressional Record โ€” floor speeches, debates, and legislative text published each day Congress is in session.

  • Browse volumes by congress number
  • Retrieve specific issue articles

congressgov_search_bills

Keyword-search bill titles and CRS summaries against a local full-text mirror โ€” the discovery path the Congress.gov API itself lacks.

  • Opt-in: off by default. Requires CONGRESS_MIRROR_ENABLED=true and a locally built index (bun run mirror:init) โ€” until then the tool is visible but not callable
  • Narrow with congress, billType, and originChamber filters
  • Returns BM25-ranked matches with each bill's derived id, ready for a follow-up congressgov_bill_lookup call

Resources

URI PatternDescription
congress://currentCurrent congress number, session dates, chamber info
congress://bill-typesReference table of valid bill type codes
congress://member/{bioguideId}Member profile by bioguide ID
congress://bill/{congress}/{billType}/{billNumber}Bill detail by congress, type, and number
congress://committee/{committeeCode}Committee detail by committee code

Prompts

PromptDescription
congressgov_bill_analysisStructured framework for analyzing a bill
congressgov_legislative_researchResearch framework for a policy area across Congress

Features

Built on @cyanheads/mcp-ts-core:

  • Declarative tool definitions โ€” single file per tool, framework handles registration and validation
  • Unified error handling across all tools
  • Pluggable auth (none, jwt, oauth)
  • Swappable storage backends: in-memory, filesystem, Supabase
  • Structured logging with optional OpenTelemetry tracing
  • Runs locally (stdio/HTTP) or in Docker from the same codebase

Congress.gov-specific:

  • Type-safe client for the Congress.gov REST API v3
  • Optional API key from api.data.gov โ€” defaults to DEMO_KEY (30 req/hr); own key gets 5,000 req/hr
  • Automatic pagination and response normalization
  • Rate limiting awareness
  • All tools are read-only and idempotent

Project structure

DirectoryPurpose
src/mcp-server/tools/definitions/Tool definitions (*.tool.ts). Eleven Congress.gov tools.
src/mcp-server/resources/definitions/Resource definitions. Congress, bill, member, and committee resources.
src/mcp-server/prompts/definitions/Prompt definitions. Bill analysis and legislative research prompts.
src/services/congress-api/Congress.gov API client โ€” auth, pagination, rate limiting.
src/config/Server-specific environment variable parsing and validation with Zod.
tests/Unit and integration tests, mirroring the src/ structure.

Development guide

See CLAUDE.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches โ€” no try/catch in tool logic
  • Use ctx.log for logging, ctx.state for storage
  • All tools are read-only with readOnlyHint: true and idempotentHint: true