kbrain

How-to guide

How to give AI agents access to company documents

The safe way to give an AI agent access to company documents is a curated, permissioned knowledge layer over MCP, not a raw dump of every file. Here is how it works.

Connect your knowledge over MCP

The reliable way to give an AI agent access to company documents is to put a curated knowledge layer between the agent and your files, and connect it over MCP. You do not point the agent at your entire drive. You expose a scoped, permissioned brain that the agent can query, so it retrieves only the relevant passages from sources you deliberately chose.

Why not just give it everything

Handing an agent raw access to every document sounds simple and goes wrong fast. Your file store is far bigger than any context window, so the agent cannot hold it all. Retrieval quality drops when duplicated, outdated, and half-finished drafts sit next to the canonical version. And access control gets dangerous: an agent that can read everything can surface things it should not. A curated layer fixes all three.

Two approaches - 01
Raw file access vs a curated knowledge layer
Both let an agent reach documents. Only one is precise and governable.
🗂️Point it at everything
- Duplicates and drafts pollute results
- No clear scope or ownership
- Sensitive files are one query away
- Too large to retrieve precisely
All
files exposed,
little control
🧠Curated brain over MCP
Only chosen sources are indexed
Scoped to a clear domain
Access is granted, not assumed
Retrieves the relevant passage
Scoped
the agent sees
only what it should
Curation is the control. Deciding what goes into the brain is how you decide what the agent can answer from, and what it cannot.

How to set it up

  • Decide the scope. Group the documents the agent actually needs, a policy set, a product spec library, a client folder, and leave everything else out.
  • Connect the sources to a knowledge layer. With KBrain, you point a brain at files, folders, PDFs, or a Google Drive folder, and it indexes them for retrieval.
  • Set access. Keep the brain private and grant it to the people or agents that should query it, so access is explicit rather than everyone-by-default.
  • Connect over MCP. Add the brain’s MCP endpoint to the agent. It now queries the brain and answers from your documents, retrieving only the relevant passages.

What good access looks like

  • Least privilege. The agent can reach the brain it was granted, nothing wider. Scope is set by what you index, not by what happens to sit in a shared drive.
  • Retrieval, not ingestion. The agent pulls the specific passage it needs at query time instead of loading whole documents into context.
  • Current by default. When a source document changes, the next query reflects it, so the agent is not answering from a stale copy.
  • Portable. One MCP endpoint serves Claude, ChatGPT, and any MCP-compatible agent, so access is defined once rather than per tool.

Access control is a curation decision, not an afterthought. What you choose to put in a brain, and who you grant it to, is exactly what the agent can and cannot answer from.

Connect your knowledge over MCP

Create or subscribe to a brain on KBrain, then connect its MCP endpoint to Claude, ChatGPT, or any MCP compatible assistant in a few minutes.

Frequently asked questions

Should I give an AI agent access to all our documents?

No. Scope it. Index only the documents the agent needs into a curated brain and grant access explicitly. Raw access to everything hurts retrieval quality and exposes files the agent should not surface.

How do I stop an agent from reading sensitive files?

Keep sensitive material out of the brains you connect, and keep brains private with granted access. The agent can only answer from what you indexed and were given, so curation and access grants are the control.

Do the documents leave our systems?

Your source systems stay the record. A knowledge layer like KBrain indexes selected content for retrieval and reads updates on the next query; the agent retrieves passages rather than taking a copy of your file store.