{"name":"io.github.coderifts/api-governance","slug":"coderifts-api-governance","title":null,"description":"Signed, offline-verifiable contract-change authorization. Only a granted change can proceed.","url":"https://mcp.market/server/coderifts-api-governance","rating":null,"grade":"B","score":84,"certified":false,"status":"active","category":"other","tags":[],"presence":{"score":23,"stars":0,"forks":0,"downloads_week":null,"last_push_at":"2026-10-03T19:49:59.000Z","license":"MIT"},"uptime":{"percent":100,"checks":28,"ok":28,"last_checked_at":"2026-11-05T08:25:36.146Z","last_ok_at":"2026-11-05T08:25:36.146Z","latency_ms":74},"claimed":false,"transport":"remote","callable_via_gateway":true,"default_price_micros":0,"repository":"https://github.com/coderifts/api-governance","website":"https://coderifts.com","version":"1.0.3","remotes":[{"type":"streamable-http","url":"https://app.coderifts.com/mcp","headers":[{"description":"Bearer <API key from https://coderifts.com>. X-API-Key is also accepted.","isSecret":true,"name":"Authorization"}]}],"packages":[],"tools":[{"name":"get_decision_details","description":"Retrieve a PAST CodeRifts decision by exactly one identifier\n(case_id | decision_id | fingerprint): full report, breaking changes, scores,\nand linked receipt metadata if stored.\n\nUse this when:\n- You have a decision_id (or fingerprint) from a previous preflight, PR\n  comment, or CI log and need to inspect or explain that past decision.\n- You are auditing why a prior ALLOW/WARN/BLOCK was issued.\n- You are NOT requesting a new analysis of current before/after specs.\n\nDo not use when:\n- You need a decision for the CURRENT uncommitted or PR head change set —\n  call coderifts.preflight_change_set with the current artifacts.\n- You hold a receipt token and only need cryptographic/lifecycle verification —\n  use coderifts.verify_receipt.\n- You have no identifier — run preflight first to create one.\n\nInputs: exactly one of case_id, decision_id, or fingerprint. {} → INVALID_INPUT;\ntwo identifiers → LOOKUP_IDENTIFIER_CONFLICT; case_id → CASE_NOT_FOUND\n(lookup never opens a case). Returns the stored document or not_found.\n\nScoping — fingerprint lookup returns only YOUR OWN decisions. A fingerprint is\nderived from content, not from an account, so two callers who preflight\nbyte-identical specs derive the same one; the lookup is therefore constrained\nto the decisions your credential can prove it owns.\n\nA decision that exists but is not yours returns the SAME not_found as one that\nwas never issued. This is deliberate: a distinguishable \"exists but forbidden\"\nwould confirm to any caller that a given content hash had been decided on by\nsomeone, which is the fact the scoping exists to withhold. Do not read\nnot_found as proof that no such decision exists anywhere.\n\nDecisions persisted without context.repository cannot currently be attributed\nto an account, and are not retrievable by fingerprint at all — not by their\nowner either. Retrieve those by decision_id, which is unchanged and unscoped.\nThis is a limitation of what older stored rows carry, not a property of the\nlookup: rows written from now on record the account directly, so the gap\nnarrows as older rows age out. If a fingerprint you expect returns not_found,\nuse the decision_id before concluding the decision is missing.\n\nWhen the stored envelope carries control fields, control_envelope.next_agent_step\nis structured remediation guidance the agent MAY follow for non-CONTINUE\nexecution_action values (null on CONTINUE*). Still branch on execution_action;\nnext_agent_step is a suggestion, not permission.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"case_id":{"type":"string","minLength":1,"description":"A case identifier. Lookup never opens a case. Until the case store exists this returns CASE_NOT_FOUND."},"decision_id":{"type":"string","minLength":1,"description":"The decision_id from a prior decision_result envelope. Provide exactly one identifier."},"fingerprint":{"type":"string","minLength":1,"description":"A verdict fingerprint (sha256:...); returns the latest matching decision you own. Provide exactly one identifier."}},"description":"Closed exclusive identifier union: exactly one of case_id | decision_id | fingerprint. Encoded as minProperties=1 + maxProperties=1 + additionalProperties=false, NOT as a top-level oneOf/anyOf/allOf — Anthropic (and other strict tool APIs) reject those combinators at the root of input_schema and then refuse the entire tools array (measured: test/mcp-input-oneof-honesty.test.js, mcp-streamable.js comment). The server enforces the same mutex with named codes: empty {} → INVALID_INPUT; two or more identifiers → LOOKUP_IDENTIFIER_CONFLICT; case_id alone → CASE_NOT_FOUND (no case store yet; lookup never opens a case).","minProperties":1,"maxProperties":1,"additionalProperties":false}},{"name":"preflight_change_set","description":"Use this when: a contract artifact (OpenAPI, GraphQL, protobuf, AsyncAPI, MCP manifests, or agent tool schemas) changes before merge, deploy, publish, or tool registration; AND any agent-executed operation with no supported contract type — send type agent_operation. Do not call for documentation-only changes, static readiness scoring, or receipt verification. Use analyze for risk only; authorize requires context.operation. Skipping this call is not permission. Absence of a key is not permission. Inputs: preflight_mode is required: \"analyze\" (risk only; no receipt, no execution_action) or \"authorize\" (may mint a receipt; requires context.operation — merge is not deploy is not publish). Supply exactly one artifact source: artifacts[] (1–20 items, each {id, type, before, after} as the FULL spec/schema text, not a path or URL; type is openapi|graphql|grpc|asyncapi|mcp_manifest|agent_tools|agent_operation) XOR derivation=\"server\" (server reads GitHub Compare; needs context.repository + context.base + context.head; sending artifacts[] together is 400). Grant fields sit in one object, execution_grant_request {include_execution_grant, grant_version, tenant_id, executor_id, adapter_id, target_uri, expected_state_token, state_nonce, audience, policy_hash}; analyze ignores it; required is preflight_mode only. previous_receipt is a chain token base64url(body).base64url(signature) to LINK a prior decision — it does not re-verify; use coderifts.verify_receipt instead; for details of a past decision use coderifts.get_decision_details instead. idempotency_key replays authorize only (24h), never analyze.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"artifacts":{"type":"array","description":"1–20 contract documents analyzed together. Each item is {id, type, before, after} where before/after are the FULL document strings (YAML/JSON/proto text), not URLs or file paths. Omit this array entirely when derivation=\"server\".","minItems":1,"maxItems":20,"items":{"type":"object","properties":{"id":{"type":"string","description":"Caller-chosen id, unique within the bundle"},"type":{"type":"string","enum":["openapi","graphql","grpc","asyncapi","mcp_manifest","agent_tools","agent_operation"],"description":"Artifact kind. One of openapi, graphql, grpc, asyncapi, mcp_manifest, agent_tools, agent_operation. Contract types determine how before/after text is parsed. agent_operation: An opaque proposed agent operation for which no supported contract-artifact type applies. CodeRifts does not semantically analyze this content and does not issue an execution grant. Not inferred from the filename."},"before":{"type":"string","description":"The baseline document as raw text (the spec/schema/manifest body). Empty string means \"no prior version\" (create), not \"load from disk\"."},"after":{"type":"string","description":"The proposed document as raw text, same kind as before. Must be the bytes you intend to merge/deploy/publish, not a diff."}},"required":["id","type","before","after"]}},"context":{"type":"object","description":"Optional apply-site context folded into the bundle fingerprint. operation distinguishes merge vs deploy vs publish (and other labels); the server accepts any non-empty string; conventional values: merge, deploy, tool_call, publish. The receipt/gate must match this label.","properties":{"operation":{"type":"string","description":"Application operation for this change set (fingerprint + envelope). Server accepts any non-empty string; conventional values: merge, deploy, tool_call, publish. Merge is not deploy is not publish — the receipt/gate must match this label."},"environment":{"type":"string","description":"Target environment (e.g. production, staging, npm) — optional; folded into fingerprint when set."},"repository":{"type":"string","description":"Repository identity (optional; fingerprint context)"},"branch":{"type":"string","description":"Branch name (optional; fingerprint context)"},"pull_request":{"description":"Pull request id when applicable (optional; fingerprint context)","oneOf":[{"type":"string"},{"type":"number"}]},"policy_profile":{"type":"string","description":"Policy profile name (optional; fingerprint context)"},"base":{"type":"string","description":"Base commit/ref SHA the change set was computed against (optional; PR/commit identity)"},"head":{"type":"string","description":"Head commit/ref SHA of the proposed change (optional; PR/commit identity)"},"target_id":{"type":"string","description":"Optional apply-site target (IntentContext parity; not folded into the bundle fingerprint)"},"target_uri":{"type":"string","description":"Optional apply-site URI the cr.exec.v2 grant binds (handler fallback: input.target_uri, then context.target_uri, then repository/head-derived). Distinct from target_id."},"fingerprint":{"type":"string","description":"Optional change fingerprint (IntentContext parity; not folded into the bundle fingerprint)"},"audience":{"type":"string","description":"Optional audience (IntentContext parity; REST/MCP accept, server-derived audience still wins on the envelope)"}}},"previous_receipt":{"type":"string","description":"Optional prior chain token to LINK this call into a receipt chain: base64url(body).base64url(signature). Linking is not verification — a linked token is not re-checked here; use verify_receipt."},"execution_grant_request":{"type":"object","description":"Authorize + include_execution_grant only: the execution-grant request fields. Analyze ignores them. Flat root-level spellings are also accepted; the same field sent both ways with different values is INVALID_INPUT.","properties":{"include_execution_grant":{"type":"boolean","description":"Authorize only. When true on an allow-class authorize, the response includes a signed execution_grant, or HTTP 503 SIGNER_UNAVAILABLE — never an unsigned grant. Default false. Analyze ignores this flag. Ignored unless preflight_mode=\"authorize\"."},"state_nonce":{"type":"string","description":"Authorize+grant only. Opaque nonce copied into the signed grant as its own field (not folded into scope_hash). Absent → BEARER grant. Ignored unless include_execution_grant is true."},"grant_version":{"type":"string","enum":["v1","v2"],"x-coderifts-effective-default":"v2","x-coderifts-default-changes-at":"2026-09-18","description":"Grant envelope to mint when include_execution_grant is true. Omitting this yields cr.exec.v1 until 2026-09-18 and cr.exec.v2 on and after it (see x-coderifts-effective-default / x-coderifts-default-changes-at). The response meta.grant_version is the version actually issued. An explicit value always wins — pin \"v1\" to keep current behaviour with no code change on the date."},"tenant_id":{"type":"string","description":"Authorize+grant v2 only. Tenant the grant is issued under. ASCII slug. When omitted the server uses \"default\" — pin it if you are not on the default tenant."},"executor_id":{"type":"string","description":"Authorize+grant v2 only. Executor identity the grant is bound to (example: agent:ci-bot, host:github-actions). Empty/absent is not \"any executor\"."},"adapter_id":{"type":"string","description":"Authorize+grant v2 only. Adapter that will apply the change. Conventional values: fs, postgres, git. Must match the adapter the executor actually uses; a git grant does not authorize an fs write."},"target_uri":{"type":"string","description":"Authorize+grant v2 only. URI the grant binds (example: git://owner/repo.git/refs/heads/main). Fallback if omitted: context.target_uri, then repository/head-derived. Distinct from context.target_id."},"expected_state_token":{"type":"string","description":"Authorize+grant v2 only. Compare-and-swap token the executor must observe at apply time (the \"before\" state). Signed as its own field. Omit only if the adapter has no prior state; do not send a placeholder."},"audience":{"type":"string","description":"Requester identity for the decision envelope. Accepted here; the server-derived audience wins when both are present."},"policy_hash":{"type":"string","description":"Authorize+grant v2 only. Policy identity bound into the grant, sha256: + 64 hex. When supplied, apply must use that same policy; a different policy is a different grant."}}},"response_detail":{"type":"string","enum":["control","standard","full"],"description":"How much of the response to return. control = the fields an agent branches on; standard = control + the human report and labelled break rows (the MCP default); full = everything (the REST default). Every value is copied from the full response."},"idempotency_key":{"type":"string","description":"Optional client key; in authorize mode, a repeat with the same key + body replays the original decision (24h). Analyze responses are not replayed."},"preflight_mode":{"type":"string","enum":["analyze","authorize"],"description":"REQUIRED. \"analyze\" = informational risk only (no decision/execution_action/safe_for_agent; analysis_outcome + may_execute:false). \"authorize\" = operation-bound path; may mint a receipt (requires context.operation). Decision Spec 2.0: omission is INVALID_INPUT. Do not pin 1.0 — that pin retired."},"decision_spec_version":{"type":"string","enum":["2.0"],"description":"Optional. Omit or '2.0' = current contract. '1.0' retired (INVALID_INPUT); do not pin 1.0."},"derivation":{"type":"string","enum":["server"],"description":"\"server\" = the server derives artifacts[] from GitHub Compare via the App installation. Allowed only when context.repository, context.base and context.head are all present and the tenant has a proven binding for that repository. Do not send artifacts[] in the same call (400 — one source of truth). Omit this field for the caller-supplied artifacts[] path."}},"required":["preflight_mode"],"if":{"properties":{"preflight_mode":{"const":"authorize"}},"required":["preflight_mode"]},"then":{"required":["context"],"properties":{"context":{"type":"object","required":["operation"],"properties":{"operation":{"type":"string","minLength":1}}}}}}},{"name":"verify_receipt","description":"Verify a CodeRifts signed chain-receipt you ALREADY HOLD: cryptographic\nauthenticity (signature + key id), body binding, and — when lifecycle indices\nare available — whether it is currently valid authorization (not expired,\nsuperseded, or revoked) for a stated operation/target.\n\nUse this when:\n- You already obtained a chain_receipt / receipt token from a prior preflight\n  (or CI artifact) and are about to act (merge/deploy) under that receipt.\n- A contract-gate or policy requires offline/online proof that the receipt is\n  authentic for this change before proceeding.\n- You must distinguish \"signature ok\" from \"currently authorized\" (stale or\n  superseded receipts must not be treated as live approval).\n\nDo not use when:\n- You do not have a receipt yet — call coderifts.preflight_change_set first.\n- You need a NEW decision for a changed base→head set — preflight again;\n  verify_receipt does not re-diff specs.\n- The receipt you hold binds a different operation or target than the one you\n  are about to perform — call coderifts.preflight_change_set with\n  context.operation set to that operation (a merge receipt does not authorize\n  a deploy); verify_receipt cannot re-scope or re-issue a decision.\n- You only need human-readable history of an old decision_id without a receipt\n  token — use coderifts.get_decision_details.\n- The change set itself is unknown or incomplete — fix the change set and\n  preflight; do not \"verify\" a placeholder.\n\nInputs: receipt token (required); target_id = decision_result.artifact_digest — required\nfor an authorization verdict; omitted → target_not_stated. Optional intended context\n(operation, environment, fingerprint, audience, repository/branch/pull_request, base/head)\nand the body_hash-bound decision_result envelope. 30s clock-skew leeway on expiry. A 0s\ngrace for declared destructive production operations is defined in the policy but\nis unreachable today: the intended-context schema has no destructive field, so\nnothing can declare one and the 30s leeway always applies.\nReturns { valid, status, currently_authorized (bool|null), reason, payload, authz_* }.\nBranch on currently_authorized; null = not evaluated.\n\nWhen a decision envelope is also in hand (e.g. from a prior preflight), its\ncontrol_envelope.next_agent_step (if present) is structured remediation guidance\nthe agent MAY follow after a non-CONTINUE decision — still branch on\nexecution_action; next_agent_step is suggestion, not permission.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"token":{"type":"string","description":"The chain receipt token (base64url(body).base64url(signature))"},"operation":{"type":"string","description":"Intended operation the receipt must authorize (conventional: merge|deploy|tool_call|publish). Triggers authorization evaluation when non-empty; supply decision_result for full scope binding."},"target_id":{"type":"string","description":"REQUIRED to authorize under a held receipt. Set it to decision_result.artifact_digest — the digest of the artifact the receipt was issued for, which you already hold in the decision_result you are passing. The server does NOT derive it for you: it carries YOUR intended apply-site, and taking it from the envelope would compare that document against itself. Omit it and the answer is currently_authorized false with authz_reason target_not_stated and authz_status VERIFIED_TARGET_NOT_STATED — a missing input, distinct from target_mismatch, which means the receipt covers a different target."},"environment":{"type":"string","description":"Intended environment (e.g. production) — must match the receipt"},"fingerprint":{"type":"string","description":"Intended change fingerprint — must equal the receipt fp"},"audience":{"type":"string","description":"Intended audience — must match the receipt"},"repository":{"type":"string","description":"Intended repository the receipt must bind (place binding; optional)"},"branch":{"type":"string","description":"Intended branch the receipt must bind (place binding; optional)"},"pull_request":{"description":"Intended pull-request id the receipt must bind (place binding; optional)","oneOf":[{"type":"string"},{"type":"number"}]},"base":{"type":"string","description":"Intended base commit/ref SHA the receipt must match (signed-wins vs envelope.base)"},"head":{"type":"string","description":"Intended head commit/ref SHA the receipt must match (signed-wins vs envelope.head)"},"decision_result":{"type":"object","description":"The body_hash-bound decision envelope (carries operation/target/decision). Required for a meaningful AUTHORIZATION evaluation of scope; without it, intended context alone fails closed on authorization (currently_authorized false) while signature status remains independent. Full schema: https://coderifts.com/schemas/decision-result.v1.consumer.json.","properties":{"spec_version":{"type":"string","pattern":"^decision-result\\.v1(\\.[0-9]+)?$"},"decision":{"type":"string","enum":["ALLOW","WARN","REQUIRE_APPROVAL","BLOCK"]},"execution_action":{"type":"string","enum":["CONTINUE","CONTINUE_WITH_MONITORING","REQUEST_APPROVAL","STOP"]},"safe_for_agent":{"type":"boolean"},"decision_id":{"type":"string"},"fingerprint":{"type":"string"},"input_fingerprint":{"type":"string"},"decision_body_hash":{"type":["string","null"]},"operation":{"type":["string","null"]},"environment":{"type":["string","null"]},"repository":{"type":["string","null"]},"base":{"type":["string","null"]},"head":{"type":["string","null"]},"audience":{"type":["string","null"]},"authority":{"type":["object","null"],"description":"Additive. { audience, tenant_scope: bound|unbound, binding_proven_at? }. Informational — not permission, not a verify-receipt gate, not an ACL."},"derivation":{"type":["object","null"],"description":"Additive. Present only when derivation:\"server\" produced this envelope. { source, platform?, base_sha, head_sha }. Covered by body_hash; not fingerprint."},"receipt":{"type":"object"},"expires_at":{"type":"string"},"blast_radius":{"type":"object","description":"Additive COUNTS (not a score). Not permission.","properties":{"endpoints":{"type":"integer","minimum":0},"fields":{"type":"integer","minimum":0},"params":{"type":"integer","minimum":0},"consumers_declared":{"type":"integer","minimum":0},"consumers_observed":{"type":"integer","minimum":0},"graph_source":{"type":"string"}}}},"additionalProperties":true}},"required":["token"],"description":"Two evaluation modes (schema-documented; no mode discriminator field). SIGNATURE: supply token only — signature + expiry; currently_authorized is null. AUTHORIZATION: also supply intended context (operation, environment, fingerprint, target_id set to decision_result.artifact_digest, audience, repository/branch/pull_request, and/or base/head) AND the body_hash-bound decision_result envelope so currently_authorized / authz_status / authz_reason can be evaluated. Token alone is always accepted; omitting the envelope when context fields are present yields a signature verdict plus fail-closed authorization (currently_authorized false), not a schema reject."}}],"scan":{"score":84,"grade":"B","scanned_at":"2026-10-03T21:43:36.929Z","report":{"scannerVersion":"0.1.10","scannedAt":"2026-10-03T21:43:36.911Z","components":{"code":{"score":-1,"max":25,"notes":["remote-only server, no package to scan"]},"reliability":{"score":20,"max":20,"notes":["remote reachable in 906ms"]},"poisoning":{"score":13,"max":15,"notes":["3 tool descriptions checked"]},"auth":{"score":8,"max":15,"notes":["API key sent as a header"]},"maintenance":{"score":15,"max":15,"notes":["last push 0 days ago"]},"identity":{"score":7,"max":10,"notes":["registry namespace matches repository owner"]}},"findings":[{"id":"poison.long-description","severity":"low","component":"poisoning","title":"Unusually long tool description (over 2,000 characters)","evidence":"tool verify_receipt: …Verify a CodeRifts signed chain-receipt you ALREADY HOLD: cryptographic authenticity (signature + key id), body binding, and — when lifecycle indices are available — whether it is currently valid authorization (not expired, superseded, or revoked) for a stated operation/target. Use this when: - You already obtained a chain_receipt / receipt token from a prior preflight (or CI artifact) and are about to act (merge/deploy) under that receipt. - A contract-gate or policy requires offline/online proof that the receipt is authentic for this change before proceeding. - You must distinguish \"signature ok\" from \"currently authorized\" (stale or superseded receipts must not be treated as live approval). Do not use when: - You do not have a receipt yet — call coderifts.preflight_change_set first. - You need a NEW decision for a changed base→head set — preflight again; verify_receipt does not re-diff specs. - The receipt you hold binds a different operation or target than the one you are about to perform — call coderifts.preflight_change_set with context.operation set to that operation (a merge receipt does not authorize a deploy); verify_receipt cannot re-scope or re-issue a decision. - You only need human-readable history of an old decision_id without a receipt token — use coderifts.get_decision_details. - The change set itself is unknown or incomplete — fix the change set and preflight; do not \"verify\" a placeholder. Inputs: receipt token (required); target_id = decision_result.artifact_digest — required for an authorization verdict; omitted → target_not_stated. Optional intended context (operation, environment, fingerprint, audience, repository/branch/pull_request, base/head) and the body_hash-bound decision_result envelope. 30s clock-skew leeway on expiry. A 0s grace for declared destructive production operations is defined in the policy but is unreachable today: the intended-context schema has no destructive field, so nothing can declare one and the 30s leeway always applies. Returns { valid, status, currently_authorized (bool|null), reason, payload, authz_* }. Branch on currently_authorized; null = not evaluated. When a decision envelope is also in hand (e.g. from a prior preflight), its control_envelope.next_agent_step (if present) is structured remediation guidance the agent MAY follow after a non-CONTINUE decision — still branch on execution_action; next_agent_step is suggestion, not permission.…"}],"inputs":{"probes":[{"url":"https://app.coderifts.com/mcp","reachable":true,"authRequired":false,"latencyMs":906,"serverInfo":{"name":"CodeRifts","version":"1.0.3"}}],"packages":[],"repo":{"found":true,"owner":"coderifts","repo":"api-governance","archived":false,"pushedAt":"2026-10-03T19:49:59Z","stars":0,"forks":0,"openIssues":0,"ownerType":"Organization","ownerAvatarUrl":"https://avatars.githubusercontent.com/u/261504443?v=4","ownerCreatedAt":"2026-02-13T20:21:01Z","license":"MIT"},"icon":{"url":"https://avatars.githubusercontent.com/u/261504443?v=4&s=128","source":"registry","width":128,"height":128},"presence":{"stars":0,"forks":0,"downloadsWeek":null,"license":"MIT","lastPushAt":"2026-10-03T19:49:59.000Z","score":23}}}},"grade_history":[],"reviews":[]}