mcpField
D
Deedglass

Deedglass

Local
deedglass.comSecurity1Updated today

About Deedglass

Deedglass mediates AI agent tool calls, applying policies and checking reported results against actual system changes. It is for teams whose agents need to write to connected systems, with signed, verifiable records and row-level undo for Postgres changes.

Key features

  1. 01Policy-based allow, deny, or approval
  2. 02Compare claims with observed changes
  3. 03Signed records verifiable offline
  4. 04Undo changed Postgres rows
  5. 05Observe Postgres changes without rewiring

Use cases

  1. 01Restrict agent writes to approved actions
  2. 02Detect unintended Postgres side effects
  3. 03Review an agent session's database changes
  4. 04Prepare an undo for changed rows

MCP support

Deedglass exposes a governed MCP server through `deedglass mcp serve` and can wrap stdio MCP servers with `deedglass mcp wrap`. It applies policies and checks tool-call outcomes for MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"deedglass-deedglass": {
"command": "npx",
"args": [
"-y",
"deedglass"
],
"env": {
"DEEDGLASS_SERVER": "<DEEDGLASS_SERVER>",
"DEEDGLASS_API_KEY": "<DEEDGLASS_API_KEY>"
}
}
}
}
Run commandnpx -y deedglass
Environment variables to set
DEEDGLASS_SERVERYour Deedglass server
DEEDGLASS_API_KEYSecretAn agent key from deedglass init

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmdeedglass0.15.0

Tools

5

Saved tool list · updated today

ParameterTypeRequiredDescription
argsobjectNoThe function's named arguments.
functionenumYesAn allow-listed function.public.ship_order

Details

From the project README

Deedglass

An agent said it updated 1 row. Postgres changed 301.

Deedglass sits between AI agents and the systems they change. Rules decide each tool call, a check compares what the system really changed with what the agent reported (Claimed, Checked or Proven; Matches, Doesn't match or Can't check), and each result is sealed as a signed record anyone can check offline. It can undo the rows an action changed.

CI Release npm Licence: Apache-2.0, with ee/ under FSL-1.1-ALv2 Go reference Attack suite

Try it in your browser · Quickstart · Docs · Security · deedglass.com

An agent was asked to mark order 42 as shipped. It ran one UPDATE and its tool reported 1 row. A legacy trigger shipped 300 more orders in the same transaction. This is the real output of the Quickstart's last step on 2026-10-14 (shortened where you see …):

$ npx -y deedglass init --trigger
…
✕ UPDATE order 42         Proven · Doesn't match · Postgres changed 301 rows in public.orders. The agent reported 1.
  expected   UPDATE 1 row in public.orders where id = 42 · sets status
  observed   UPDATE 301 rows in public.orders · 300 outside id = 42
…
✓ Trigger off             orders_ship_open_batch dropped
✓ Undo preview            Undo available · 301 rows in public.orders · 301 updates
    policy   undo-needs-approval · a person countersigns first

The agent's log says 1 row. Deedglass read Postgres's own change log for that transaction, found 301, sealed the difference as a record, and planned an undo from those rows that runs only after a person countersigns.

Terminal recording of a real make demo-hero run. Order 42 ships: Proven, Matches, 1 row. A legacy trigger is turned on and the same UPDATE runs: Proven, Doesn't match, Postgres changed 301 rows in public.orders, the agent reported 1, with the row diff. Then every record verifies offline.

A real run of make demo-hero (commit 97a524c, 2026-10-14), each line shown at the time it printed. Source: docs/assets/demo-hero.cast.json, drawn by scripts/demo/cast2svg.mjs.

Four ways in

CommandWhat it needsWhat leaves your machine
In your browserdeedglass.com/playA browser tab. Postgres runs in the page; it opens on the "said 1, changed 301" scene.Nothing
In your terminalnpx deedglass playNode, and deedglass 0.1.1 or newer from npm. No Docker. The rules decide each call live and the records are sealed and checked on your machine; Postgres's lines are replayed from a recorded real run, and labelled as such.Nothing
Scan your setupnpx deedglass scanNode. Reads your MCP configs and, if you name one, a database catalog, read-only. Grades what your agents could change, A to F.Nothing, apart from read-only catalog queries to a database you name
Observe modedeedglass observe run --connector pg-demo -- ./agent.shA Postgres connector with observe on. Nothing to rewire: it reads Postgres's change log beside whatever gate you already use.Nothing

When a scan finds a trigger or a cascade on a table your agent can write, it says so and points to the 301 scene. Observe mode is below.

Quickstart

Docker running with about 2 GiB of free disk, Node 18 or newer, and macOS or Linux (WSL 2 on Windows), then (from the tested Quickstart):

mkdir acme-agents && cd acme-agents
npx -y deedglass init --yes
npx -y deedglass doctor
npx -y deedglass init --trigger

