GovInfo MCP Server
Supports environment variable configuration through .env files for setting API keys and other configuration options
Provides test suite integration for validating the functionality of GovInfo API connections and tool operations
Built with Python 3.12+ as the runtime environment for the MCP server implementation
Optimized for deployment on Ubuntu/Linux environments with bash command support
Enables retrieval of U.S. government documents in XML format, allowing for structured access to official publications like regulations, statutes, and bills
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GovInfo MCP Serversearch for recent bills about artificial intelligence"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Related MCP server: eRegulations MCP Server
📦 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 Name | Description | Example Call |
| List all available GovInfo collections |
|
| Get details for a specific collection |
|
| Search packages by query and filters |
|
| Advanced search with Lucene syntax and filters |
|
| List packages from a collection |
|
| Get metadata for a specific package |
|
| Download package content in various formats |
|
| Get packages published on a specific date |
|
| Get packages published within a date range |
|
| Find packages related to a specific package |
|
| Find items related to a specific granule |
|
| Search US statutes across statute collections |
|
| List public laws from a specific Congress |
|
| Search Statutes at Large by volume |
|
| Search US Code sections within a title |
|
| List all statute-related collections |
|
See app/README.md for full tool parameter documentation.
🚀 Setup
Prerequisites
Python 3.14+
uv for dependency management (Poetry is NOT used)
Internet connection for GovInfo API access
GovInfo API key (set
GOVINFO_API_KEYin your environment)Ubuntu/Linux recommended (all commands below are for bash)
Installation
Clone the repository and navigate to the GovInfo project directory:
git clone <repository-url> cd GovInfoInstall dependencies (creates a project-local
.venvfrom the committeduv.lock):uv syncSet your GovInfo API key:
export GOVINFO_API_KEY=your_api_key_here(Optional) Copy
.env.exampleto.envand edit as needed.
Running the Server
By default the server speaks STDIO, which is what most local MCP clients expect:
uv run python -m app.serverOr use the VS Code task "Run MCP Server".
Streamable HTTP (standalone Linux service)
To run the server as a networked ASGI service, either start the exported app with Uvicorn:
uv run uvicorn app.server:app --host 0.0.0.0 --port 8775or let the entry point select the transport:
MCP_TRANSPORT=http MCP_HOST=0.0.0.0 MCP_PORT=8775 uv run python -m app.serverThe MCP endpoint is then http://<host>:8775/mcp and the operational health
probe is http://<host>:8775/health. For horizontally scaled deployments set
FASTMCP_STATELESS_HTTP=true (or MCP_STATELESS_HTTP=true); to enable
Host/Origin request protection set MCP_ALLOWED_HOSTS/MCP_ALLOWED_ORIGINS,
and to allow specific browser origins set MCP_CORS_ALLOW_ORIGINS.
Docker
docker compose up --buildThe container serves Streamable HTTP on port 8775 and exposes /health for
its HEALTHCHECK.
Running Tests
See tests/README.md for details. Typical usage:
uv run pytestAPI Usage
See app/README.md for detailed tool documentation and usage examples.
🔗 Links
📝 Notes
All code examples are tested and working.
File paths use relative references from the project root.
All commands use
uv runwhere needed.For Ubuntu/Linux. For Windows, adapt commands as needed.
💖 Support
This project is maintained by travisprall. It is free to use, and support is always optional — but if it saves you time, a coffee is very much appreciated:
📄 License
Copyright © travisprall.
Released under the PolyForm Noncommercial License 1.0.0 (SPDX: PolyForm-Noncommercial-1.0.0). Noncommercial use is permitted; commercial use requires a separate license.
📚 Citation
If you use this software in research, please cite it using the metadata in CITATION.cff.
This server cannot be deployed
Maintenance
Related MCP Connectors
An MCP server that provides congressional transcripts
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- FlicenseBqualityDmaintenanceA Model Context Protocol server that enables LLMs to extract and use content from unstructured documents across a wide variety of file formats.111-
- FlicenseDqualityNot gradedmaintenanceA Model Context Protocol server implementation that provides structured, AI-friendly access to eRegulations data, making it easier for AI models to answer user questions about administrative procedures.419 npm-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides documentation access capabilities. This server enables LLMs to search and retrieve content from documentation websites by scraping them with crawl4ai. Built with FastMCP v2.18MIT
- AlicenseNot gradedqualityFmaintenanceAn MCP server for the Congress.gov API that consolidates 91 operations into 6 comprehensive legislative tools that can be used by any MCP client (i.e. Claude Desktop), or MCP-compatible AI agent, to query and reason about congressional data.4 npm1JavaScriptMIT