All guides
Guide

Build a regulatory monitoring agent in Claude Code

A step-by-step build: wire Claude Code to Government Context's free MCP server and turn it into an agent that finds a federal rule, analyzes its public comments, and watches it for new activity.

Updated July 17, 2026

Keeping up with a federal rule by hand is tedious work. You check regulations.gov for the docket, skim whatever comments came in since last time, try to remember where things stood, and repeat it every week until the rule is final. It is exactly the kind of loop an agent should run for you.

This guide builds that agent in Claude Code. By the end you will have a working session that finds a rule, reads where its public comments stand, and subscribes you so you hear about new activity without checking again. Every step runs on the free tier of Government Context, so you can follow along without a card.

The agent leans on four tools from the Government Context MCP server (the server exposes twenty, reaching into bills, hearings, press releases, and grants — this build needs four). You never type those names. You ask in plain language and Claude picks them:

Before you start

You need two things: Claude Code installed, and the Government Context connector added to it.

If you have not connected the server yet, do that first. The one-time setup is a single command:

claude mcp add --transport http government-context https://mcp.governmentcontext.com

Then run /mcp inside Claude Code, choose government-context, and authenticate in the browser window that opens. The full walkthrough, including the free-account signup, is in how to give Claude access to federal rulemaking data. Come back here once /mcp shows the server connected.

What you'll build

One agent session that does four things in order:

  1. Finds a specific proposed rule from a plain-language description.
  2. Reports its stage and comment deadline so you know how much time is left.
  3. Summarizes the comment record: how many support versus oppose, and who is weighing in.
  4. Follows the docket so new comments come to you.

You can drive it one prompt at a time to see each step, or hand Claude the whole job at once. We will do it step by step first, then collapse it into a single prompt you can reuse.

Step 1: find the rule

Start a session in your project and describe the rule you care about:

Find the FMCSA proposed rule on broker transparency. Give me its docket and current stage.

Claude calls gc_search, matches the rule, and follows up with gc_get_rulemaking to read its details. You get back the docket id, the document title, the regulatory stage (proposed, final, and so on), and the comment deadline. If more than one rule matches, Claude shows the candidates and asks which one you mean, so you are not guessing at docket numbers.

This is the step that usually costs you a few minutes of searching regulations.gov by hand. Here it is one sentence.

Step 2: read where the comments stand

Now ask for the shape of the comment record:

Analyze the comments on that docket. How many support it versus oppose it, and what kinds of commenters are they?

Claude calls gc_analyze_comments, which returns a structured breakdown instead of raw text. That is the whole point of the tool, and it looks like this:

That last row matters most. A rule with tens of thousands of comments is usually not tens of thousands of opinions. It is a handful of form-letter campaigns plus a smaller set of substantive letters. The analysis separates the two, so a campaign does not read as overwhelming consensus when it is one organization's mailing list.

If you want to go deeper on one slice, just ask:

Show me the trade associations that oppose it, and summarize their main arguments.

Claude filters the comments to that group with gc_list_comments, reads a few in full with gc_get_comment, and summarizes the arguments with the commenters named, so you can check its work.

Step 3: put it on watch

The point of a monitoring agent is that you stop checking. Ask Claude to follow the rule:

Follow this docket and alert me weekly when new comments are posted.

Claude calls gc_follow, which ties a subscription to your Government Context account. New activity reaches you on the cadence you named, as an email digest. You can point follows at more than one docket, or at a whole topic, agency, organization, bill, legislator, or committee — and manage them the same way (gc_list_follows shows what you're watching; gc_unfollow stops one).

If you would rather pull than wait, ask "what's happened on this docket since last week?" — Claude runs gc_list_activity, which scoped to one docket returns its complete recent history, and scoped to an agency or topic returns the tracked feed across rulemaking, press releases, grants, and bill actions.

Collapse it into one prompt

Once you have seen the steps, you rarely run them separately. Hand Claude the whole job in one message:

Find the FMCSA broker-transparency rule. Tell me its stage and comment deadline, break down where the public comments stand so far (support versus oppose, and by what kind of commenter), flag whether the opposition is mostly a form-letter campaign or substantive letters, and then follow the docket so I get a weekly update on new comments.

Claude runs the same four tools in sequence and gives you one briefing plus a live subscription. That single prompt is the monitoring agent. Save it, change the rule name, and reuse it for anything you track.

Free vs. paid

Free is one release cycle behind.

The free tier gives you search, rule and bill details, comment reading, basic filters, the corpus overview, daily or weekly follows, and 100 tool calls per hour. Public comments and other continuously updated sources become visible after a seven-day delay. Everything in this guide runs on it.

The paid plan ($500/mo per organization, currently labeled "Beta pricing") adds current data with no delay, federal grant opportunities, the latest lobbying and political-giving periods, the deeper analytics (campaign and issue drill-downs, the position map), instant alerts, team seats, and 1,000 tool calls per hour. When a limit applies, the server says what a paid plan would add rather than failing, so Claude can tell you what you are missing.

To connect, run claude mcp add --transport http government-context https://mcp.governmentcontext.com and sign in with a free Government Context account. You don't need a card.

Start tracking the rules that matter to you

Browse the full rulemaking record for free, or unlock the comment Explorer and alerts on your documents, topics, and agencies.