deedglass init starts two Postgres 18.6 containers in Docker (Deedglass's own database and a demo database), runs deedglass serve on 127.0.0.1:8080, creates an org, an agent and the postgres-safe policy, and ends with a blocked DROP TABLE and an UPDATE checked at Proven. deedglass doctor runs sixteen read-only checks, each with its fix. deedglass init --trigger turns on the demo database's legacy trigger, sends the same one-row UPDATE, and ends on the 301-row mismatch and the undo preview shown above.

Observe mode: nothing to rewire

deedglass observe run --connector pg-demo -- ./agent.sh   # open a watched session, run the agent, close it
deedglass observe show obs_01k… --undo-sql                # the undo as SQL you review and run (free)
deedglass observe run --connector dev --undo-sql ~/deedglass-undo -- claude   # watch a Claude Code session, shell included

Turn it on with witness.observe.enabled: true in the connector's config. Observe mode reads only Postgres's change log, through the role and replication slot that deedglass connector postgres init creates, so it works beside any gate you already use, or none. It shows every row committed on the watched tables while the session was open and seals the session as a record. It can't tell which program wrote a row, so a session gets no Matches or Doesn't match verdict; row images are kept 30 days; a TRUNCATE can't be undone from the record. Undo SQL is free; a one-step undo through Deedglass is Pro. Details: docs/OBSERVE.md.

How it works

flowchart LR
  A["AI agents<br/>Claude · OpenAI · Cursor · any MCP client"] -->|tool call + agent key| G
  subgraph D["Deedglass · one binary + Postgres"]
    I[Identity] --> P[Policies] --> G[Rules]
    G --> W[Check] --> S[Records] --> L[Ledger] --> N[Insights]
  end
  G -->|credentials from the vault| T["Tools<br/>Postgres · GitHub · Slack · Stripe · MCP servers"]
  T -->|what actually happened| W
  H[People] -->|approve · stop| G

Every tool call passes through Deedglass with the agent's key. Your rules (policies) decide allow, deny or require_approval; Deedglass runs the call with credentials the agent never holds; the check compares what happened with what was asked; and the outcome is sealed as a record in the org's chain.

How sure each check is

LevelWhat it checksWhat it can't see
ClaimedThe tool's own answer, against a schema and your postconditionsWhether the answer is true
CheckedA read-back from the target (GitHub, Slack, Stripe, Notion, REST, Postgres rows)Side effects the read-back doesn't cover
ProvenPostgres's change log (logical decoding): every row the transaction committedDDL, sequences, unlogged tables and anything outside that database's WAL

Each record claims one level and one result: Matches, Doesn't match or Can't check. When Deedglass can't tell whether a tool ran, the result is Can't check, never Matches. The API keeps the short names (L0/L1/L2, VERIFIED/MISMATCH/UNVERIFIABLE); the glossary maps them.

What it doesn't do

  • Proven checks cover Postgres only, and need wal_level=logical and REPLICA IDENTITY FULL on watched tables.
  • A hijacked agent with a valid key and an in-policy action is allowed. Policies, budgets and approvals narrow this; they don't close it.
  • Deedglass trusts the Postgres server, its superusers, the host it runs on and its seal key. It can't protect you from a compromised host.
  • Records hold digests, not payloads. One set of seal keys signs every org on an instance.
  • It doesn't replace a least-privilege database role. Use both: the role limits what the agent can do; Deedglass checks what it did with that.

The whole list, with workarounds: docs/LIMITATIONS.md and KNOWN_ISSUES.md.

Alternatives

You may not need Deedglass, or you may want it next to one of these. Each has a longer page, with sources and the date each was checked, at deedglass.com/compare.

If you needUse thisWhere Deedglass fits
An agent that only readsA Postgres role with SELECT and nothing else. It can't change data whatever the agent sends, and there's nothing to install.You don't need it. It's for agents that must write. (compare)
A place for an agent to try changesA database branch: a Neon branch is a copy-on-write clone of your data; Supabase branches start without production data by default.For the writes that must reach production: rules first, then the check and the record. (compare)
Routing, isolation and credentials for many MCP serversAn MCP gateway, such as Docker's, which runs each server in an isolated container and injects credentials.Behind the gateway, for the servers that write to Postgres. (compare)
Traces of each step, and evaluationsLangfuse or LangSmith.Next to them: a trace is the agent's side of the story; the check reads what Postgres committed. (compare)
Rules at the wire for Postgres, Kubernetes and HTTPClaw Patrol, which gates each action against rules over the parsed traffic.It also decides first; it adds the check of what Postgres committed, records anyone can check offline, and undo. (compare)
Scanning what an agent sends out and what its tools returnPipelock, an agent firewall that scans MCP traffic in both directions.It adds the check of what Postgres committed after each call, and undo for the rows. (compare)

Install

HowCommand
npx (no install)npx -y deedglass help
Install script (macOS, Linux)curl -fsSL https://raw.githubusercontent.com/deedglass/deedglass/main/scripts/install.sh | sh
Binariesarchives for macOS, Linux and Windows on the latest release, with checksums.txt
Gogo install github.com/deedglass/deedglass/cmd/deedglass@latest (the CLI, without the Console)
Dockerbuild the image from a checkout: make web-build docker (tags deedglass:dev; Node 24 builds the Console)

The install script downloads the release archive for your platform, checks its sha256 against the release's checksums.txt, and copies deedglass into ~/.local/bin; read it first: scripts/install.sh. A public container image is coming; until it's published, build the image locally as above. Checksums, signatures and SBOMs: docs/INSTALL.md.

Add it to your agent client

Add to Cursor Install in VS Code · LM Studio · Goose · Claude Desktop · Every client

claude mcp add deedglass -- npx -y deedglass mcp serve

No link holds a key. Run npx deedglass init first; each client asks Deedglass for the key it wrote.

Claude Code plugin (the MCP server, the /deedglass:scan, /deedglass:wrap and /deedglass:watch commands, and skills for reading a scan and for giving an agent Postgres access safely), from this repo's own marketplace:

/plugin marketplace add deedglass/deedglass
/plugin install deedglass@deedglass

Every format, with its source: docs/INSTALL_CLIENTS.md.

SDKs and clients

  • TypeScript: @deedglass/sdk, with adapters for the AI SDK, the OpenAI Agents SDK, LangChain and the Claude Agent SDK.
  • Python: pip install deedglass, with LangChain and Claude Agent SDK adapters.
  • Go: github.com/deedglass/deedglass/pkg/deedglass.
  • MCP: deedglass mcp wrap governs any stdio MCP server; deedglass mcp serve governs remote ones for Claude Desktop, Claude Code, Cursor, VS Code and Windsurf.

Connectors

Postgres (Proven), REST, GitHub, Slack, Stripe (test mode only), Gmail drafts, Notion and remote MCP servers. Credentials live in an encrypted vault; every outbound call goes through one egress door. See docs/CONNECTORS.md.

Numbers

WhatMeasuredTarget
Gate · allow, no witnessp50 5.81 ms · p99 19.4 msp50 < 5 ms · p99 < 25 ms (p50 missed)
Policy · 50 rulesp99 148 µsp99 < 1 ms
Witness · L2 at 100 writes/sp50 118 ms · p99 317 msp50 < 1 s
Verify · 100,000 deeds1.53 s · 80.9 MiB< 5 s · < 256 MiB
Stop · across 2 instancesmax 23.5 ms over 20 trials< 2 s

How they were measured, and the misses: docs/BENCHMARKS.md.

Security

The attack suite runs 82 cases against a real server and real Postgres on every release candidate: 82 matched, 0 differ (attack/results/latest.json, docs/ATTACK_SUITE.md). Report a vulnerability privately: SECURITY.md.

Free features send nothing to deedglass.com: the free scan reads files on your machine and, with --postgres-dsn-env, connects only to the database you name. A Pro licence is checked with Dodo Payments and deedglass.com: deedglass serve asks at start and then daily, and Pro commands ask when you run them; a request goes out when the last successful check is a day old, and at once when the clock runs more than 5 minutes behind the last check or the latest time seen, or when licence.clock is missing, unreadable or altered. deedglass licence activate, refresh and deactivate always call out. DEEDGLASS_NO_NETWORK=1 stops every licence call, and only those: deedglass version --check and the --latest option of deedglass policy install and policy packs contact GitHub when you use them. Head timestamps are off by default; with TSAs or a transparency service listed in deedglass.yaml, deedglass deeds timestamp and each export contact only those. With the network off, Pro runs on its cached token for up to 14 days after the last successful check. What each request carries: docs/LICENSING.md.

Contributing

Read CONTRIBUTING.md: make dev, make ci, the tests a change needs, and DCO sign-off (git commit -s). Questions go to Discussions (SUPPORT.md); how decisions are made is in GOVERNANCE.md.

If Deedglass showed you something your logs didn't, a GitHub star helps other people find it.

License

The core, the SDKs and the CLI are Apache-2.0. The Pro features in ee/ are FSL-1.1-ALv2, and each release of them becomes Apache-2.0 two years after it ships. The release binary, the @deedglass/cli-* npm packages and the container image include ee/, so their licence is Apache-2.0 AND FSL-1.1-ALv2.

FSL-1.1-ALv2 lets you read, run and change ee/ for anything except offering a competing product (ee/LICENSE); everything Deedglass does for safety is free and outside ee/ (docs/LICENSING.md). The rest is LICENSE; third-party notices are in NOTICE.

The record spec (spec/: the deed format and the export bundle) and the intent-vs-effect corpus (corpus/) are published under CC-BY-4.0, so anyone can implement, copy or adapt them with credit.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.