Skip to main content
Glama
hhs-oig-exclusions-mcp-server

hhs-oig-exclusions-mcp-server

by cyanheads
README.md
<div align="center">
  <h1>@cyanheads/hhs-oig-exclusions-mcp-server</h1>
  <p><b>Screen providers and businesses against HHS OIG exclusions by name, NPI, or UPIN via MCP. STDIO or Streamable HTTP.</b></p>
  <div>4 Tools</div>
</div>

<div align="center">

[![Version](https://img.shields.io/badge/Version-0.1.1-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/hhs-oig-exclusions-mcp-server) [![npm](https://img.shields.io/npm/v/@cyanheads/hhs-oig-exclusions-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/hhs-oig-exclusions-mcp-server)

[![Install in Claude Desktop](https://img.shields.io/badge/Install_in-Claude_Desktop-D97757?style=for-the-badge&logo=anthropic&logoColor=white)](https://github.com/cyanheads/hhs-oig-exclusions-mcp-server/releases/latest/download/hhs-oig-exclusions-mcp-server.mcpb) [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=hhs-oig-exclusions-mcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjeWFuaGVhZHMvaGhzLW9pZy1leGNsdXNpb25zLW1jcC1zZXJ2ZXIiXX0=) [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode:mcp/install?%7B%22name%22%3A%22hhs-oig-exclusions-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cyanheads%2Fhhs-oig-exclusions-mcp-server%22%5D%7D)

[![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-67E8F9?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)

</div>

---

## Overview

Screen a roster against the HHS Office of Inspector General's List of Excluded Individuals/Entities (LEIE), browse active exclusions, and check which releases the local mirror holds. The mirror uses OIG's complete LEIE CSV for active records and the listed monthly reinstatement supplements for historical evidence. Coverage excludes state Medicaid lists, SAM exclusions, and CMS actions absent from the OIG feed. [OIG downloads and supplements](https://oig.hhs.gov/exclusions/leie-database-supplement-downloads/) · [OIG exclusions FAQ](https://oig.hhs.gov/faqs/exclusions-faq/)

A candidate or an empty result cannot establish identity or clearance. Screen aliases and former names separately and verify candidate identities by SSN or EIN only in the official [OIG Online Searchable Database](https://exclusions.oig.hhs.gov/). Keep SSNs and EINs out of tool inputs. [OIG Quick Tips](https://oig.hhs.gov/exclusions/leie-quick-tips-instructions/)

### Tools

| Tool | Description |
|:---|:---|
| `oig_screen_name` | Screen individuals and businesses by name and review match evidence. |
| `oig_screen_identifier` | Look up an exact NPI, UPIN, or exclusion ID returned by the server. |
| `oig_search_exclusions` | Browse and count active exclusions by published attributes. |
| `oig_list_reference` | Read exclusion codes, category labels, verification guidance, and mirror status. |

## Capability reference

### `oig_screen_name` <sub>tool</sub>

- Send `parties` with `kind: "individual"`, `first_name`, and `last_name`, or `kind: "entity"` and `name`. Individuals accept optional `middle_name`, `birth_year`, `state`, and `npi`. Entities accept optional `state` and `npi`. These fields corroborate matches without filtering or changing rank.
- The default `match_mode: "standard"` returns all exact normalized matches and up to ten fuzzy candidates per party. Matching uses OIG name field lengths. The full-detail mirror also accepts individual `match_mode: "prefix"` with a first name, last name, or both and returns up to ten candidates. Reinstatement matches use exact normalized names in either mode.
- Screens the first 25 parties and returns remaining inputs in `deferred`. Each screened result reports the exact match total before applying the fuzzy or prefix cap.

### `oig_screen_identifier` <sub>tool</sub>

- Send `identifiers` as `{ type, value }` objects. Use `npi` for a checksum-valid ten-digit NPI, `upin` for a five- or six-character alphanumeric UPIN, or `exclusion_id` for a 16-character hexadecimal ID from a prior result. Use strings to preserve leading zeros.
- Looks up the first 100 identifiers, returns the rest in `deferred`, and returns all associated active and reinstatement rows for each identifier. If a saved exclusion ID disappears after a source correction or supplement expiry, screen the name again.

### `oig_search_exclusions` <sub>tool</sub>

- Combine optional `state` (US postal abbreviation), `category` (full GENERAL or SPECIALTY label), `exclusion_type` (published code), `kind` (`individual` or `entity`), and inclusive `excluded_from` and `excluded_through` dates (YYYY-MM-DD). List published labels and codes with `oig_list_reference`.
- `limit` defaults to 25 and caps at 100. `offset` defaults to zero. Pass `next_offset` and the preceding page's `snapshot_id` to continue. If the snapshot changes, restart at offset zero without an ID.
- Reports individual and entity totals before pagination. With default redaction, only entities appear as discovery rows. Individual counts remain available and name and identifier screening still return redacted candidates.

### `oig_list_reference` <sub>tool</sub>

| `topic` | Returns |
|:---|:---|
| `exclusion_types` | Published codes with authority, statutory scope and baseline period where known. |
| `categories` | Published GENERAL and SPECIALTY labels with counts per source column. Optional `category_prefix` matches the start of a label case-insensitively. |
| `reinstatement_and_waiver` | Interpretation and official verification links for both forms of evidence. |
| `screening_guidance` | OIG verification, screening cadence, and coverage limits. |
| `mirror_status` | Readiness, coverage dates, row counts, exact supplement months, and refresh status. |

### Reading results

Check `list_as_of` for the active file date and `actions_through` for the last day of the covered action month. Review any freshness notice before relying on a saved edition. Check `future_effective` and the effective date on an active row. Reinstatement evidence is limited to the supplements held by the mirror. Published waiver fields and statutory periods alone cannot establish whether a party is currently eligible. [OIG waivers](https://oig.hhs.gov/exclusions/waivers/) · [OIG exclusion authorities](https://oig.hhs.gov/exclusions/background-information-exclusion-authorities/)

## Getting started

Requires Node.js 24+ or Bun 1.4.4+. No API key is required. Initialize the mirror from a terminal before screening. Run either command as the same user that launches your MCP client.

```sh
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
```

For Claude Code, register the server with:

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

For other stdio clients, add this entry to your MCP client configuration:

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

For Claude Desktop, install the [MCPB bundle](https://github.com/cyanheads/hhs-oig-exclusions-mcp-server/releases/latest/download/hhs-oig-exclusions-mcp-server.mcpb) after initialization. With the default directory and redaction mode, leave **Mirror directory** blank and **Redact personal information** set to `true`. For a custom mirror, enter the same absolute path and redaction mode you passed to the CLI. The bundle uses Node.js 24+.

Call `oig_list_reference` with `{"topic":"mirror_status"}` and confirm `ready: true` before screening. Use the same CLI command with `refresh` to check for updates or with `verify` to check the local snapshot without downloading.

## Configuration

Set the same `OIG_MIRROR_DIR` and `OIG_REDACT_PII` for the mirror CLI and the MCP server. For a custom directory, set the variable for both processes or enter it in your client configuration. Use an absolute path when the client and CLI start in different working directories.

```sh
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
```

For a client started outside that shell, put the resolved directory and mode in the server entry's `env` or the equivalent plugin settings.

| Variable | Default | Purpose |
|:---|:---|:---|
| `OIG_MIRROR_DIR` | OS user cache | The default ends in `hhs-oig-exclusions-mcp-server` under `~/Library/Caches` on macOS, `%LOCALAPPDATA%` (or `~/AppData/Local`) on Windows, and absolute `$XDG_CACHE_HOME` (or `~/.cache`) on Linux. |
| `OIG_REDACT_PII` | `true` | Default redaction omits full DOB, street, ZIP, and individual city. Set `false` to select the full-detail database for trusted local use. Initialize that mode separately. |
| `MCP_TRANSPORT_TYPE` | `stdio` | Set to `http` for Streamable HTTP. |
| `MCP_HTTP_HOST` / `MCP_HTTP_PORT` | `127.0.0.1` / `3010` | HTTP bind address and port. |
| `MCP_HTTP_ENDPOINT_PATH` | `/mcp` | MCP URL path for HTTP. |
| `MCP_AUTH_MODE` | `none` | HTTP authentication mode. See [`.env.example`](./.env.example) for JWT settings. |
| `MCP_LOG_LEVEL` | `info` | Minimum log level. |

Stdio serves the stored edition until the operator runs `refresh`. HTTP checks daily after the first import. A failed check retains the last completed edition and reports its freshness in subsequent results.

Full-detail mode on POSIX requires a dedicated mirror directory owned by the runtime user with mode `0700`. Keep the full-detail database, refresh lock, and any SQLite journal sidecars owned by that user with mode `0600`. Use regular files, a real directory, and trusted parent paths. If a restore changes permissions or introduces symlinks, stop all mirror processes, restore ownership and permissions on the real directory and files, then run `verify`. On Windows, restrict access with filesystem ACLs.

## Running the server

### Terminal

```sh
npx -y @cyanheads/hhs-oig-exclusions-mcp-server
bunx --bun @cyanheads/hhs-oig-exclusions-mcp-server
```

Set `MCP_TRANSPORT_TYPE=http` before running either command to use Streamable HTTP at `http://127.0.0.1:3010/mcp`.

### Docker

Use the same named volume for initialization, serving, and any manual CLI operations. The image defaults to stateless HTTP and uses the redacted mirror.

For full-detail mode, the image creates the mirror directory with mode `0700` for its `bun` runtime user. With a bind mount or a volume carried over from an earlier image, apply the full-detail ownership and permission requirements to the mounted directory and files before starting the server.

```sh
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
```

Use `http://127.0.0.1:3010/mcp` from the host. For Docker over stdio, use `docker` as the client command and `["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"]` as its arguments. Replace `init` with `refresh` or `verify` in the first Docker run to maintain or inspect the mirror. If using full-detail mode, supply `-e OIG_REDACT_PII=false` consistently.

### Local development

```sh
git clone https://github.com/cyanheads/hhs-oig-exclusions-mcp-server.git
cd hhs-oig-exclusions-mcp-server
bun install
bun run rebuild
bun run dist/cli/mirror.js init
bun run start:stdio
```

Use `bun run start:http` for HTTP.

## Project structure

| Path | Purpose |
|:---|:---|
| `src/index.ts` | MCP entry point and HTTP scheduler lifecycle. |
| `src/cli/mirror.ts` | Operator commands for initializing, refreshing, and verifying the mirror. |
| `src/mcp-server/tools/` | Tool schemas and result formatting. |
| `src/services/leie/` | Matching, exclusion discovery, and reference data. |
| `src/services/mirror/` | OIG CSV ingestion and persistent SQLite snapshots. |
| `tests/` | Mirror, transport, and screening tests. |

See the [project tree](./docs/tree.md) and [developer protocol](./CLAUDE.md). Validate source rows before normalizing them and preserve missing fields as unknown.

## Contributing

Report bugs and feature requests through [GitHub issues](https://github.com/cyanheads/hhs-oig-exclusions-mcp-server/issues). Use synthetic or redacted examples.

```sh
bun run devcheck
bun run test
```

## License

[Apache-2.0](./LICENSE)