# Security and Agent Safety

> Your AI has read the internet, not your bookmarks. Readstash keeps the posts you save as private memory your AI can search, plus a weekly brief.

Markdown mirror of https://readstash.app/security (canonical HTML). Site map for agents: https://readstash.app/llms.txt. Generated 2026-12-05.

# What Readstash can touch, and what your agents can

A reading library that AI agents can search raises two fair questions: what does Readstash do with my X account, and what can an agent do with my library. This page answers both, and says where the limits are.
 Your X account
## Read-only access to X

Readstash connects through official X OAuth 2.0 with PKCE.

### What Readstash asks X for

Four permissions: read posts, read your profile, read your bookmarks, and stay connected so sync keeps working without you signing in again.

`tweet.read users.read bookmark.read offline.access`

### What it cannot do

Readstash does not request any write permission. It cannot post, like, follow, send messages or change anything on your X account.

### How tokens are stored

X access and refresh tokens are encrypted with AES-256 before they are stored. In production the app refuses to store or read a token if encryption is not configured.

You can disconnect X from Readstash, or revoke Readstash from your X settings, at any time.
 Your AI agents
## How agent access will be authorised

Agents connect over MCP with OAuth 2.1. There is no API key to paste into a chat.

**Agent access is rolling out.** The MCP server is built and in early access. It is not switched on for accounts yet, so nothing on this page can be connected today.

### You approve each client on a consent screen

The screen names the client, lists what it may do and shows the site you will be sent back to. If Readstash does not recognise that site, the screen warns you and tells you to continue only if you started the connection yourself.

### Only registered clients get in

Readstash uses pre-registered OAuth clients; open self-service registration is off. A token must be signed by our authorisation server, belong to a signed-in person and carry a client id. A normal browser session token is rejected, so a leaked web session cannot drive the agent endpoint.

### Every call runs as you

Each tool call uses a database client bound to your token, under the same row-level security rules as the web app. An agent can reach your rows and no one else's.

### Mostly read-only, and it can be fully read-only

Agents can search and read. The one write tool saves an X post by URL. No tool deletes or edits a save. A client registered as read-only is not offered the write tool at all.

### Rate limited

Tool calls are limited per person, so an agent stuck in a loop is told to wait rather than hammering your library.

### How to revoke an agent

Remove Readstash from that assistant's connected apps or MCP settings. In Claude Code that is `claude mcp remove readstash`.

A limit worth knowing: Readstash does not yet have its own page listing connected assistants with a revoke button. If you need a connection cut from our side, [contact us](/contact).
 Your library
## Row-level isolation

Your saves are private to your account.

Readstash runs on Postgres with row-level security. Access rules are enforced in the database for each row, not only in the app, so a request made as you can only return rows that belong to you. Agent tools read your library through those rules on every call.

What we collect, how long we keep it and how to delete it is in the [privacy policy](/privacy-policy).
 Newsletters
## Prompt-injection safeguards for newsletters

Email is third-party content. Anyone who learns your Readstash address can send to it, so newsletter text is never trusted.

Prompt injection is when text an AI reads contains instructions meant to hijack it, for example an email that says to ignore previous instructions. A newsletter inbox that agents can read is an obvious place to try it, so the controls are layered and none of them depends on your address staying secret.

1. Layer 1
  ### Sender approval
  Mail from a sender you have not approved is held. It does not become a save, so search, the weekly brief and every agent tool cannot see it. No agent tool can approve, block or trust a sender; only you can, in the web app.
2. Layer 2
  ### Hidden-text stripping
  Text hidden with CSS or invisible characters is removed when an issue arrives, before anything is stored. Hidden text is a common way to smuggle instructions to an AI.
3. Layer 3
  ### Suspicious issues are held back from agents
  Each issue is scanned for wording aimed at an AI assistant rather than at a reader. A flagged issue still shows in your inbox with a warning, but agents cannot read it until you mark that sender as trusted.
4. Layer 4
  ### The untrusted-data envelope
  Every passage of newsletter text an agent receives sits between explicit BEGIN and END markers that name the sender and say to treat the text as data, never as instructions. A forged END marker inside the email is neutralised.
5. Layer 5
  ### Provenance on every issue
  When an agent reads an issue it also gets the sender address, that you approved the sender, whether the email passed SPF and DKIM checks, and the date it was received.
6. Layer 6
  ### Length caps and a record of reads
  Issue text is capped at 12,000 characters per read. Reads through an agent are recorded and shown in your inbox as "via assistant".

No filter catches every attack. The scan is a set of heuristics, and the envelope relies on your assistant respecting it. That is why sender approval comes first: content you never approved does not reach an agent at all.
 Plainly
## What we do not claim

- This page lists controls you can check in the product. It does not claim a security certification such as SOC 2 or ISO 27001.
- Readstash is a hosted service. Your library is stored on our infrastructure, not only on your device.
- Once an agent has read something from your library, what that assistant does with it is governed by its own provider's terms, not ours.

Found a security problem? Email [admin@readstash.app](mailto:admin@readstash.app). See also [Connect your AI agents](/agents) and the [glossary entry on prompt injection](/glossary#prompt-injection).
 Keep reading

- [Connect your AI agents What agents will be able to do, and where the rollout stands.](/agents)
- [How it works Save, read and organise, then a brief for you and a library for your agents.](/how-it-works)
- [Glossary MCP, AI memory, RAG, second brain and the other terms, defined plainly.](/glossary)

## A private library, opened only to the agents you approve

Read-only on X. Consent for every agent.

- A five-minute weekly brief of what you saved
- Agent access as it rolls out
- Free plan, no card

Read-only access to X. Disconnect any time. [See pricing](/pricing).
