# api-governance [Health: Active]

**Category:** 🤝 Agreements & Coordination  
**Repository:** https://github.com/coderifts/api-governance  
**GitHub Stars:** 0  
**npm Downloads (last month):** 4697  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/api-governance-2

## Description
Contract-change authorization for AI agents. Signed receipts verify offline.

## Tools
Capabilities this server exposes over MCP:

- **preflight_change_set** — Preflight a complete base→head change set of contract artifacts. Returns risk score and breaking-change analysis. With `preflight_mode: "authorize"` (and `context.operation`), returns a governance decision (ALLOW / WARN / REQUIRE_APPROVAL / BLOCK) and may mint a signed chain-receipt. With `prefligh…
- **verify_receipt** — Verify a signed chain-receipt you already hold: signature authenticity, body binding, and (when lifecycle indices are available) whether it is currently authorized for a stated operation/target. Requires `token`. Does not re-diff specs.
- **get_decision_details** — Retrieve a past decision by `decision_id` (preferred) or `fingerprint`: stored report, breaking changes, scores, and linked receipt metadata if present. Not for a new analysis of the current change set.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "api-governance": {
    "command": "npx",
    "args": ["-y","coderifts"],
    "env": {
      "CODERIFTS_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `CODERIFTS_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What the api-governance MCP server does

The api-governance MCP server governs changes to contract artifacts. It accepts a complete base-to-head change set and produces a report containing risk scoring and breaking-change analysis. When invoked in authorization mode with an operation in the context, it can turn that analysis into one of four outcomes: ALLOW, WARN, REQUIRE_APPROVAL, or BLOCK.

An authorization may include a signed chain-receipt. The receipt connects the authorization, its single use, and the target state reached by the change. Its signature and body binding can be checked without relying on the service database. The decision also identifies what the authorization does not establish, which is relevant when interpreting a granted change.

## How it works

Call `preflight_change_set` with the full change set rather than asking the service to analyze only an isolated file or edit. A normal preflight returns the analysis. Passing `preflight_mode: "authorize"` and supplying `context.operation` requests a governance decision and may mint a receipt.

Use `verify_receipt` after receiving a receipt. The tool checks the signature and whether the receipt body matches its signed content. If lifecycle indices are available, it can also determine whether the receipt is currently authorized for the stated operation and target. Verification does not re-diff specifications, so it is not a replacement for a new preflight.

`get_decision_details` retrieves a previous result using `decision_id`, preferably, or `fingerprint`. It returns the stored report, breaking-change data, scores, and related receipt metadata when present. It is intended for looking up an existing decision, not for analyzing a newly changed set.

## Setup and configuration

The hosted Streamable HTTP endpoint is `https://app.coderifts.com/mcp`. Configure an MCP client with that URL and an `Authorization: Bearer <YOUR_CODERIFTS_API_KEY>` header. The key is needed for authorization and can be obtained from the service signup endpoint at `https://app.coderifts.com/api/signup`.

Claude Code users can install the marketplace plugin, which wires the hosted endpoint and exposes the three tools. Cursor and Codex packages use the same hosted MCP and tool set. For VS Code and GitHub Copilot, the repository provides generated configuration paths for the relevant Copilot surfaces; `npx coderifts copilot-setup` writes the setup, while `npx coderifts agent-setup` writes agent-host instructions.

The repository also documents JavaScript and Python SDK installation through `@coderifts/sdk` and `coderifts-sdk`. Its published MCP manifest is available at `https://coderifts.com/mcp.json`, and the official registry identifier is `io.github.coderifts/api-governance`.

## Tools and capabilities

- `preflight_change_set`: analyzes a complete contract-artifact change set and, in authorization mode, returns a decision and possibly a signed receipt.
- `verify_receipt`: validates a held receipt's signature and body binding, with optional current-authorization checks from lifecycle indices.
- `get_decision_details`: retrieves stored decision reports and associated receipt information by decision ID or fingerprint.

The api-governance MCP server is designed for fail-closed change gates: downstream automation can require a grant before allowing a contract change to proceed. Its receipts provide an offline-verifiable record of what was authorized, while the decision report supplies the risk and breaking-change context behind that result.

_Full upstream README: https://allmcps.com/mcp/api-governance-2/readme_

