Nacre

Can your agent read less than you?

An MCP client signed in as you reaches everything you reach. Narrowing it to one layer, read only, and what that does and doesn't stop. A test you can run.

Two articles here so far have been about the person behind an agent: whose permissions a search runs with, and what happens when the data comes with someone else's rules. Both ended in the same place. Sign the agent in as the person, and it sees what the person sees.

That's the floor, though, not the goal. Most of the time you don't want the agent to see everything you can.

Guillaume Lethuillier's essay on transitive policies for agents (14 November, on HN) opens with the uncomfortable version: "Agents can each obey their tool permissions and still leak private data together." His example is three agents, an orchestrator and one attacker-written support ticket. A Reader agent with database access summarises "the ten largest customer accounts", and a Sender agent mails the summary to the attacker's verified address. No agent steps outside its tools. His first line of defence is one sentence: "Scoping the Reader to the requester's own records would prevent the attack in this example."

The same shape turns up in plainer form. Someone asked HN this month how to build an "AI company brain" their CTO wants, and in the thread they sketch agents whose writes are made "only for the documents included in the repo if the agent allows it according to user permissions". On an AppSumo product page in October, someone asked whether an MCP connection could request read-only, per-resource scopes, and the vendor answered that its live connection used one broad "mcp" scope.

So there are two questions here. Can the agent be held to less than its person? And when it is, which leaks does that stop?

Two answers to "who is the agent?"

When an MCP client connects to Nacre, the consent screen asks which kind of connection you mean, and the two answers are different things.

A delegation. The client acts as you. Our authorization spec is blunt about it: "Nothing is ever granted to a delegation." It has no grants of its own. Every request re-resolves your grants, so a delegation can never reach a document you can't, and anything you lose, it loses on the next request.

An agent. An admin can mint a service account instead, with its own grants. That's the right tool for an unattended pipeline that should outlive any one employee, and it's the wrong one for a client on somebody's laptop, because "what may this agent read" is no longer tied to the person using it.

For the situation in the essay, a Reader acting for one requester, you want the delegation. The Reader then can't read past the person who started the task.

Then make it smaller

At consent, a delegation can be narrowed on two dimensions, and the spec composes them as "The narrowing can only remove."

  • Layers. Pick which of your layers the client may touch. The choice becomes one more must clause beside your permission filter, inside the index traversal. It isn't a trim on results that come back.
  • Permissions. A ceiling on what it may do with them: read, write, or both. read alone is what the screen proposes by default. And since write doesn't imply read in this model, {write} alone is a real setting: an ingest pipeline that can't read back what it wrote.

The MCP docs put the point of the ceiling better than I would: "A connection approved for read on one layer cannot be talked into deleting anything, because the authority is not there to be talked into."

Try it: the engineer, narrowed to the handbook

The public stand has a demo company with two read-only logins on demo.nacre.work. The engineer reads two layers, engineering and handbook. This script signs in as the engineer, registers a client, approves it for handbook only with a {read} ceiling, and then has the client try to get at engineering. Then it forgets the connection.

The approval step is the consent screen's own request, sent with the engineer's session. If you'd rather click through it, claude mcp add --transport http nacre https://playground.nacre.work/mcp, sign in, and untick engineering on the screen. Passwords rotate, so copy them from the demo page.

#!/usr/bin/env bash
# Connect an agent as the engineer, narrowed to the handbook, and see what it can reach.
# Passwords: copy them from https://demo.nacre.work
set -euo pipefail
BASE=https://playground.nacre.work
CB=http://127.0.0.1:8765/callback
Q='what is the contract number for Northwind'

# 1. Sign in as the person who will approve the connection.
ME=$(curl -s "$BASE/v1/auth/login" -H 'content-type: application/json' \
  -d "{\"email\":\"engineer@demo.nacre.work\",\"password\":\"$ENGINEER_PASSWORD\",\"organization\":\"demo\"}" \
  | jq -r .access_token)
HANDBOOK=$(curl -s "$BASE/v1/layers" -H "authorization: Bearer $ME" | jq -r '.items[]|select(.slug=="handbook").id')

