Knolo MCP Policy Files and Limits: Bound What an Agent Can Read
How Knolo MCP policy files are pinned to the Knowledge Image, the six config limits, and why receipt retention deletes old receipts.
Knolo is the open-source, local-first Knowledge Image runtime and format (Apache-2.0, Knolo core on npm as @knolo/core). Its MCP server, @knolo/mcp, lets an agent host read a pinned Knolo Knowledge Image over stdio through four read-only tools: knolo_search, knolo_get, knolo_verify and knolo_status. On 29 Nov 2026 three merged pull requests in the Knolo core repository on GitHub documented two things every operator needs before going to production: the policy file and the config limits.
These changes are on main. The latest @knolo/mcp on npm is still 0.2.4, so the hot-reload fix below ships with the next release.
The Knolo policy file is chosen when the image is built
Every Knolo MCP mount needs a policyPath. The file is not free-standing configuration: its policy root must equal the policyRoot committed inside the Knowledge Image. To change access, you build a new image and update the sha256 and stateRoot pins (PR #240).
A Knolo policy is small:
| Field | Values |
|---|---|
version |
1 |
default |
allow or deny, used when no rule matches |
effect |
allow or deny; a matching deny overrides every allow |
action |
query for knolo_search, read for knolo_get |
principal |
compared with the mount's principal, not agentId |
kind |
an optional object kind, such as chunk |
JSON formatting and rule order do not change the policy root. An image built without a policy commits a default-deny root; { "version": 1, "default": "deny" } matches it but allows no access. The format and its root are specified in Knolo KIP-0008.
What the errors mean:
IMAGE_INVALID: the policy file is unreadable, invalid, or does not match the image'spolicyRoot.ACCESS_DENIEDfromknolo_search: the file matches, and the policy denies every matched object to this principal.ACCESS_DENIEDfromknolo_get: noreadaccess to that object.
Knolo MCP now watches the policy file for drift
PR #257 makes the Knolo MCP server track every mount's policyPath alongside the config. Modifying, corrupting or deleting a policy file on disk now triggers reload validation and fails closed with IMAGE_INVALID, instead of the server continuing to serve the cached policy.
Six Knolo MCP limits bound what one server reads and keeps
PR #249 documents six optional top-level config fields. Each is a positive integer, and a value above its maximum is IMAGE_INVALID at startup.
| Field | Default | Maximum | Bounds |
|---|---|---|---|
maxHits |
8 | 1000 | hits from one knolo_search |
maxExcerptBytes |
1600 | 65536 | UTF-8 bytes of one excerpt or one get |
maxQueryBytes |
4096 | 16384 | UTF-8 bytes of one search query |
maxImageBytes |
250 MiB | 512 MiB | each mounted image file |
maxAuditRecords |
10000 | 1000000 | receipt files kept in auditDir |
maxAuditBytes |
256 MiB | 1 GiB | total receipt bytes in auditDir |
Behaviour worth knowing:
- A search
limitabovemaxHitsis lowered, not rejected. - The query is measured after NFKC normalization and whitespace collapsing; a longer one is
QUERY_INVALID. knolo_getreturns at mostmaxExcerptBytesfromstartand never splits a UTF-8 character. Page by passing the returnedendback asstart.- An image over
maxImageBytesisIMAGE_UNAVAILABLE.
Knolo receipt retention deletes receipts
This is the one to plan for. Before writing each receipt, the Knolo MCP server removes the oldest receipt files in auditDir until the new one fits under both audit limits. Query receipts (qr_) and evidence receipts (er_) share that budget, and a removed receipt returns NOT_FOUND when you try to verify it. If a receipt must stay verifiable, copy it out of auditDir before it ages out.
Try Knolo MCP
knolo · mcp · policy · open-source · knowledge-image