# GovInfo (GPO Legislative Docs) MCP

> GovInfo (GPO Legislative Docs) MCP lets your agent pull official US government records, federal bills, and legislative data straight from the GPO. You can list document categories, run complex searches using keywords, or fetch full summaries of specific packages—all without navigating separate government websites.

## Overview
- **Category:** document-management
- **Price:** Free
- **Tags:** legislative-data, congressional-bills, federal-register, gpo, government-documents

## Description

Need to track a bill or understand federal regulations? This MCP connects your agent directly to the U.S. Government Publishing Office (GPO). Instead of spending hours clicking through departmental portals and sifting through PDF archives, you just ask for it. Your agent handles the heavy lifting, letting you access collections like Congressional Bills and the Federal Register in a single chat session. It's built for deep research: find specific metadata using `get_package_summary`, run highly targeted queries with `search_govinfo`, or even download the full document content via `get_package_content`. If your team uses Vinkius, you can connect this service right alongside your other data sources—it makes keeping track of regulatory shifts simple. This is pure research power, designed for people who need accurate government facts, not marketing fluff.

## Tools

### get_collection_details
Retrieves the specific metadata for a single GovInfo document collection.

### get_package_content
Downloads and retrieves the full content of a package, handling raw text or binary file formats like PDF.

### get_package_summary
Gets detailed metadata and an overview for one specific GovInfo legislative package.

### list_collections
Lists all major types of documents available in the GPO, like Congressional Bills or Federal Registers.

### list_packages
Lists specific packages within a defined collection by allowing you to filter results based on date.

### search_govinfo
Runs advanced, complex queries across all GovInfo collections using keywords or structured syntax.

## Prompt Examples

**Prompt:** 
```
List all available GovInfo document collections.
```

**Response:** 
```
I've retrieved the available collections. You can access documents from the Federal Register (FR), Congressional Bills (BILLS), Daily Compilation of Presidential Documents (DCPD), and many others. Which collection would you like to explore?
```

**Prompt:** 
```
Search for recent Congressional Bills related to 'artificial intelligence'.
```

**Response:** 
```
Searching the database... I found several recent bills, including 'H.R. 3849' and 'S. 1624'. Would you like me to fetch the summary for one of these specific packages?
```

**Prompt:** 
```
Get the summary and metadata for package ID BILLS-117hr3076ih.
```

**Response:** 
```
Here is the summary for H.R. 3076 (Postal Service Reform Act of 2022). It was introduced in the 117th Congress and focuses on the financial stability of the USPS. I have also retrieved the MODS and XML metadata links if you need further details.
```

## Capabilities

### List all available document categories
You can check every type of official record the GPO maintains, like Congressional Bills or Presidential Papers.

### Perform advanced keyword searches
The agent runs complex queries across the entire database to locate specific topics or keywords instantly.

### Get high-level document summaries
It retrieves detailed metadata and a summary for any specific legislative package you point it toward.

### Download full document content
You can retrieve the actual text and files of a record, whether it's XML or PDF data.

### Pinpoint records by date range
The MCP lists specific sets of packages that were published within defined timeframes.

## Use Cases

### A journalist needs to prove the historical context of a current law.
Instead of checking three different archives, they prompt their agent: 'Show me all Presidential Papers and Congressional Bills related to energy policy from 2010-2015.' The agent uses `list_collections` followed by date filtering via `list_packages`, providing a structured timeline for the journalist.

### A lawyer needs to verify if a specific regulation was updated in Q3.
The lawyer asks the agent to search using highly specific syntax. The MCP runs this through `search_govinfo` and, upon finding a match, uses `get_package_summary` to pull the exact effective date for review.

### A policy analyst needs to see what documentation is available on 'AI regulation.'
The analyst doesn't know which collection holds the info. They first call `list_collections`. Once they narrow it down, they run a broad query with `search_govinfo` to get an initial scope of relevant documents.

### A developer needs the raw text for data modeling.
The developer uses `get_package_content` on a specific bill package ID. The agent returns the document content in machine-readable XML or plain text, ready to be fed into their own structured database.

## Benefits

- You stop manually cross-referencing bill databases. With this MCP, you can use `list_collections` to see all available document types immediately.
- Instead of navigating through multiple government sites, the agent handles advanced searching across the entire GPO database using `search_govinfo`. It's one query for everything.
- The system doesn't just give you a link; it pulls the detail. Use `get_package_summary` to get key metadata and context without needing to open dozens of tabs.
- Need the raw source material? The tool `get_package_content` fetches the actual text or file data, making deep analysis possible right away.
- You can track legislative history by running date-based searches using `list_packages`, keeping a clear timeline of policy changes.

## How It Works

The bottom line is that your agent handles all the API calls and data formatting; you just get the final, usable answer.

1. Subscribe to this MCP and provide your GovInfo (Data.gov) API Key.
2. Your agent uses the available tools, such as `list_collections` or `search_govinfo`, to define the scope of the records you need.
3. The system fetches the requested metadata, summaries, or raw content directly into your chat interface.

## Frequently Asked Questions

**How do I search using GovInfo (GPO Legislative Docs) MCP with specific keywords?**
`search_govinfo` runs advanced queries across the entire database. You just need to provide your keywords or use Lucene syntax in a single prompt.

**Does get_package_summary give me enough detail, or do I still need get_package_content?**
`get_package_summary` gives you the overview and metadata. You only call `get_package_content` if you need the actual raw text/file data for deep analysis.

**How do I see what types of documents are available? (list_collections)**
Use `list_collections`. This tool provides a list of all major document categories, like Congressional Bills and the Federal Register, so you know where to focus your search.

**Can I find records from a specific time frame? (list_packages)**
Yes. Use `list_packages`. You first select a collection type, then use the tool to narrow down and list packages that fall within precise date ranges.

**When I use get_package_content, how do I handle various document formats like XML or PDF?**
The tool returns binary formats as raw text/binary strings. Your agent must process these streams using native libraries to convert them into usable data structures for analysis.

**What information can I get using get_collection_details for a specific GovInfo category?**
It returns the metadata associated with that particular document grouping, detailing its scope and type. This lets you understand exactly what kind of documents exist before running a full search.

**Does search_govinfo support advanced Lucene syntax beyond basic keywords?**
Yes, the tool supports the full Lucene query language. You can use operators like AND, OR, and proximity searches to pinpoint highly specific legislative texts across collections.

**What is required setup-wise before I can run any GovInfo tools?**
You must supply a valid GovInfo (Data.gov) API key in the configuration. Your AI client uses this credential to authorize all calls, ensuring you have access to official GPO data.

**Can I search for specific keywords across all government documents?**
Yes! Use the `search_govinfo` tool with Lucene syntax to perform complex queries. You can filter by date, collection, or specific fields to find exactly what you need.

**How do I get the actual text or PDF of a bill?**
Use the `get_package_content` tool with the specific `packageId` and choose your preferred format (pdf, xml, mods, etc.) to retrieve the document content.

**What types of document collections are available?**
Run the `list_collections` tool to see all available sources. Common codes include 'BILLS' for Congressional Bills, 'FR' for the Federal Register, and 'CPD' for Compilation of Presidential Documents.