DC db-cluster
v1.0.0 — shipping

Federated truth. Governed substrate.

Four specialized stores (canonical, artifact, index, ledger) behaving as one cluster. Typed errors with remediation hints. Mutation receipts on every write. MCP + SDK + CLI surfaces with policy enforcement and redaction.

Install

npm install @mcptoolshop/db-cluster

Initialize

npx @mcptoolshop/db-cluster init

Retrieve

npx @mcptoolshop/db-cluster retrieve "your query"

Why db-cluster

Four guarantees the model can rely on.

Federated truth

Four stores — canonical, artifact, index, ledger — each owning its native truth shape. The kernel routes; the cluster owns. Indexes are derivative and rebuildable from owned stores.

Typed errors with remediation

Every ClusterError subclass carries a `code`, `retryable`, and a `remediationHint`. AI agents branch on the code. Operators see "→ try: <command>" in the CLI. CLI exit codes map sysexits.h (65/70/77/78).

Mutation receipts everywhere

propose → validate → approve → commit → (compensate). Every commit emits a content-addressable receipt. The ledger is append-only. Nothing mutates without a receipt.

MCP-native, AI-safe

The MCP server defaults to the ai-facing trust zone with redaction ON; write tools refuse to commit until the command is approved. 16 tools with safety annotations (readOnlyHint / destructiveHint / requiresApprovalHint). Structured AiErrorEnvelope responses, never raw stacks. The package root factory createSafeCluster() returns a policy-enforced handle; raw, unpoliced stores are reachable only via the explicit @mcptoolshop/db-cluster/unsafe escape hatch.

Quickstart

Install

npm install @mcptoolshop/db-cluster

Initialize and ingest

npx @mcptoolshop/db-cluster init
npx @mcptoolshop/db-cluster ingest ./evidence.md
npx @mcptoolshop/db-cluster retrieve "what we know about X"

Programmatic SDK

import { ClusterSDK } from '@mcptoolshop/db-cluster/sdk';

const sdk = new ClusterSDK({ clusterDir: './.db-cluster' });
const bundle = await sdk.retrieveBundle('your query');
console.log(bundle.confidenceBoundaries);

MCP server (for AI agents)

// .mcp.json
{
  "mcpServers": {
    "db-cluster": { "command": "npx", "args": ["db-cluster-mcp"] }
  }
}