regintel-mcp
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., "@regintel-mcp diff the draft and final guidance for FDA-2020-D-2307"
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.
regintel-mcp
Regulatory intelligence from FDA regulations.gov dockets: who commented, what they asked for, and what changed between the draft and final guidance.
Black Swan Causal Labs · blackswancausallabs.com
Retrieval lives in the MCP server. Judgment lives in skills. Humans sit at the checkpoints.
Layer | Component | Status |
Data |
| Phase 1 built. Fetch, cache, extract, diff. No interpretation. |
Method | skills: | Built |
Orchestration |
| Built; first run on FDA-2020-D-2307 |
Output | Docket Lens explorer (reads one | Built for FDA-2020-D-2307 |
Install
Python 3.11 or later.
git clone https://github.com/Black-Swan-Causal-Labs/regintel-mcp.git
cd regintel-mcp
python3 -m venv .venv && .venv/bin/pip install -e .
cp .env.example .env # then paste your key into .envAPI key: get a free key at https://open.gsa.gov/api/regulationsgov/ and put it in .env as REGULATIONS_GOV_API_KEY=.... .env is gitignored. The key is sent only as the X-Api-Key header and never appears in logs, the cache or any output. DEMO_KEY is fine for single lookups but too rate-limited for a full corpus pull. Personal keys allow 1,000 requests/hour.
Register with an MCP client. MCP is an open standard, so the server works with any compatible assistant (Claude, OpenAI Codex, others). For Claude Code, from the repo directory:
claude mcp add regintel-mcp -- "$(pwd)/.venv/bin/python" -m regintel_mcpWhen installed as a Claude plugin, .mcp.json starts the server from the plugin root.
Related MCP server: mcp-regulations-gov
Tools
Every tool reads the local SQLite cache (data/cache.sqlite) first. It only touches the network on a cache miss or when called with refresh=true.
Tool | Does |
| Keyword search over dockets |
| Docket metadata and total comment count |
| Notices, draft and final guidance, meeting material, with every file URL |
| All comments, paginated internally. Flags |
| Body, submitter fields, attachments and extracted attachment text |
| Pulls every comment and attachment into the cache. Resumable. Reports stubs, duplicates, OCR needs and failures |
| A guidance document (doc ID or URL) split into numbered sections |
| Section-aligned draft-vs-final diff with paragraph changes and moved-paragraph detection |
| Writes |
For long pulls outside a chat: .venv/bin/python -m regintel_mcp build-corpus FDA-2020-D-2307.
How the diff works: the text layer is extracted with pdfplumber. Running headers, draft line numbers, footnotes and the table of contents are removed. Sections are split on the guidance's own Roman, letter and number headings, then matched draft→final by heading (parent-qualified first) and then by heading plus text similarity. Paragraphs are diffed within each matched section, and paragraphs that moved to a different section are labelled. Everything is deterministic: there are no model calls in the server.
API behaviour verified against the live service is recorded in docs/api-notes.md.
Docket Lens (the explorer)
Docket Lens (explorer/template.html) is a single page that reads one analysis.json and shows three linked views: who spoke, what they asked for (a themes × submitter-type heatmap that opens the verbatim requests), and what changed (draft vs final by section, with each request's call). Build a docket's copy with:
.venv/bin/python scripts/build_analysis.py FDA-2020-D-2307
.venv/bin/python scripts/build_explorer.py FDA-2020-D-2307Then open explorer/FDA-2020-D-2307/index.html through any static server, e.g. python3 -m http.server --directory explorer/FDA-2020-D-2307. The explorer is licensed separately under PolyForm Noncommercial 1.0.0 (explorer/LICENSE, explorer/NOTICE).
Hosting a Docket Lens demo (Cloudflare Pages, password-protected)
sh scripts/build_site.sh FDA-2020-D-2307
cd site && npx wrangler pages deploy public --project-name docket-lenssite/functions/_middleware.js puts HTTP Basic Auth in front of every request, including analysis.json. Credentials are Pages secrets, never files: npx wrangler pages secret put DEMO_USER --project-name docket-lens, and the same for DEMO_PASS. If either secret is missing, the site serves nothing (it fails closed). It is a demo gate, not access control for sensitive data.
Status (3 Oct 2026)
First full run: FDA-2020-D-2307 (60 comments, 1,211 requests, 4 checkpoints, human spot-check agreement 91% on 55 calls). Outputs in
output/FDA-2020-D-2307/, decisions indecisions/.Second-docket smoke test: FDA-2021-D-0548. Retrieval and the draft/final comparison passed without changes; see
docs/smoke-test-FDA-2021-D-0548.md.
The concordance caveat
This tool measures concordance, not impact. Changes between draft and final guidance also come from FDA's internal review, ICH M14, other guidances and the evolving science. When the final text moves in the direction a commenter asked for, that does not show the comment caused the change. Every output from this project carries that caveat.
License
Server: MIT (see LICENSE). The Explorer template is licensed separately under PolyForm Noncommercial 1.0.0.
© 2026 Black Swan Causal Labs · https://blackswancausallabs.com
Official MCP Registry packaging
The Docket Lens retrieval server has an MCP bundle for Registry distribution.
See Registry installation and release instructions.
The bundle requires uv, your Regulations.gov API key, and a writable working folder.
Available Tools
9 toolsbuild_corpusA
Pull every comment and attachment of a docket into the local cache and extract attachment text. Resumable: anything already cached is skipped, so re-running finishes an interrupted pull. max_comments caps new detail fetches per call. Returns counts of comments, attachments, extraction outcomes, OCR needs, stubs, duplicate groups and itemised failures.
Inputs: docket_id (required), refresh, max_comments, with_attachments.
diff_guidanceA
Section-aligned draft-vs-final diff. For each section: section_id, heading, status (added/removed/modified/unchanged), draft_text, final_text, paragraph_changes (incl. paragraphs moved between sections) and change_summary_stats. Refs as in get_guidance_text. write_to saves the full diff as JSON (relative paths resolve to the repo) and returns a summary.
Inputs: draft_ref (required), final_ref (required), write_to, include_text.
export_corpusB
Write the cached corpus as JSONL (one full comment per line, with stub/duplicate flags) to output//corpus.jsonl, for skills and subagents to read in batches.
Inputs: docket_id (required), path.
get_commentB
One comment in full: body text, submitter fields (organization, name, category, location), attachment metadata and extracted attachment text. max_chars truncates long texts.
Inputs: comment_id (required), refresh, max_chars.
get_docketC
Docket metadata plus the total number of public comments (e.g. 'FDA-2020-D-2307').
Inputs: docket_id (required), refresh.
get_guidance_textC
Plain text of a guidance document, split into sections by its numbered headings (I./A./1.). ref is a regulations.gov document id (e.g. 'FDA-2020-D-2307-0002') or a URL (an fda.gov guidance page or a /media//download PDF).
Inputs: ref (required), refresh, include_full_text.
list_commentsB
All public comments in a docket (pagination handled). Each row: commentId, title, postedDate, submitterName, and — once build_corpus has run — has_attachment, is_stub (body < 50 chars and no attachment) and duplicate_of (same submitter, near-identical text). Flags never drop rows.
Inputs: docket_id (required), refresh, include_withdrawn.
list_documentsB
Documents in a docket (Federal Register notices, draft/final guidance, meeting material) with documentType, subtype, postedDate and every downloadable file URL. Use it to locate the draft guidance, the final guidance, and the notices of availability.
Inputs: docket_id (required), refresh.
search_docketsB
Search regulations.gov dockets by keyword. docket_type: 'Rulemaking' or 'Nonrulemaking' (FDA guidance dockets are Nonrulemaking). Returns docketId, title, docketType, lastModified.
Inputs: query (required), limit, agency, refresh, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Most tools have clear, distinct roles: search vs. get docket, list vs. get comment, list_documents vs. get_guidance_text, and diff_guidance are all separable. The only mild overlap is among the corpus trio (list_comments, build_corpus, export_corpus), which all touch comment data, though descriptions distinguish listing rows vs. populating cache vs. writing JSONL.
Consistent snake_case verb_noun pattern throughout: search_dockets, get_docket, list_documents, get_comment, list_comments, build_corpus, get_guidance_text, diff_guidance, export_corpus. Verbs (search/get/list/build/diff/export) map predictably to actions, and 'diff' is used as a clear verb form.
Nine tools sit comfortably in the well-scoped 3-15 range, and each covers a distinct step in the regulations.gov workflow (search, metadata, documents, comments, corpus build/export, guidance text/diff). No obviously redundant or filler tools.
Strong lifecycle coverage for docket exploration, comment collection, and guidance comparison, including caching and export. Minor gaps exist: there is no general document full-text fetch for non-guidance documents (e.g., Federal Register notices) beyond list_documents' file URLs, and no comment filtering/search by submitter or keyword.
Maintenance
Related MCP Connectors
Search and trace US federal rules across the Federal Register, eCFR, and Regulations.gov.
Official EUR-Lex, UK, US, and gazette search, metadata fetch, and change-only watches.
Read a CFR or eCFR section, or search US federal regulations and the Federal Register.
Search US federal rules, comment periods and US and UK bills, and watch topics and dockets.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables interaction with the Regulations.gov API to search federal rulemaking dockets, proposed and final rules, public comments, and comment periods. Supports tracking FAR/DFARS case histories and monitoring open comment periods across federal agencies with optional API key authentication for higher rate limits.MIT
- AlicenseNot gradedqualityCmaintenanceEnables access to federal regulatory dockets, documents, and public comments from Regulations.gov via tools like get_docket and get_comment.97 npmMIT
- AlicenseAqualityDmaintenanceProvides LLM-optimized access to FDA data through the OpenFDA API and direct regulatory decision document retrieval, covering all 21 OpenFDA endpoints plus 510(k) summaries, De Novo decisions, and PMA approvals.41MIT
- AlicenseAqualityCmaintenanceEnables LLM agents to search Regulations.gov federal dockets, retrieve docket abstracts and metadata, and list rulemaking documents, giving read access to federal regulatory data.4MIT