# Kybase

A local Markdown note base your agent reaches over MCP: it reads, searches and links notes across sessions.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5
- Author: Kyrzin
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Kyrzin/kybase/tree/HEAD/packages/kybase-mcp
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/kybase

## What it does

Kybase starts with `npx kybase-mcp`. No Docker, no separate database to set up. On the first run it creates a knowledge base in `~/.kybase` and talks to the client over stdio. Notes stay plain Markdown inside Postgres, compiled to WebAssembly and running on your machine.

The agent gets 18 tools covering reading, searching, writing and linking. Full-text search is available right away in English and Russian, ignoring case and accents. Semantic search, which finds a note that shares no words with the question, needs an embedding provider. Ollama is the local choice: run `ollama pull embeddinggemma`, then `OLLAMA_URL=http://localhost:11434 npx kybase-mcp`. Nothing breaks without a provider — semantic search just sits idle, and `indexing_status` shows how indexing is going.

The embedded database is not a directory of `.md` files, so `kybase-mcp export vault.zip` writes the whole vault out as one. You get Markdown with frontmatter, folders as directories, `[[wikilinks]]` preserved. The same archive is what the full Kybase app takes under “Settings → Import .zip”. While the process runs it holds a few hundred MB of memory, since a full Postgres lives inside it. Pointing `DATABASE_URL` at a Postgres you already run avoids that, but then migrations belong to the app that owns the schema, not to this package.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `KYBASE_DATA_DIR`, `EMBEDDING_PROVIDER`, `OLLAMA_URL`, `OLLAMA_MODEL`, `GOOGLE_API_KEY`, `OPENAI_API_KEY`, `DATABASE_URL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env KYBASE_DATA_DIR=<KYBASE_DATA_DIR> --env EMBEDDING_PROVIDER=<EMBEDDING_PROVIDER> --env OLLAMA_URL=<OLLAMA_URL> --env OLLAMA_MODEL=<OLLAMA_MODEL> --env GOOGLE_API_KEY=<GOOGLE_API_KEY> --transport stdio kybase-mcp -- npx -y kybase-mcp
```
Replace <…> with your own values. 2 more environment variables are in the server README

### Codex

**Platform CLI**
```bash
codex mcp add kybase-mcp --env KYBASE_DATA_DIR=<KYBASE_DATA_DIR> --env EMBEDDING_PROVIDER=<EMBEDDING_PROVIDER> --env OLLAMA_URL=<OLLAMA_URL> --env OLLAMA_MODEL=<OLLAMA_MODEL> --env GOOGLE_API_KEY=<GOOGLE_API_KEY> -- npx -y kybase-mcp
```
Replace <…> with your own values. 2 more environment variables are in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "kybase-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "kybase-mcp"
            ],
            "env": {
                "KYBASE_DATA_DIR": "<KYBASE_DATA_DIR>",
                "EMBEDDING_PROVIDER": "<EMBEDDING_PROVIDER>",
                "OLLAMA_URL": "<OLLAMA_URL>",
                "OLLAMA_MODEL": "<OLLAMA_MODEL>",
                "GOOGLE_API_KEY": "<GOOGLE_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values. 2 more environment variables are in the server README

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "kybase-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "kybase-mcp"
            ],
            "env": {
                "KYBASE_DATA_DIR": "<KYBASE_DATA_DIR>",
                "EMBEDDING_PROVIDER": "<EMBEDDING_PROVIDER>",
                "OLLAMA_URL": "<OLLAMA_URL>",
                "OLLAMA_MODEL": "<OLLAMA_MODEL>",
                "GOOGLE_API_KEY": "<GOOGLE_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values. 2 more environment variables are in the server README

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e KYBASE_DATA_DIR=<KYBASE_DATA_DIR> -e EMBEDDING_PROVIDER=<EMBEDDING_PROVIDER> -e OLLAMA_URL=<OLLAMA_URL> -e OLLAMA_MODEL=<OLLAMA_MODEL> -e GOOGLE_API_KEY=<GOOGLE_API_KEY> kybase-mcp npx -y kybase-mcp
```
Replace <…> with your own values. 2 more environment variables are in the server README

## When to use it
- keep project context alive between agent sessions
- find a note by meaning when you forget the exact words
- export the whole note base as editable Markdown files
- link related notes with `[[wikilinks]]`
- keep agent memory local instead of in a cloud service

## Example prompts
- Remember that deploys go through staging and save it as a note.
- Search the base for everything I wrote about Postgres migrations.
- Link this note to the one about the service architecture.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