# 2. Register a client and approve it for one layer, read only (what the consent screen does).
CLIENT=$(curl -s "$BASE/oauth/register" -H 'content-type: application/json' \
  -d "{\"client_name\":\"narrow-test\",\"redirect_uris\":[\"$CB\"],\"token_endpoint_auth_method\":\"none\"}" | jq -r .client_id)
VERIFIER=$(openssl rand -base64 48 | tr -d '\n=+/')
CHALLENGE=$(printf %s "$VERIFIER" | openssl dgst -sha256 -binary | openssl base64 | tr '+/' '-_' | tr -d '=\n')
CODE=$(curl -s "$BASE/v1/oauth/consent" -H "authorization: Bearer $ME" -H 'content-type: application/json' \
  -d "{\"client_id\":\"$CLIENT\",\"redirect_uri\":\"$CB\",\"code_challenge\":\"$CHALLENGE\",\"code_challenge_method\":\"S256\",
       \"layers\":[\"$HANDBOOK\"],\"permissions\":[\"read\"]}" | jq -r .redirect_to | sed -E 's/.*code=([^&]+).*/\1/')
AGENT=$(curl -s "$BASE/oauth/token" -d grant_type=authorization_code -d client_id="$CLIENT" \
  -d code="$CODE" -d code_verifier="$VERIFIER" -d redirect_uri="$CB" | jq -r .access_token)

# 3. Talk MCP with the agent's token.
mcp() {   # $1 JSON-RPC method, $2 params
  local h=(-H "authorization: Bearer $AGENT" -H 'content-type: application/json' -H 'accept: application/json, text/event-stream')
  local sid s=()
  sid=$(curl -s -D - -o /dev/null "${h[@]}" "$BASE/mcp" \
    -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"t","version":"0"}}}' \
    | awk -F': ' 'tolower($1)=="mcp-session-id"{print $2}' | tr -d '\r')
  [[ -n "$sid" ]] && s=(-H "mcp-session-id: $sid")   # this server is stateless and sends none
  curl -s "${h[@]}" "${s[@]}" "$BASE/mcp" -d '{"jsonrpc":"2.0","method":"notifications/initialized"}' >/dev/null
  curl -s "${h[@]}" "${s[@]}" "$BASE/mcp" -d "{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"$1\",\"params\":$2}" \
    | sed -n 's/^data: //p;/^{/p'
}
hits() { jq -r '.result.content[0].text' | jq -r '"\(length) results from [\([.[].layer]|unique|join(","))]"'; }
ENG_DOC=$(curl -s "$BASE/v1/search" -H "authorization: Bearer $ME" -H 'content-type: application/json' \
  -d "{\"query\":\"$Q\",\"top_k\":10,\"layers\":[\"engineering\"]}" | jq -r '.items[0].doc_id')

echo "engineer, own token:      $(curl -s "$BASE/v1/search" -H "authorization: Bearer $ME" -H 'content-type: application/json' \
  -d "{\"query\":\"$Q\",\"top_k\":10}" | jq -r '"\(.items|length) results from [\([.items[].layer]|unique|join(","))]"')"
echo "agent, tools offered:     $(mcp tools/list '{}' | jq -r '[.result.tools[].name]|join(" ")')"
echo "agent, search:            $(mcp tools/call "{\"name\":\"search\",\"arguments\":{\"query\":\"$Q\",\"top_k\":10}}" | hits)"
echo "agent, asks engineering:  $(mcp tools/call "{\"name\":\"search\",\"arguments\":{\"query\":\"$Q\",\"layers\":[\"engineering\"]}}" | jq -c .result)"
echo "agent, engineering doc:   $(mcp tools/call "{\"name\":\"get_document\",\"arguments\":{\"document_id\":\"$ENG_DOC\"}}" | jq -c .result)"
echo "agent, made-up doc:       $(mcp tools/call '{"name":"get_document","arguments":{"document_id":"00000000-0000-4000-8000-000000000000"}}' | jq -c .result)"
echo "agent, delete_document:   $(mcp tools/call "{\"name\":\"delete_document\",\"arguments\":{\"document_id\":\"$ENG_DOC\"}}" | jq -c .error)"

# 4. Forget the connection, then try the agent's token again.
ID=$(curl -s "$BASE/v1/oauth/consents" -H "authorization: Bearer $ME" | jq -r --arg c narrow-test '.items[]|select(.client_name==$c and .revoked_at==null).id')
curl -s -X DELETE "$BASE/v1/oauth/consents/$ID" -H "authorization: Bearer $ME" >/dev/null
echo "after forgetting, agent:  HTTP $(curl -s -o /dev/null -w '%{http_code}' "$BASE/v1/search" -H "authorization: Bearer $AGENT" \
  -H 'content-type: application/json' -d "{\"query\":\"$Q\"}")"
echo "after forgetting, person: HTTP $(curl -s -o /dev/null -w '%{http_code}' "$BASE/v1/search" -H "authorization: Bearer $ME" \
  -H 'content-type: application/json' -d "{\"query\":\"$Q\"}")"

What it printed today, 16 November:

engineer, own token:      8 results from [engineering,handbook]
agent, tools offered:     search list_layers get_document list_skills get_skill
agent, search:            3 results from [handbook]
agent, asks engineering:  {"content":[{"type":"text","text":"[]"}],"isError":false}
agent, engineering doc:   {"content":[{"type":"text","text":"Not found"}],"isError":true}
agent, made-up doc:       {"content":[{"type":"text","text":"Not found"}],"isError":true}
agent, delete_document:   {"code":-32602,"message":"Tool delete_document not found"}
after forgetting, agent:  HTTP 401
after forgetting, person: HTTP 200

Line by line:

  • The person and the agent ask the same question. The person gets 8 results from two layers, and the agent gets the 3 from the one layer it was approved for.
  • Asking for engineering by name gets the agent an empty list. That's the same [] it would get for a layer that doesn't exist, and fetching a real engineering document by its id gives the same Not found as an id I made up. The narrowing doesn't tell the agent there's anything on the other side.
  • The client isn't even offered the write tools. An unnarrowed connection on the same stand was listed all eleven, and this one gets five. Calling delete_document anyway is refused as a tool that doesn't exist.
  • Forgetting the connection ends it on the next request, while the access token still had most of its 15 minutes left. The engineer's own session keeps working.

One limit of the demo: the handbook only holds three documents, so this can't show that a narrowed top_k=10 still returns ten. The spec has that as its own test (T22: 20 layers, the delegation narrowed to one, exactly 10 results).

Two things I noticed that you should know

The tool list follows the ceiling, not your grants. I also connected the contractor with no ceiling at all. The contractor can't write anything, but the client was still listed all eleven tools, ingest_document included. When it tried to write to the handbook, it got the same Not found as everything else it isn't allowed. That's by design. The docs say the catalog "is not a control", and every call is checked on its own. But if you're reading tools/list to audit what a client could do, you're reading the ceiling. A client with no ceiling is listed everything.

Approving the same client again replaces the old approval, live. Partway through, I approved the same registered client a second time without narrowing it. A token issued under the narrowed approval came back with both layers on its very next search. That follows from the design, because the token carries who you are and the approval is looked up on every request. It also means re-approval cuts both ways: narrowing takes effect for tokens already handed out, and so does widening. If a client asks you to reconnect, read the screen again.

What narrowing doesn't stop

This is the point where the essay gets ahead of us, and I'd rather say so than leave it implied.

His second rule is that "Permission to read a record and permission to disclose it are separate decisions." He wants each response labelled with who may receive it, and the label carried through every handoff. Nacre does none of that. Its job ends at the retrieval hop. It decides which documents reach the agent, and once the text is in the model's context, nothing here follows it. Our own docs say retrieved text is untrusted input to the calling model, and that anyone who can write to a layer can leave instructions there for any agent that later searches it.

So in his three-agent example, a narrowed delegation fixes the Reader. If the Reader runs as the requester, narrowed to what the task needs, the ten largest accounts aren't in its reach to summarise. What happens to whatever the Reader was allowed to read is still up to your runtime: the Sender, the orchestrator, the outbound mail. His third rule, limits across a sequence of actions ("at most ten distinct customer records per day, across all agents"), isn't something this does either.

What you get is a smaller blast radius, set by the person who approved the client and checked on every request. In a chain of agents, that's the part retrieval can do. The rest needs a runtime.

The stand is a demo, not a hosted product. It's capped at 200 documents and erases itself every 24 hours. The real thing is the Apache-2.0 build you run yourself, and the delegation section of the authorization spec, with its test table, is what to read before trusting any of this.