Repository avatar
AI Tools
v0.3.0
active

hhs-oig-exclusions-mcp-server

io.github.cyanheads/hhs-oig-exclusions-mcp-server

Screen people and businesses against the HHS OIG exclusion list (LEIE) by name, NPI, or UPIN.

Documentation

@cyanheads/hhs-oig-exclusions-mcp-server

Screen people and businesses on the HHS OIG LEIE by name, NPI, or UPIN. Browse active exclusions and retained reinstatements via MCP. STDIO or Streamable HTTP.

5 Tools • 1 Resource

Version License Docker MCP SDK npm TypeScript Bun

Install in Claude Desktop Install in Cursor Install in VS Code

Framework


Overview

The HHS Office of Inspector General's List of Excluded Individuals/Entities (LEIE), served from a local mirror of OIG's complete LEIE CSV and the linked monthly additions and reinstatement supplements. Screen a roster by name, NPI, or UPIN, browse active exclusions by state, category, exclusion type, effective date, or the month OIG added the row, browse retained reinstatements by supplement month or effective date, and check which edition the mirror holds. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above. Coverage excludes state Medicaid lists, SAM exclusions, and CMS actions absent from the OIG feed. OIG downloads and supplements · OIG exclusions FAQ

A candidate or an empty result cannot establish identity or clearance. Screen aliases and former names as separate entries, verify a candidate's identity by SSN or EIN in the official OIG Online Searchable Database, and keep SSNs and EINs out of tool inputs. OIG Quick Tips

Tools

ToolDescription
oig_screen_nameScreen people and businesses by name, with match evidence and corroboration for each candidate
oig_screen_identifierLook up exact NPIs, UPINs, or exclusion IDs returned by the server
oig_search_exclusionsBrowse and count active exclusions by state, category, exclusion type, party type, effective date, and action month
oig_search_reinstatementsBrowse and count retained reinstatements by supplement month, effective date, state, category, exclusion type, or party type
oig_list_referenceRead exclusion codes, category labels, reinstatement and waiver guidance, screening guidance, and mirror status

Resources

ResourceDescription
LEIE screening and monitoring guideFollow a roster across batches and candidate pages, or review the additions and reinstatements OIG published in a covered month. Available at skill://hhs-oig-exclusions-guide/SKILL.md.

Capability reference

oig_screen_name tool

  • parties entries are { kind: "individual", first_name, last_name } or { kind: "entity", name }; optional middle_name and birth_year (individuals), state, and npi corroborate a hit without filtering or ranking it. Screens the first 25 and returns the rest in deferred with their original index. Pass deferred unchanged as the next call's parties to preserve those positions.
  • Standard mode returns all strict hits on the first page and up to ten fuzzy hits per page. Individual prefix mode requires a full-detail mirror and accepts a first name, last name, or both. Pass a party's next_offset as that same party's offset until it is null. total counts all active candidates. fuzzy_capped and prefix_capped indicate more candidates in their respective modes.
  • Each entry is screened or refused with a typed reason. Hits carry the matching fields, mode, similarity where available, and per-field corroboration. For middle names, initial_match distinguishes an agreeing initial from a full-name match. Other outcomes are match, mismatch, not_on_file, and not_supplied. Exact name matches in the retained reinstatement supplements appear separately in reinstated.

oig_screen_identifier tool

  • identifiers entries are { type, value }: npi (ten digits with a valid CMS check digit), upin (five or six letters or digits), or exclusion_id (16 hexadecimal characters from an earlier result). Send values as strings to keep leading zeros. Looks up the first 100 and returns the rest in deferred. Pass deferred unchanged as the next call's identifiers to preserve roster positions.
  • Each result's status is listed, reinstated, not_found, or invalid, with every matching active row in exclusions and supplement rows in reinstated
  • One exclusion ID can cover several rows, and it can change after an OIG source correction or once its supplement leaves the mirror. If a held ID stops resolving, screen the name again

oig_search_exclusions tool

  • Filters combine with AND: state (US postal abbreviation), category (a GENERAL or SPECIALTY label; for a longer label, the first 20 characters with trailing spaces removed must equal a published label), exclusion_type (a published code or its unambiguous statutory citation, such as 1128(b)(4)), kind (individual or entity), and inclusive excluded_from / excluded_through dates (YYYY-MM-DD). oig_list_reference lists the labels and codes; one absent from the release fails as unknown_category or unknown_exclusion_type
  • Use added_in (YYYY-MM) to find current rows attributable to a retained monthly additions supplement. The effective date can fall in a different month. Choose a month from oig_list_reference → mirror_status.addition_months. A month outside that coverage returns addition_month_unavailable. Active records omit added_in when no retained supplement unambiguously identifies the row.
  • limit defaults to 25 and caps at 100, newest effective date first. Pass next_offset and the preceding page's snapshot_id to continue. If the snapshot changes, the call fails as snapshot_changed; restart at offset zero without an ID. An empty page's notice says why: the offset is past the last row, every match is an individual withheld by redaction, or no row matches every filter
  • entities_total and individuals_total count matches before paging. With default redaction, pages list entities only; individuals still count toward individuals_total, and name and identifier screening still return redacted individual candidates

oig_search_reinstatements tool

  • Choose supplement_month from mirror_status.supplement_months to find rows OIG published in that file. Use reinstated_from and reinstated_through for an inclusive window on the effective reinstatement date. These dates can fall outside the supplement month.
  • Combine the date filters with state, category, exclusion_type, or kind. Use oig_list_reference with dataset: "reinstatements" for labels and codes in retained supplements. Each row links to its source file.
  • Continue with the same filters, next_offset, and snapshot_id. Redacted pages list entities and count matching individuals. Verify a candidate’s identity and current status with OIG.

oig_list_reference tool

topicReturns
exclusion_typesPublished codes with authority, statutory scope and baseline period where known.
categoriesPublished GENERAL and SPECIALTY labels with counts per source column. Use category_query for a substring and category_prefix for a prefix. Both are case-insensitive and combine with AND.
reinstatement_and_waiverInterpretation and official verification links for both forms of evidence.
screening_guidanceOIG verification, screening cadence, and coverage limits.
mirror_statusReadiness, coverage dates, row counts, retained additions and reinstatement months, and refresh status.
  • categories and exclusion_types default to active data. Select dataset: "reinstatements" for retained supplement counts and codes. Dataset-specific categories and retained codes require an imported edition. The default authority catalog and guidance remain available before import, and mirror_status reports ready: false.

Features

Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.

LEIE-specific:

  • Local SQLite mirror built and maintained by the hhs-oig-exclusions-mirror CLI (init, refresh, verify), so tool calls never contact OIG. Under HTTP the server re-checks OIG once a day after the first import; over stdio it serves the stored edition until the operator runs refresh
  • Each refresh revalidates every file with conditional requests and publishes a complete edition in one SQLite transaction. An edition that changes mid-download is retried, an active file whose raw row count moves more than 2% from the held edition is refused, and a failed check keeps the last completed edition
  • Name comparisons fold case, accents, and punctuation, drop trailing generational suffixes and business designations, and use OIG's field widths (last name 20, first and middle 15, business 30 characters). Individual screening recognizes complete tokens in multi-word given names (first_name_part), compound surnames, given names split across the published first and middle fields, and a person listed under a first initial who uses their middle name. Fuzzy field comparisons use a Jaro–Winkler threshold of 0.88, with a separate rule for a matching first initial. Business names allow an optional leading THE, match & with AND, and recognize dotted and spaced forms of trailing legal designations. Candidates containing every query word rank ahead of other fuzzy business matches. A longer name beginning with a full-width published business name can return a strict name_truncated hit.
  • Redaction on by default: the redacted mirror never stores a full birth date, street address, ZIP, or an individual's city (birth year, state, and a business's city remain), and results are redacted again when served. OIG_REDACT_PII=false selects a separate full-detail database. Screening inputs are scrubbed from logs by field name, and failed-call payload logging is forced off
  • Exclusion codes decode to statute, description, statutory baseline period, and program scope, each with a source URL and marked documented, interpreted, or unknown; §1128 scope follows each row's effective date

Agent-friendly output:

  • Edition on every dataset result: list_as_of, actions_through, snapshot_id, and pii_redacted, plus a freshness_notice when the last refresh failed or the expected monthly edition is overdue
  • Screening returns evidence for review: match details on every hit, future_effective for an effective date still ahead, a waiver object or null, and reinstatement rows kept apart with their supplement_month and source URL. Every screen carries a notice or guidance string that points to OIG verification. Waiver fields and statutory periods alone cannot establish current eligibility (OIG waivers · OIG exclusion authorities)
  • Graceful partial failure: entries past the batch size return in deferred with their original positions, and a bad entry gets its own refused row (typed reason plus recovery notice) or invalid identifier row (with guidance) while the rest of the batch completes. Mirror failures are typed (mirror_not_ready, mirror_unavailable, snapshot_changed) and carry a recovery hint

Getting started

Connect to the hosted instance, no install:

claude mcp add --transport http hhs-oig-exclusions-mcp-server https://hhs-oig-exclusions.caseyjhand.com/mcp

Or run it locally. Requires Node.js 24+ or Bun 1.4.4+; no API key is needed. Initialize the mirror from a terminal before the first call, as the same user that launches your MCP client:

npx --yes --package @cyanheads/hhs-oig-exclusions-mcp-server hhs-oig-exclusions-mirror init
# or with Bun
bunx --bun --package @cyanheads/hhs-oig-exclusions-mcp-server hhs-oig-exclusions-mirror init

Then add it to Claude Code:

claude mcp add hhs-oig-exclusions-mcp-server -- npx -y @cyanheads/hhs-oig-exclusions-mcp-server

For other clients, add this to the MCP config file:

{
  "mcpServers": {
    "hhs-oig-exclusions-mcp-server": {
      "command": "npx",
      "args": ["-y", "@cyanheads/hhs-oig-exclusions-mcp-server"]
    }
  }
}

The Claude Desktop bundle needs the same initialization first. Leave Mirror directory blank and Redact personal information at true for the defaults, or enter the absolute path and mode you gave the CLI.

Call oig_list_reference with {"topic":"mirror_status"} and confirm ready: true before screening. Rerun the CLI with refresh for a newer edition or verify to check the local snapshot without downloading. For Streamable HTTP, set MCP_TRANSPORT_TYPE=http and connect to http://127.0.0.1:3010/mcp. For Docker or a source build, see Running the server.

Configuration

VariableDescriptionDefault
OIG_MIRROR_DIRMirror directory shared by the CLI and the server. The default is hhs-oig-exclusions-mcp-server under ~/Library/Caches on macOS, %LOCALAPPDATA% (or ~/AppData/Local) on Windows, and an absolute $XDG_CACHE_HOME (or ~/.cache) elsewhere. A relative path resolves against each process's working directory, so use an absolute one.OS user cache
OIG_REDACT_PIIfalse, 0, no, off, n, or disabled (any case) selects the full-detail mirror for trusted local use, which needs its own init. An unrecognized value stops the server and the mirror CLI with an error.true
MCP_TRANSPORT_TYPETransport: stdio or http.stdio
MCP_HTTP_HOSTHTTP bind address.127.0.0.1
MCP_HTTP_PORTHTTP server port.3010
MCP_HTTP_ENDPOINT_PATHMCP endpoint path for HTTP./mcp
MCP_SESSION_MODEHTTP session mode: stateless, stateful, or auto.stateless
MCP_AUTH_MODEAuthentication: none, jwt, or oauth.none
MCP_LOG_LEVELLog level (debug, info, warning, error, etc.).info
LOGS_DIRDirectory for log files (Node.js only).<app-root>/logs

See .env.example for every server setting and the common framework overrides.

For self-managed instances, set MCP_USAGE_REPORTING=true to send a summary of tool-call counts, failure kinds, and latency buckets to https://telemetry.cyanheads.com/v1/reports daily and at shutdown. Reports exclude screening inputs, results, and error messages. Set DO_NOT_TRACK=1 to disable reports or MCP_USAGE_REPORTING_ENDPOINT to use a different receiver.

Set the same OIG_MIRROR_DIR and OIG_REDACT_PII for the mirror CLI and the server. A client started outside your shell needs both in its server entry's env or the plugin settings:

