Skip to main content
Glama
Federal Register MCP

Federal Register MCP

by anblanco
README.md
# Federal Register MCP

An MCP server that syncs Executive Orders from the [Federal Register API](https://www.federalregister.gov/developers/api/v1), stores them in a local SQLite database with full-text search, and exposes query tools for Claude Code and other MCP clients.

Provides structured access to presidential executive actions published in the Federal Register, with full-text search and filtering through natural language via Claude.

## What it does

- Syncs all presidential executive orders, proclamations, and memoranda signed since January 20, 2025
- Stores full text, metadata, and Federal Register citations in a local SQLite database
- Provides full-text search with BM25 ranking across titles and document bodies
- Exposes five MCP tools that Claude can call directly during conversation

### MCP Tools

| Tool | Description |
|------|-------------|
| `sync_executive_orders` | Fetch latest documents from the Federal Register API (incremental or full) |
| `list_executive_orders` | List documents with filters (date range, keyword, subtype) and pagination |
| `get_executive_order` | Retrieve full text by ID, document number, EO number, or title match |
| `search_executive_orders` | Full-text search with FTS5 boolean operators, phrase matching, and prefix search |
| `get_executive_order_summary` | Database statistics: counts by month/subtype, word count averages, recent actions |

## Requirements

- **Node.js 25+** (uses built-in `node:sqlite` — no native database dependencies)
- **npm**

## Installation

### Option A: npm (recommended for Claude Code users)

```bash
npm install -g federal-register-mcp
federal-register-sync
```

### Option B: Clone

```bash
git clone https://github.com/anblanco/FederalRegisterMCP.git
cd FederalRegisterMCP
npm install
npm run sync
```

The initial sync fetches all document metadata and full text from the Federal Register API. Takes a few minutes on first run. Subsequent runs are incremental (only fetches new/missing documents).

## Usage

### As an MCP server (Claude Code)

Add to your Claude Code MCP configuration (`.mcp.json` in your project root or `~/.claude.json`):

```json
{
  "mcpServers": {
    "federal-register-mcp": {
      "command": "npx",
      "args": ["federal-register-mcp"]
    }
  }
}
```

If running from a local clone instead:

```json
{
  "mcpServers": {
    "federal-register-mcp": {
      "command": "npx",
      "args": ["tsx", "src/entry/start.ts"],
      "cwd": "/absolute/path/to/FederalRegisterMCP"
    }
  }
}
```

Then ask Claude things like:
- "Search executive orders about energy policy"
- "List all executive orders signed in February 2025"
- "Get the full text of EO 14154"
- "Sync the latest executive orders"
- "Show me a summary of all executive actions"

### As a CLI

```bash
npm run sync            # Incremental sync (skip docs with full text)
npm run sync:force      # Full re-sync of all documents
npm run stats           # Show detailed statistics
npm run start           # Start MCP server (stdio transport)
```

## Data Source

All data comes from the [Federal Register API](https://www.federalregister.gov/developers/api/v1), the official daily journal of the United States government. Document full text is fetched from the Federal Register's raw text endpoint — no HTML parsing required.

## License

[MIT](LICENSE)

TDQS

A3.9/5.0

Scored across 5 tools

Disambiguation4/5

Each tool has a distinct verb+scope: sync (write/ingest), list (filtered browse), get (single-record retrieval by multiple keys), search (local full-text boolean search), and summary (aggregate stats). The only mild overlap is list_executive_orders' keyword-in-title filter versus search_executive_orders' body-text search, but the descriptions make the boundary clear (metadata filtering vs ranked local full-text search).

Naming Consistency5/5

All names follow a consistent snake_case verb_noun pattern (sync_, list_, get_, search_, get_..._summary) on a single shared resource noun. No camelCase mixing, no vague standalone verbs, and the convention is immediately readable.

Tool Count5/5

Five tools cleanly cover ingestion, browsing, retrieval, search, and reporting for one document domain, with no redundant or vestigial tools. This is well within the ideal 3-15 range and each tool earns its place.

Completeness4/5

The read/ingest lifecycle is well covered (sync, list, get, search, stats), but there is no delete/prune or forced re-sync for individual documents, and no way to fetch related presidential document types (proclamations, notices) despite subtype metadata being tracked. These are minor gaps an agent can work around, not dead ends.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues