Skip to main content
Glama
haverAI

haver-governance-mcp

Official
by haverAI
README.md
# Haver Governance MCP

**Identity, permission, audit, and recall for healthcare AI agents, delivered over the Model Context Protocol (MCP).**

As organizations deploy more AI agents into clinical and operational workflows, the missing layer is governance: knowing which agent is acting, whether it is allowed to, having a tamper-evident record of what it did, and being able to revoke it. Haver Governance MCP gives any MCP-compatible client (such as Claude) a small set of tools to enforce and record that governance at runtime.

This is an open-source reference implementation from [Haver AI](https://haver.ai), the governance layer for healthcare AI.

## What it does

| Tool | Pillar | What it does |
| --- | --- | --- |
| `register_agent` | Identity | Registers an agent with a stable id, owner, role, and permission scopes. |
| `check_permission` | Permission | Decides whether an agent may take an action on a resource. Denies unknown or recalled agents. Logs the decision. |
| `record_action` | Audit | Appends a tamper-evident, hash-chained record of an agent action. |
| `get_audit_trail` | Audit | Returns recent audit entries, filterable by agent or resource. |
| `verify_audit_integrity` | Audit | Recomputes the hash chain and reports whether the log was tampered with. |
| `recall_agent` | Recall | Revokes an agent so every future permission check denies it. |
| `scan_phi` | Safety | Heuristically flags and redacts common PHI (SSN, MRN, email, phone, dates). |

Scopes use a simple `action:resource` form, for example `read:labs` or `write:notes`, and support `*` wildcards (`read:*`, `*:*`).

## Install

Run it directly with npx (no global install needed):

```bash
npx -y haver-governance-mcp
```

### Use it in Claude Desktop

Add this to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "haver-governance": {
      "command": "npx",
      "args": ["-y", "haver-governance-mcp"]
    }
  }
}
```

Restart Claude, and the seven governance tools appear.

## Example flow

1. `register_agent` an intake assistant with `scopes: ["read:labs"]`.
2. `check_permission` for `read` on `labs` returns `allow`; `write` on `notes` returns `deny`.
3. `record_action` logs each real action it takes, flagging `contains_phi` when relevant.
4. If the agent misbehaves, `recall_agent` revokes it; future checks deny.
5. `verify_audit_integrity` proves the log has not been altered.

## Data and privacy

All state is stored locally as plain files: agent records in `agents.json` and the audit log in `audit.log`, under `~/.haver-governance` by default (override with the `HAVER_GOV_DIR` environment variable). Nothing is transmitted anywhere. The audit log is append-only and hash-chained for tamper evidence. See [PRIVACY.md](./PRIVACY.md).

The `scan_phi` tool is a heuristic guardrail to catch obvious leaks. It is not a certified de-identification tool and should not be relied on as one.

## Development

```bash
npm install
npm run build
node dist/index.js   # runs on stdio
```

Requires Node.js 18 or later. Built with the official [`@modelcontextprotocol/sdk`](https://github.com/modelcontextprotocol/typescript-sdk) and [Zod](https://zod.dev).

## Publishing

This package is published to npm and listed in the official [MCP Registry](https://registry.modelcontextprotocol.io). See [PUBLISHING.md](./PUBLISHING.md) for the exact steps.

## About Haver AI

Haver AI is the governance layer for healthcare AI: identity, permission, audit, and recall for every agent your organization deploys. Learn more at [haver.ai](https://haver.ai).

## License

MIT. See [LICENSE](./LICENSE).

TDQS

A3.8/5.0

Scored across 7 tools

Disambiguation5/5

Each tool has a unique purpose: permission checking, audit trail retrieval, agent recall, action recording, agent registration, PHI scanning, and integrity verification. No two tools overlap or could be confused.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern (e.g., check_permission, register_agent, scan_phi) with imperative verbs and descriptive nouns. No mixing of styles or vague names.

Tool Count5/5

Seven tools is well-scoped for a governance server covering agent lifecycle, permissions, audit, and integrity. Each tool earns its place without being excessive or insufficient.

Completeness5/5

The tool surface covers core CRUD-like operations for agents (register, recall), permissions (check), audit (record, get, verify integrity), and adds a guardrail (scan_phi). No obvious gaps for the domain.

Maintenance

ActivityInactive
ResponsivenessNo issues