The five tools
| Tool | What it does |
|---|---|
| knobe_verify | Integrity and conformance verdict for a file or pasted text: the protocol's four states, a separate conformance axis with each issue listed, both hashes, and lens.py's exit code. |
| knobe_read | An obligations-first read: the first content block is the sealed-context preamble (integrity verdict, provenance, license, trust posture, obligations), so an agent reads the conditions before the content. The second block carries the payload metadata and markdown body. |
| knobe_create | Assemble and seal a new object from fields and a body. The sealed file self-verifies before it is returned, and can be written to a path. |
| knobe_transform | Seal a derivative of a verified original. The derivative's parents field records the original's title and payload hash automatically. The original's payload must verify; a broken seal cannot anchor a chain. If the original's text changed after sealing, the tool still accepts it, and the derivative names the sealed version, not the changed text. |
| knobe_permits | Evaluate a proposed action (summarize, excerpt, translate, train, redistribute, publish, ...) against the object's own sealed terms. |
Resources and a prompt
The package ships 31 fixture files, browsable as MCP resources under knobe://examples/… (twelve sealed illustrative KNOBEs) and knobe://vectors/… (the nine core vectors and ten of the seventeen adversarial vectors, with known verdicts; the other seven adversarial and all seven interpretation vectors are not included). A further resource, knobe://guide, orients agents. A knobe-guarded-summarize prompt encodes the basic procedure: verify, consult the sealed terms, then act, qualify, or decline with a cited clause.
What knobe_permits returns
The evaluation reads the sealed record itself: quarantine status, privacy level, license posture, and any namespaced extension terms the author declared. The verdict is true, false, or "conditional", with the obligations that apply and a basis list citing each sealed field that produced it:
{
"action": "redistribute",
"allowed": false,
"obligations": ["quarantined: inspect and establish trust before relying on the content"],
"basis": [
{ "field": "privacy_level", "value": "sensitive", "effect": "deny distribution actions" },
{ "field": "license", "value": "All rights reserved", "effect": "no redistribution granted" }
],
"integrity": { "state": "verified", "conformance": "valid" }
}
An agent that consults this before acting can decline with a quoted source rather than a guess. The pattern extends a norm the web already runs on: as a responsible crawler checks robots.txt before fetching, a responsible agent checks a document's sealed terms before acting on it. Two boundaries hold throughout: a file whose seal fails verification permits nothing, and the verdict reports what the object declares. Enforcement belongs to the caller; a verified seal confirms integrity, not truth.
Known limits
knobe_permits is advisory. It reports what the sealed terms declare and enforces nothing, and it has open cases where it allows more than the license does. Until they are fixed, treat "conditional" as "ask a human", not as permission.
- Unlisted verbs skip the license check (issue #42). The license is applied only to a fixed list of actions. Under "All rights reserved",
excerptis refused, butquote,paraphraseandfine-tunecome back"conditional". - Some license spellings are read too permissively (issue #44). A license that spells out NoDerivatives is not read as no-derivatives, so derivative actions come back
"conditional"instead offalse. Spelled-out NonCommercial and ShareAlike lose those obligations. Negated wording such as "Not in the public domain", and a missing license, are also read too generously.
Install
From a checkout of the repository (the server lives in mcp/; run npm install there once):
{
"mcpServers": {
"knobe": {
"command": "node",
"args": ["/absolute/path/to/knobe-protocol/mcp/server.mjs"]
}
}
}
- Claude Desktop: add the block to
claude_desktop_config.json(Settings → Developer → Edit Config). - Claude Code:
claude mcp add knobe -- npx -y knobe-mcp - Cursor / Windsurf / others: add the same server block to the client's MCP configuration file.
Requires Node 20 or later. The package is published to npm as knobe-mcp, so no checkout is needed; to run from a local checkout instead, point the command at mcp/server.mjs.
Data flow and verification
Files are read from the paths you pass (or from pasted text), processed in the server process, and optionally written to a path you name. After install, nothing is transmitted anywhere; the server has no network code.
The engine is knobe-core.js, the dependency-free ES module whose verdicts are checked against lens.py across the published test corpus; the parity claim and its command are on the implementations page. The package's own test suite drives every tool through a full MCP client/server round-trip and byte-compares the vendored engine against the repository copy. The published vectors decide conformance; lens.py is canonical for §5 serialization questions; other rulings are in ERRATA.md.