regulations-mcp
An MCP server that gives AI assistants live access to U.S. federal regulations — Federal Register, Code of Federal Regulations (eCFR), and Regulations.gov.
Works with any LLM via the built-in regs CLI (Claude, GPT-4o, Gemini, Mistral, Llama via Groq/Ollama, Cohere, and more).
What it can do
| Tool | Source | Auth needed |
|---|---|---|
| Search Federal Register documents | federalregister.gov | None |
| Get a specific FR document | federalregister.gov | None |
| List open public comment periods | federalregister.gov | None |
| Get pre-publication inspection documents | federalregister.gov | None |
| List all 50 CFR titles | ecfr.gov | None |
| Full-text search the CFR | ecfr.gov | None |
| Read a specific CFR section | ecfr.gov | None |
| Browse CFR title structure | ecfr.gov | None |
| Search regulatory dockets | regulations.gov | Free API key |
| Search regulations.gov documents | regulations.gov | Free API key |
Quick start
pip install regulations-mcp
cp .env.example .env # add your LLM key
Interactive chat
# Claude (default)
regs chat
# GPT-4o
regs chat --provider gpt4o
# Gemini 1.5 Pro
regs chat --provider gemini
# Llama 3 via Groq (free tier)
regs chat --provider groq-llama
# Local Ollama
regs chat --provider ollama-llama3
# Any litellm model string
regs chat --provider "bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0"
One-shot questions
regs ask "What EPA rules have open comment periods right now?"
regs ask "What does 21 CFR Part 11 say about electronic signatures?" --provider gpt4o
regs ask "Find all OSHA rules published in the last 30 days" --provider gemini-flash
regs ask "Summarize the most recent FDA food safety final rules" --provider groq-llama
List all providers
regs providers
Use as an MCP server (Claude Desktop / any MCP client)
Add to your MCP client config:
{
"mcpServers": {
"regulations": {
"command": "regulations-mcp",
"env": {
"REGULATIONS_GOV_API_KEY": "your_key_here"
}
}
}
}
Claude Desktop config location:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Diff CFR sections across dates
Compare exactly what regulatory text changed between any two dates:
# What changed in 21 CFR § 11.1 between 2020 and 2024?
regs diff 21 11 1 2020-01-01 2024-01-01
# With LLM summary of the regulatory impact
regs diff 21 11 1 2020-01-01 2024-01-01 --llm
# Use a different LLM for the summary
regs diff 40 122 1 2018-01-01 2024-01-01 --llm --provider gpt4o
# Show full text of both versions side by side
regs diff 29 1910 95 2015-01-01 2024-01-01 --full
The diff_cfr_section tool is also available in the MCP server — AI assistants can call it directly to answer questions like "what exactly changed in this regulation and when?"
Example questions
What EPA rules are currently open for public comment?
Summarize 21 CFR Part 11 (FDA electronic records requirements)
What changed in Title 40 (EPA) in the last 6 months?
Find all proposed rules about AI or machine learning
What are the OSHA requirements for workplace noise exposure? (29 CFR 1910.95)
Which agencies published final rules this week?
Show me documents currently on public inspection before they're published
Publishing a release
# Bump version in pyproject.toml and __init__.py, then:
git tag v0.2.0 && git push origin v0.2.0
# Create a GitHub release — the publish workflow auto-uploads to PyPI
gh release create v0.2.0 --generate-notes
Dry-run to TestPyPI first via Actions → Publish → Run workflow → dry_run=true.
Development
git clone https://github.com/stark256-spec/regulations-mcp
cd regulations-mcp
pip install -e ".[dev]"
pytest tests/ -v
Data sources
All free, public U.S. government APIs — no scraping, no unofficial endpoints:
- Federal Register API — federalregister.gov/developers
- eCFR API — ecfr.gov/developers
- Regulations.gov API — api.regulations.gov (free key required)
License
MIT
Metadata
Release files for regulations-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| regulations_mcp-0.1.0.tar.gz | 15.2 kB | Without provenance | Details for regulations_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| regulations_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for regulations_mcp-0.1.0-py3-none-any.whl |
Total release size: 30.9 kB
Release files / regulations_mcp-0.1.0.tar.gz
| Download URL | regulations_mcp-0.1.0.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1313cb8f36aac99274d854d31108088239dccc9cb9dc2327c0d37ec7c37c5c93
|
|
BLAKE2b-256 checksum How to use checksums |
fdc9b6bc8e04254212b74ea2c50609a79b1e74d8538d050e0e63f5e44d9669bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / regulations_mcp-0.1.0-py3-none-any.whl
| Download URL | regulations_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ffc05e4268d2a145754227f2973360045d93ff8a2095b125c551ac6aa7c7ef5
|
|
BLAKE2b-256 checksum How to use checksums |
7785e565d1b5873fc4088302bf7a0fe5db30af528905f8f9991bd1eaa6b5cf69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for regulations-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.