OpenDiscourse MCP
Model Context Protocol (MCP) servers for accessing bulk data from govinfo.gov and congress.gov APIs.
Overview
This project provides MCP servers that enable AI assistants to access comprehensive legislative and governmental data from:
GovInfo API: Congressional documents, Federal Register, Code of Federal Regulations, and more
Congress.gov API: Bills, members, committees, nominations, and legislative activities
Features
GovInfo Server Tools
govinfo_list_collections- List collections updated since a specific dategovinfo_get_package- Get detailed package informationgovinfo_list_granules- List granules within a packagegovinfo_get_granule- Get detailed granule informationgovinfo_download_content- Download content (PDF, XML, HTML)
Congress.gov Server Tools
congress_get_bill- Get detailed bill informationcongress_search_bills- Search for bills by text querycongress_get_bill_actions- Get legislative actions for a billcongress_get_bill_text- Get full text of a billcongress_search_members- Search for members of Congresscongress_get_member- Get detailed member informationcongress_get_committee_meetings- Get committee meetingscongress_get_nominations- Get presidential nominations
Installation
Prerequisites
Node.js and npm (for MCP server)
Python 3.10+ (for setup scripts)
PostgreSQL (for database storage)
Bitwarden CLI (for API key management)
Quick Start
Detailed Setup
1. Python Environment
2. Database Setup
3. Bitwarden Setup
4. API Key Configuration
5. MCP Server Deployment
Bitwarden Item Setup:
Create these items in your Bitwarden vault:
GovInfo API Key
Name:
GovInfo API KeyCustom Field:
api_keywith your GovInfo API key
Congress.gov API Key
Name:
Congress.gov API KeyCustom Field:
api_keywith your Congress.gov API key
Configuration
Required API Keys
GovInfo API Key
Sign up at: https://api.data.gov/signup
Add to
.env:GOVINFO_API_KEY=your_key_here
Congress.gov API Key
Sign up at: https://api.congress.gov/sign-up/
Add to
.env:CONGRESS_API_KEY=your_key_here
Optional Configuration
MCP_LOG_LEVEL- Logging level (default: info)GOVINFO_RATE_LIMIT- GovInfo rate limit requests/hour (default: 1000)CONGRESS_RATE_LIMIT- Congress.gov rate limit requests/hour (default: 4000)
Usage
As MCP Server
Integration with Claude Desktop
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json):
API Key Management
The project includes automated API key management through Bitwarden:
Features:
π Automatic API key discovery from Bitwarden vault
π Secure vault unlocking
π Environment file updates
ποΈ Database storage with encryption
π Security masking in console output
Integration with Claude Desktop
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json):
API Coverage
GovInfo Collections
BILLS - Congressional bills (all versions)
CREC - Congressional Record
FR - Federal Register
CFR - Code of Federal Regulations
USCOURTS - U.S. Courts opinions
CHRG - Committee reports and prints
Congress.gov Data
Bills and amendments (93rd Congress to present)
Member information and voting records
Committee data and meetings
Presidential nominations
Roll call votes
Legislative text and summaries
Rate Limits
GovInfo API: Follows api.data.gov limits (configurable, default 1000/hour)
Congress.gov API: 5,000 requests/hour (configurable, default 4000/hour)
Both clients implement automatic rate limiting with delays between requests.
Development
Documentation
Comprehensive documentation is available in the /docs folder:
docs/README.md- Complete reference guidedocs/govinfo-api-summary.md- GovInfo API quick referencedocs/congress-api-summary.md- Congress.gov API quick referenceDownloaded official API repositories and samples
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Run
npm run buildSubmit a pull request
License
MIT License - see LICENSE file for details.
Support
Issues: https://github.com/cbwinslow/opendiscourse_mcp/issues
GovInfo API: https://github.com/usgpo/api/issues
Congress.gov API: https://github.com/LibraryOfCongress/api.congress.gov/issues