Skip to main content
Glama

GovInfo MCP Server

by Travis-Prall
  • Linux

GovInfo MCP Server

A Model Context Protocol (MCP) server that provides LLM-friendly access to the official GovInfo API v4. This server enables searching and retrieving U.S. government documents, including bills, laws, regulations, and other official publications, for precise legal research and citation verification.

🎯 Purpose

The GovInfo MCP Server provides comprehensive access to federal regulations, statutes, and government documents through the GovInfo API. It is designed for LLMs and legal research tools to programmatically access up-to-date U.S. government information.

📦 Key Features

  • Access to bills, statutes, regulations (CFR), and more
  • Real-time updates from the official GovInfo API
  • Retrieve full document text and metadata in HTML, XML, PDF, or plain text
  • Search by keyword, collection, date, and more
  • Explore related documents and cross-references

🛠️ Available MCP Tools

Tool NameDescriptionExample Call
get_collectionsList all available GovInfo collectionsget_collections(page_size=10)
get_collection_detailsGet details for a specific collectionget_collection_details(collection_code="CFR")
search_packagesSearch packages by query and filterssearch_packages(query="discovery procedures", collection="CFR", page_size=5)
advanced_searchAdvanced search with Lucene syntax and filtersadvanced_search(query="title:discovery AND collection:CFR", sort_by="relevance")
get_packages_by_collectionList packages from a collectionget_packages_by_collection(collection="BILLS", congress=118, page_size=5)
get_package_summaryGet metadata for a specific packageget_package_summary(package_id="CFR-2023-title5-vol3")
get_package_contentDownload package content in various formatsget_package_content(package_id="CFR-2023-title5-vol3", content_type="html")
get_published_packagesGet packages published on a specific dateget_published_packages(date_issued="2024-01-15", collection="CFR")
get_published_rangeGet packages published within a date rangeget_published_range(start_date="2024-01-01", end_date="2024-01-31", collection="PLAW")
get_related_packagesFind packages related to a specific packageget_related_packages(package_id="BILLS-118hr1234-ih")
get_granule_relatedFind items related to a specific granuleget_granule_related(package_id="CFR-2023-title5-vol3", granule_id="CFR-2023-title5-vol3-sec1201-72")
search_statutesSearch US statutes across statute collectionssearch_statutes(query="civil rights", collection="USCODE", page_size=5)
get_public_laws_by_congressList public laws from a specific Congressget_public_laws_by_congress(congress=117, page_size=5)
get_statutes_at_largeSearch Statutes at Large by volumeget_statutes_at_large(volume="137", page_size=5)
get_uscode_titleSearch US Code sections within a titleget_uscode_title(title_number="42", page_size=5)
list_statute_collectionsList all statute-related collectionslist_statute_collections()

See app/README.md for full tool parameter documentation.

🚀 Setup

Prerequisites

  • Python 3.12+
  • uv for dependency management (Poetry is NOT used)
  • Internet connection for GovInfo API access
  • GovInfo API key (set GOVINFO_API_KEY in your environment)
  • Ubuntu/Linux recommended (all commands below are for bash)

Installation

  1. Clone the repository and navigate to the GovInfo project directory:
    git clone <repository-url> cd GovInfo
  2. Install dependencies using uv:
    uv pip install -r requirements.txt # or, if using pyproject.toml: uv pip install -r <(uv pip compile pyproject.toml)
  3. Set your GovInfo API key:
    export GOVINFO_API_KEY=your_api_key_here
  4. (Optional) Copy .env.example to .env and edit as needed.

Running the Server

Start the MCP server:

uv run python -m app.server

Or use the VS Code task "Run MCP Server".

Running Tests

See tests/README.md for details. Typical usage:

uv run pytest

API Usage

See app/README.md for detailed tool documentation and usage examples.

📝 Notes

  • All code examples are tested and working.
  • File paths use relative references from the project root.
  • All commands use uv run where needed.
  • For Ubuntu/Linux. For Windows, adapt commands as needed.
-
security - not tested
F
license - not found
-
quality - not tested

A Model Context Protocol server that provides LLM-friendly access to the official GovInfo API for searching and retrieving U.S. government documents including bills, laws, regulations, and other official publications.

  1. 🎯 Purpose
    1. 📦 Key Features
      1. 🛠️ Available MCP Tools
        1. 🚀 Setup
          1. Prerequisites
          2. Installation
          3. Running the Server
          4. Running Tests
          5. API Usage
        2. 🔗 Links
          1. 📝 Notes

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that enables LLMs to perform web searches using Google's Custom Search API through a standardized interface.
              Last updated -
              1
              23
              TypeScript
              MIT License
            • A
              security
              A
              license
              A
              quality
              An MCP server that provides access to government datasets from Data.gov, enabling users to search packages, view dataset details, list groups and tags, and access resources by URL.
              Last updated -
              4
              7
              5
              JavaScript
              MIT License
              • Apple
            • A
              security
              F
              license
              A
              quality
              An MCP server that enables users to search for government grants based on keywords and view detailed information including funding, eligibility, and deadlines.
              Last updated -
              1
              JavaScript
            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that provides Google Maps API integration, allowing users to search locations, get place details, geocode addresses, calculate distances, obtain directions, and retrieve elevation data through LLM processing capabilities.
              Last updated -
              7
              163
              25
              TypeScript
              MIT License

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/Travis-Prall/govinfo-mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server