---
name: deedglass-setup
description: Put this repo's AI agent behind Deedglass. Scan what the agent can change, start Deedglass locally, connect the agent's client and check that it is healthy. Asks the user before changing anything.
---

# Set up Deedglass in this repo

Deedglass sits between an AI agent and its tools. It decides each tool call (allow, deny or ask a person), runs it with credentials the agent never sees, checks the result against the system of record (Postgres first), and seals every action as a signed deed that anyone with the public key can check offline.

You are a coding agent following these steps for the user. Work in the user's current repository. **Ask the user before every step that changes something** (installing, writing files, starting containers, editing an MCP client config). Show the command first, then wait for a clear yes.

## 0. Pre-flight (changes nothing)

Run these, report what you find, and stop if a check fails.

1. `npm view deedglass version`
   Expected: a version number. If npm answers 404, Deedglass is not on npm yet. Stop here and tell the user: "Deedglass is not published on npm yet. You can watch it work in your browser at https://deedglass.com/play, or get one email when it opens at https://deedglass.com/pricing#notify."
2. `node --version`: Node 18 or newer.
3. `docker info --format '{{.ServerVersion}}'`: a version number. Step 3 runs Postgres in Docker. If Docker is missing, steps 1 and 2 still work; tell the user step 3 needs Docker.
4. Find the agent's client: look for `.mcp.json`, `.cursor/mcp.json`, `.vscode/mcp.json`, Claude Desktop or Windsurf config files. Ask the user which client the agent runs in: `claude-code`, `claude-desktop`, `cursor`, `vscode` or `windsurf`.

Then summarize for the user, in plain words: what you found, what each next step will install or write, and that nothing is sent anywhere. Ask: "Shall I continue?"

## 1. Install (asks first)

`npm install -g deedglass`

Expected: `deedglass version` prints a version line. Docs: https://docs.deedglass.com/get-started/install-deedglass/

## 2. See what the agent can change (read-only)

`deedglass scan`

Expected: a line starting `deedglass scan ·` and ending `read-only`, a Blast radius grade from A to F, what was found (MCP client configs, servers, tools that can write) and three policies to add first. It writes its report, `deedglass-scan.md` and `deedglass-scan.html`, in the current folder, and says "nothing left this machine". Tell the user the grade and the top three suggestions. An A means a small blast radius, not a safe agent.

To include the database, ask the user for the name of the environment variable that holds the database URL (never its value), then: `deedglass scan --postgres-dsn-env <VAR>`.

## 3. Start Deedglass and connect the client (asks first)

`deedglass init --yes --client <client>`

This starts Postgres 18.6 in Docker, runs `deedglass serve` on 127.0.0.1:8080, writes keys to `.deedglass/` (mode 0700), creates a local org with a demo agent and runs three smoke actions: a read, a blocked DROP TABLE and an UPDATE witnessed at L2. Expected: a line starting with `✓` for each step. Running it again prints "Nothing to change". Add `.deedglass/` to `.gitignore` if it is not there (ask first). Docs: https://docs.deedglass.com/quickstart/

## 4. Put an existing MCP server behind the Gate (asks first)

`deedglass mcp wrap --connector <name> -- <server command>`

Expected: the client lists the server's tools, and tools the policy denies are hidden. Docs: https://docs.deedglass.com/get-started/govern-an-mcp-server/

## 5. Check that everything is healthy

`deedglass doctor`

Expected: `✓` lines and exit code 0. If a line starts with `✕`, show it to the user with the fix it names. Docs: https://docs.deedglass.com/reference/doctor-checks/

## What Deedglass cannot see (tell the user)

Report these limits plainly; do not soften them.

- A compromised host: whoever controls the machine running Deedglass controls what it records.
- A stolen seal key: deeds sealed with it look genuine until the key is rotated and revoked.
- Agents that still hold their own credentials and never call through the Gate.
- Schema changes, tables it does not watch and systems without a read-back: the verdict says UNVERIFIABLE, never VERIFIED.

## When you are done

Tell the user what changed (files written, containers started, client configs edited), how to stop it (`deedglass init --stop`), and where to ask: hello@deedglass.com (Arjun replies within one business day).

Links: https://deedglass.com/start · https://deedglass.com/llms.txt · https://deedglass.com/security · https://deedglass.com/verify
