Daedro / Handbook
Chapters

Operate a managed Hub

Prepare one trusted Docker host, start the TLS listener, issue per-caller credentials and recover the installation within its configured resource budget.

Manage the cleaning pool

The built-in profiles are cleaning and text-stats. Both use the pinned local worker image. You can also deploy an administrator-reviewed upload. The S3 launcher connects a separately provisioned read-only adapter. Other platform integrations have their own installation and credentials. The hub does not deploy them from their catalog cards. Run the following from the repository root using a new private directory outside Git and the absolute path to the local Docker socket. The selected Docker host and its administrator are trusted.

make build
PRIVATE_DIR="$HOME/.daedro-hub-private"
DOCKER_SOCKET=/var/run/docker.sock
bin/daedro-mcp-hub init --dir "$PRIVATE_DIR"
make cleaning-image
IMAGE_ID=$(docker image inspect --format '{{.Id}}' daedro-managed-cleaning:local)
bin/daedro-mcp-hub serve --manage --config-dir "$PRIVATE_DIR" --docker-socket "$DOCKER_SOCKET" --image "$IMAGE_ID" --port 8792

Port 8792 lets the catalog example continue running on 8791. For an offline build, first obtain the base images pinned in the Dockerfile. The cleaning-image target builds deploy/cleaning.Dockerfile from the profiles/cleaning directory. The hub takes the resulting immutable image ID. Initialization creates the local CA certificate, serving certificate and private key, an administrator token and a separate AES-GCM state key. Restrict access to that directory. Management requires TLS 1.3. The hub does not change OS trust settings.

Send authenticated requests

In another terminal, start from the same repository root. The helper below supplies the authorization header to curl on standard input.

PRIVATE_DIR="$HOME/.daedro-hub-private"
HUB_URL=https://127.0.0.1:8792
TOKEN_FILE="$PRIVATE_DIR/admin.token"
hub() {
  printf 'Authorization: Bearer %s\n' "$(cat "$TOKEN_FILE")" |
    curl -fsS --cacert "$PRIVATE_DIR/ca.crt" --header @- "$@"
}
hub -X PUT "$HUB_URL/api/v1/deployments/cleaning"
hub "$HUB_URL/api/v1/deployments/cleaning"

Issue a caller token

Create an individual caller credential on the host and deliver it privately to that analyst or application. The new token is stored at clients/analyst-demo.token inside the private configuration directory. The caller needs the service address, CA certificate and their own token. Run this command on the operator host.

bin/daedro-mcp-hub client-key --config-dir "$PRIVATE_DIR" --name analyst-demo

Call and stop the shared cleaning pool

To test a cleaning preview, set TOKEN_FILE to the named caller credential and use the same authenticated hub helper. Check result.rows for the original and transformed text, and result.preview_digest for the preview identity. To invoke clean_execute, explicitly approve that same preview. Stop the deployment with the administrator credential after use.

TOKEN_FILE="$PRIVATE_DIR/clients/analyst-demo.token"
hub -H 'Content-Type: application/json' --data-binary '{"tool":"clean_preview","arguments":{"request":{"version":"1","documents":[{"source_id":"demo","text":"  First   document  "}],"config":{"whitespace":"collapse","replacements":[],"deduplicate":true}}}}' "$HUB_URL/api/v1/deployments/cleaning/call"
TOKEN_FILE="$PRIVATE_DIR/admin.token"
hub -X DELETE "$HUB_URL/api/v1/deployments/cleaning"

An authenticated administrator MCP client can call deployment_start, deployment_status and deployment_stop with {}. For deployment_call use the same JSON arguments as the HTTP preview above. See the live tools reference for the full tool set of this build. Listing services starts no containers.

Scaling and resource budgets

Horizontal scaling. Each replica admits one call at a time. A new call can start an additional replica when the others are occupied. Admission is bounded by the replica limit, total CPU budget and total memory budget. Defaults are three replicas, 500 CPU millicores and 128 MiB per replica, within an aggregate budget of 1500 millicores and 384 MiB. When no slot can be admitted the hub returns HTTP 429. After traffic subsides the pool retains its size until explicitly stopped.

Operators configure the bounds with --max-replicas, --replica-cpu-millis, --replica-memory-mib, --cpu-budget-millis and --memory-budget-mib. Managed replicas run as non-root processes without networking, within explicit resource limits. The effective budget is shared across the pools in this hub installation. Cluster scheduling and cloud provisioning are outside its scope.

Privacy and operator trust

Catalog and schema discovery contain service metadata. Cleaning request and result bodies travel between the caller and the selected worker. The Hub keeps no persistent document history. The hub maintains encrypted deployment state. The Hub persists uploaded distributions in the protected package registry. Each download or deployment requires its own access check. The local Docker host, its administrator and access to the token and state-key files remain part of the trust boundary. The browser keeps the token in the current page's memory. Select Clear session after use. Preview text is sent only when you explicitly run the preview.

Restart and recover

Restart the managed process with the same private directory, socket, immutable image ID and resource settings. The Hub reads the encrypted deployment journal and validates the private package registry. It checks ownership, worker isolation and the tool handshake before adopting a running replica. It withholds capacity if it cannot confirm occupancy. Back up the encrypted journal and registry, and protect the matching state key separately. Restore them as one installation. Only one controller should manage the restored Docker state. Security model

To revoke an individual credential, run the following on the operator host. If its owner left private instances behind, inspect those instances as an administrator. A reissued username receives a new principal.

bin/daedro-mcp-hub revoke-key --config-dir "$PRIVATE_DIR" --name analyst-demo

A synthetic smoke can verify recovery and the capacity cap on the prepared local Docker host. Inspect the smoke output for accepted calls, capacity rejections and the recovered replica count. Managed smoke · Demo budget · Troubleshooting