Your agent remembers. You can read every word.
Kybase is a self-hosted knowledge base for AI agents. Your agent searches and writes Markdown notes over MCP; you read, edit and link the same notes in your browser.
Free and open source under AGPL-3.0. Runs on your server or your laptop.
Why didn't we add a message broker back then?
search_notes "message broker decision"
found ADR-001, 2 sections
We decided against it in ADR-001. A broker would be one more system to run, monitor and back up, and the queue fits in Postgres. The note also says to revisit this once the queue passes 1,000 jobs a minute.
Source ADR-001 Postgres as the primary datastore
Decision
Jobs, documents and embeddings live in one Postgres. A second datastore needs a new ADR.
Why no broker
A broker would be one more system to run, monitor and back up. The job queue fits in Postgres, and one database means one backup. See Event Bus Architecture.
Revisit when
The queue passes 1,000 jobs a minute, or a second team needs the events.
How it works
-
Run it
One Docker Compose stack on your server, or
npx kybase-mcpon your laptop with nothing else to install. -
Connect your agent
Add the address to Claude, ChatGPT or Cursor and sign in once in your browser. Each app gets its own token you can revoke.
-
Work as usual
The agent looks things up before it answers and writes down what it learns. You open the same notes, fix them and link them.
Connect your agent
Kybase speaks MCP at /api/mcp. Apps that support OAuth sign in once in your browser, so your secret never goes into their settings.
claude mcp add --transport http --scope user kybase https://your-domain/api/mcp
Then run /mcp in Claude Code, pick kybase, choose Authenticate and enter your KYBASE_SECRET on the page that opens.
In Claude Desktop or claude.ai open Customize, then Connectors, then Add custom connector. Paste https://your-domain/api/mcp, choose Connect and sign in.
Claude connects from Anthropic's servers, so your Kybase has to be reachable over HTTPS.
In ChatGPT open Settings, then Plugins, then Add, then Add MCP server. Pick Streamable HTTP and paste https://your-domain/api/mcp. ChatGPT opens the Kybase sign-in page.
ChatGPT connects from its own servers too, so your Kybase has to be reachable over HTTPS.
Add this to ~/.cursor/mcp.json, then connect kybase under Customize, MCPs and sign in.
{
"mcpServers": {
"kybase": { "url": "https://your-domain/api/mcp" }
}
}
For one agent on your own computer: no Docker, no database to run. Put this in your app's MCP settings and restart it.
{
"mcpServers": {
"kybase": { "command": "npx", "args": ["-y", "kybase-mcp"] }
}
}
Notes live in ~/.kybase, and kybase-mcp export vault.zip gets them back out as Markdown.
What you get
- Notes you can read
- Everything the agent keeps is plain Markdown. Read it, correct it, search it, back it up.
- One memory for every agent
- Claude, ChatGPT, Cursor and the web app all work with the same notes.
- Search by words and by meaning
- An agent finds the right note whether or not it knows the exact wording.
- Reads and writes by section
- An agent opens the part of a long note it needs and adds to it without rewriting the rest.
- Links and a graph
[[Wikilinks]]connect notes, and the graph shows each folder as its own island.- Every change kept
- Each edit keeps the previous version, labelled with the app that made it, ready to restore.
Your notes stay with you
Kybase runs where you put it, on your server or your laptop. There is no Kybase account and no cloud service of ours in between.
With Ollama, notes and their embeddings never leave your machine. Google and OpenAI embeddings are there if you prefer them, and Settings says plainly that picking one sends note text to that provider.
- Open source, AGPL-3.0
- Export everything as Markdown in folders
- Each connected app has its own revocable token
Install
The full app gives you the web interface, the graph, share links and one knowledge base for several agents. It needs Docker and about 1 GB.
macOS and Linux
git clone https://github.com/Kyrzin/kybase.git
cd kybase
cp .env.example .env
sed -i.bak "s/^KYBASE_SECRET=$/KYBASE_SECRET=$(openssl rand -hex 32)/" .env
sed -i.bak "s/^POSTGRES_PASSWORD=$/POSTGRES_PASSWORD=$(openssl rand -hex 16)/" .env
rm -f .env.bak
docker compose pull && docker compose up -d
Windows commands are in the README.
Then
Open http://localhost:3000 and sign in with the KYBASE_SECRET from .env.
For search by meaning, pick an embedding provider in Settings: Ollama on your machine, or Google or OpenAI with an API key.
Then connect your agent.