# kbdb MCP server

> Provides AI agents with a file-based second brain using hybrid keyword and semantic search over Markdown documents.

- Repository: https://github.com/diko316/knowledge-base-db
- Page: https://hostedmcp.org/servers/diko316/knowledge-base-db
- Transport: stdio
- Stars: 0
- License: AGPL-3.0
- Latest version: 1.0.3

## Install

### Claude Code

```sh
claude mcp add knowledge-base-db -- npx -y @dikolab/kbdb
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "knowledge-base-db": {
      "command": "npx",
      "args": [
        "-y",
        "@dikolab/kbdb"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "knowledge-base-db": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@dikolab/kbdb"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"knowledge-base-db","type":"stdio","command":"npx","args":["-y","@dikolab/kbdb"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "knowledge-base-db": {
      "command": "npx",
      "args": [
        "-y",
        "@dikolab/kbdb"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add knowledge-base-db -- npx -y @dikolab/kbdb
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.knowledge-base-db]
command = "npx"
args = ["-y", "@dikolab/kbdb"]
```

### Gemini CLI

```sh
gemini mcp add -s user knowledge-base-db npx -- -y @dikolab/kbdb
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "knowledge-base-db": {
      "command": "npx",
      "args": [
        "-y",
        "@dikolab/kbdb"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `HOST_UMASK` | no | no |  |

## FAQ

### Does kbdb require an external database or cloud account?

No, it is a file-based knowledge base that runs entirely on your local disk with no external server or cloud account required.

### How does the search algorithm work?

By default, it uses keyword search with synonym expansion and relevance ranking. You can also enable hybrid search to blend keyword matching with semantic similarity.

### What are the system requirements for running kbdb?

You need either Node.js version 20 or newer, or Deno version 2.6 or newer.

### Can kbdb handle duplicate information?

Yes, it features near-duplicate detection that uses embedding similarity to warn you when you are learning facts that have already been recorded.