export OIG_MIRROR_DIR="$HOME/leie-mirror"
export OIG_REDACT_PII=true
npx --yes --package @cyanheads/hhs-oig-exclusions-mcp-server hhs-oig-exclusions-mirror init
npx -y @cyanheads/hhs-oig-exclusions-mcp-server

On POSIX, the full-detail mirror refuses to open (unsafe_mirror_permissions) unless its directory and files are owned by the runtime user, grant no group or other access, and are not symlinks: keep the directory at 0700 and the database, refresh lock, and SQLite journal files at 0600, under trusted parent directories. After a restore that changes ownership or modes, stop every mirror process, fix them on the real directory and files, then run verify. On Windows, restrict access with filesystem ACLs.

Running the server

Local development

Requires Bun v1.4.4 or higher (or Node.js v24+).

  • Clone and install:

    git clone https://github.com/cyanheads/hhs-oig-exclusions-mcp-server.git
    cd hhs-oig-exclusions-mcp-server && bun install
    
  • Build, initialize the mirror, and run the production version:

    # One-time build and import
    bun run rebuild
    bun run dist/cli/mirror.js init
    
    # Run the built server
    bun run start:http
    # or
    bun run start:stdio
    
  • Run checks and tests:

    bun run devcheck  # Lints, formats, type-checks, and more
    bun run test      # Runs the test suite
    

Docker

docker volume create hhs-oig-exclusions-mirror
docker run --rm -v hhs-oig-exclusions-mirror:/usr/src/app/.mirror \
  ghcr.io/cyanheads/hhs-oig-exclusions-mcp-server:latest bun run dist/cli/mirror.js init
docker run --rm -v hhs-oig-exclusions-mirror:/usr/src/app/.mirror \
  -p 127.0.0.1:3010:3010 ghcr.io/cyanheads/hhs-oig-exclusions-mcp-server:latest

The image defaults to HTTP transport, stateless session mode, the redacted mirror at /usr/src/app/.mirror, and logs to /var/log/hhs-oig-exclusions-mcp-server; the server is then at http://127.0.0.1:3010/mcp. Use the same named volume for every run; for a manual refresh or verify, replace init in the first command. To run it over stdio from an MCP client, use "command": "docker" with "args": ["run", "-i", "--rm", "-v", "hhs-oig-exclusions-mirror:/usr/src/app/.mirror", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/hhs-oig-exclusions-mcp-server:latest"]. For full-detail mode, pass -e OIG_REDACT_PII=false on every run; the image creates the mirror directory as 0700 for its bun user, so a bind mount or a volume carried over from an earlier image needs the ownership and modes described under Configuration. To build locally, docker build -t hhs-oig-exclusions-mcp-server .; OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.

Project structure

DirectoryPurpose
src/index.tscreateApp() entry point; schedules the daily mirror refresh under HTTP.
src/cli/mirror.tsThe hhs-oig-exclusions-mirror CLI: init, refresh, and verify.
src/configOIG_MIRROR_DIR and OIG_REDACT_PII parsing, and the override that keeps failed-call payloads out of logs.
src/mcp-server/toolsTool definitions (*.tool.ts) and their shared output schemas.
src/services/leieName and identifier screening, discovery, and reference data.
src/services/mirrorOIG downloads, CSV validation, and SQLite snapshot publishing.
tests/Screening contract, mirror refresh, and stdio privacy tests.

Development guide

See CLAUDE.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for logging, ctx.state for storage
  • Register new tools in the createApp() arrays in src/index.ts, and add any new input field that can identify a person to the sensitive-field list there
  • Validate OIG rows on import → normalize → project to the output schema; never fabricate missing fields

Contributing

Issues are welcome. Use synthetic or redacted names and identifiers, and run checks and tests before submitting:

bun run devcheck
bun run test

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

NPM
@cyanheads/hhs-oig-exclusions-mcp-server
Install Command
npm install @cyanheads/hhs-oig-exclusions-mcp-server
Runtime: npx
NPM
@cyanheads/hhs-oig-exclusions-mcp-server
Install Command
npm install @cyanheads/hhs-oig-exclusions-mcp-server
Runtime: npx