# AKB MCP server

> Provides a PostgreSQL-native knowledge base for AI agents to read and write documents, tables, files, and a URI graph using hybrid search.

- Repository: https://github.com/dnotitia/akb
- Page: https://hostedmcp.org/servers/dnotitia/akb
- Official: yes
- Transport: stdio
- Stars: 168
- Latest version: 2.0.4

## Install

### Claude Code

```sh
claude mcp add --env 'AKB_PAT=<YOUR_AKB_PAT>' --env 'AKB_MCP_URL=<AKB_MCP_URL>' akb -- npx -y akb-mcp
```

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

```json
{
  "mcpServers": {
    "akb": {
      "command": "npx",
      "args": [
        "-y",
        "akb-mcp"
      ],
      "env": {
        "AKB_PAT": "<YOUR_AKB_PAT>",
        "AKB_MCP_URL": "<AKB_MCP_URL>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "akb": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "akb-mcp"
      ],
      "env": {
        "AKB_PAT": "<YOUR_AKB_PAT>",
        "AKB_MCP_URL": "<AKB_MCP_URL>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"akb","type":"stdio","command":"npx","args":["-y","akb-mcp"],"env":{"AKB_PAT":"<YOUR_AKB_PAT>","AKB_MCP_URL":"<AKB_MCP_URL>"}}'
```

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

```json
{
  "mcpServers": {
    "akb": {
      "command": "npx",
      "args": [
        "-y",
        "akb-mcp"
      ],
      "env": {
        "AKB_PAT": "<YOUR_AKB_PAT>",
        "AKB_MCP_URL": "<AKB_MCP_URL>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add akb --env 'AKB_PAT=<YOUR_AKB_PAT>' --env 'AKB_MCP_URL=<AKB_MCP_URL>' -- npx -y akb-mcp
```

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

```toml
[mcp_servers.akb]
command = "npx"
args = ["-y", "akb-mcp"]

[mcp_servers.akb.env]
AKB_PAT = "<YOUR_AKB_PAT>"
AKB_MCP_URL = "<AKB_MCP_URL>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'AKB_PAT=<YOUR_AKB_PAT>' -e 'AKB_MCP_URL=<AKB_MCP_URL>' akb npx -- -y akb-mcp
```

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

```json
{
  "mcpServers": {
    "akb": {
      "command": "npx",
      "args": [
        "-y",
        "akb-mcp"
      ],
      "env": {
        "AKB_PAT": "<YOUR_AKB_PAT>",
        "AKB_MCP_URL": "<AKB_MCP_URL>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `AKB_PAT` | yes | yes | AKB Personal Access Token (akb_...). Create one in your AKB instance, or sign up on the public demo with any email to get one. |
| `AKB_MCP_URL` | yes | no | Your AKB backend MCP endpoint, e.g. https://akb.example.com/mcp/ — or try the public demo at https://akb-demo.agent.seahorse.dnotitia.ai/mcp/ |
| `AKB_NATIVE_CONFIG_DIR` | no | no |  |
| `AKB_NATIVE_IMAGE` | no | no |  |

## Tools (2)

- `akb_browse`
- `akb_drill_down`

## FAQ

### What is AKB?

AKB is an organizational memory for AI agents that serves a PostgreSQL-native knowledge base over the Model Context Protocol.

### How is data stored in AKB?

PostgreSQL is the source of truth for text and metadata, while a pluggable vector store like pgvector or Qdrant handles dense embeddings.
