Install dominion-trust-check (verified release 0.1.0). Its Python import name is dominion_trust_check. Run shell commands in a terminal and save Python examples in a .py file.
python -m pip install dominion-trust-checkfrom dominion_trust_check import gate, trust_check, DominionGateError
# Replace this placeholder with an MCP endpoint you are authorized to check.
server_url = "https://your-server.example/mcp"
try:
result = trust_check(server_url)
except OSError as error:
result = {"verdict": "UNRATED", "error": str(error)}
score = result.get("trust_score")
if result.get("error"):
print("Blocked: API error; no trust assessment available.")
elif result.get("verdict") == "UNRATED" or score is None:
print("Blocked: UNRATED. This example fails closed pending independent review.")
elif result.get("verdict") == "PASS" and isinstance(score, (int, float)) and not isinstance(score, bool) and score >= 70:
print("Meets this example's trust policy; review before connecting.")
else:
print("Not approved:", result.get("verdict", "UNRATED"), score)
from dominion_trust_check import gate, DominionGateError
server_url = "https://your-server.example/mcp" # replace with your endpoint
try:
result = gate(server_url, min_score=60)
except DominionGateError as error:
print("Blocked:", error.dominion.get("verdict", "UNRATED"))
except OSError as error:
print("Check unavailable; do not connect:", error)
else:
receipt = result.get("diligence_receipt") or {}
print("Verdict:", result.get("verdict"))
print("Receipt:", receipt.get("lookup_url", "No receipt returned"))
Default gate() blocks FAIL only; use a positive min_score to reject a missing score. This is a policy check, not a security guarantee. Responses may omit a receipt. The package does not export check_trust, report, or a LangChain callback.
python -c "from dominion_trust_check import trust_check, gate, verify, DominionGateError; print('imports OK')"There is no installed dominion-trust-check CLI and no python -m dominion_trust_check entry point in release 0.1.0. Run your own Python script instead.
The npm packages dominion-trust-check and @dominion/trust-provider were unavailable in the public registry when checked on 26 September 2026. Download the hosted ES module, save the following example as example.mjs beside it, and run it with Node. Ordinary Node.js does not load HTTPS imports directly.
curl -fSL https://dominionobservatory.com/sdk/trust-check.js -o dominion-trust-check.mjsimport { trustCheck } from "./dominion-trust-check.mjs";
// Replace the placeholder with an endpoint you are authorized to check.
let result;
try {
result = await trustCheck("https://your-server.example/mcp");
} catch (error) {
result = { verdict: "UNRATED", error: String(error) };
}
const score = result.trust_score;
if (result.verdict === "PASS" && typeof score === "number" && score >= 70) {
console.log("Meets this example's trust policy; review before connecting.");
} else {
console.log("Not approved:", result.verdict ?? "UNRATED", score);
}
node example.mjsRuntimes supporting HTTPS module imports can import the hosted module directly. In a browser use <script type="module">; in Deno grant network access with deno run --allow-net example.mjs.
import { trustCheck } from "https://dominionobservatory.com/sdk/trust-check.js";
// Replace the placeholder with an endpoint you are authorized to check.
let result;
try {
result = await trustCheck("https://your-server.example/mcp");
} catch (error) {
result = { verdict: "UNRATED", error: String(error) };
}
const score = result.trust_score;
if (result.verdict === "PASS" && typeof score === "number" && score >= 70) {
console.log("Meets this example's trust policy; review before connecting.");
} else {
console.log("Not approved:", result.verdict ?? "UNRATED", score);
}
trust_check(server, registry=None, base=None), gate(server, min_score=None, block=True, registry=None, base=None), and verify(jws, base=None).trustCheck(server, {registry, base}), gate(server, {minScore, block, registry, base}), and verify(jws, {base}).verify calls Dominion's verification API; it is not an offline signature verifier. Only call it when a response contains a JWS receipt.Get Started · Python source and README. Framework integration sketches live in the recipe directory; replace placeholder endpoints before use.