Skip to main content
Glama

⚑ Knowledge Master

Your codebase's memory. A local knowledge graph that gives AI agents real understanding of your architecture β€” not just text search.

License: MIT


Why

Every time you start a new AI chat, it forgets everything. You re-explain your architecture, conventions, dependencies. Knowledge Master gives your AI permanent, structured memory about your entire system.

Unlike flat RAG tools that return "chunks about X", Knowledge Master builds a graph β€” so it can answer "what breaks if I change X?" by traversing actual relationships.

Related MCP server: MemoryGraph

What it does

  • πŸ” Semantic search across all your code, docs, and configs

  • πŸ•ΈοΈ Knowledge graph β€” relationships between services, people, repos, technologies

  • πŸ’₯ Blast radius β€” "what depends on this service/file/technology?"

  • πŸ“ Convention enforcement β€” detects and enforces your team's patterns

  • πŸ€– MCP server β€” plugs directly into AI agents (Kiro, Claude, Cursor)

  • πŸ–₯️ Web UI β€” search, browse, visualize your knowledge graph

  • πŸ”’ Local-first β€” nothing leaves your machine

Prerequisites

Dependency

macOS

Ubuntu/Debian

Windows

Docker

brew install colima && colima start or Docker Desktop

sudo apt install docker.io docker-compose-plugin

Docker Desktop

Ollama

brew install ollama && ollama serve

curl -fsSL https://ollama.com/install.sh | sh

Ollama installer

Python 3.11+

brew install python@3.12

sudo apt install python3.12 python3.12-venv

python.org

Quick Start

# Install (pick one)
pip install knowledge-master          # from PyPI
pipx install knowledge-master         # isolated install (recommended)

# Or from source
git clone https://github.com/subzone/knowledge-master.git
cd knowledge-master
python3 -m venv .venv && source .venv/bin/activate
pip install -e .

# One command setup
km start

# Index your first repo
km index ~/path/to/your/project

# Search
km search "authentication flow"

# Check blast radius
km blast-radius postgres

# Start web UI with graph visualization
km serve

Requirements: Docker, Ollama, Python 3.11+

Features

Semantic Search with Graph Context

$ km search "how does auth work"
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Score  β”‚ Source               β”‚ Context             β”‚ Preview              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 0.847  β”‚ src/auth/service.py  β”‚ repo:myapp, by:Alex β”‚ JWT token validat... β”‚
β”‚ 0.791  β”‚ docs/auth.md         β”‚ repo:myapp          β”‚ Authentication f...  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Blast Radius Analysis

$ km blast-radius auth-service
πŸ’₯ Blast radius: auth-service
β”œβ”€β”€ βš™οΈ user-service (Service, via DEPENDS_ON)
β”œβ”€β”€ βš™οΈ payment-service (Service, via DEPENDS_ON)
β”œβ”€β”€ πŸ“¦ frontend (Repo, via USES_SERVICE)
└── πŸ‘€ Alex (Person, via AUTHORED)

4 entities affected

Convention Enforcement

$ km check-conventions ~/my-project
  βœ“ src/ directory (structure)
  βœ“ separate test directory (testing)
  βœ— snake_case files (file-naming)
  βœ“ Repository pattern (design-pattern)

1 convention(s) violated

Web UI & Graph Visualization

$ km serve
Knowledge Master UI β†’ http://127.0.0.1:9999

Interactive force-directed graph showing your entire knowledge topology:

  • πŸ“¦ Repos (blue) β†’ πŸ”§ Technologies (red)

  • βš™οΈ Services (orange) β†’ Dependencies

  • πŸ‘€ People β†’ Authorship

  • πŸ“ Conventions (purple)

MCP Integration (AI Agents)

Add to your Kiro/Claude agent config:

{
  "mcpServers": {
    "knowledge": {
      "command": "km-server"
    }
  }
}

Your AI agent gets these tools:

  • search β€” semantic search with graph context

  • blast_radius β€” dependency analysis

  • check_conventions β€” verify code follows team patterns

  • index_repo β€” add new repos to the knowledge base

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  Your AI Agent                    β”‚
β”‚              (Kiro / Claude / Cursor)             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚ MCP Protocol
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              Knowledge Master                    β”‚
β”‚                                                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  Search  β”‚  β”‚Blast Radiusβ”‚  β”‚ Conventionsβ”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚       β”‚               β”‚               β”‚         β”‚
β”‚  β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚            FalkorDB (Graph + Vector)       β”‚  β”‚
β”‚  β”‚                                           β”‚  β”‚
β”‚  β”‚  [Repo]──USES_TECH──▢[Tech]              β”‚  β”‚
β”‚  β”‚    β”‚                                      β”‚  β”‚
β”‚  β”‚    β”œβ”€β”€DEFINES_SERVICE──▢[Service]         β”‚  β”‚
β”‚  β”‚    β”‚                      β”‚               β”‚  β”‚
β”‚  β”‚    β”œβ”€β”€FOLLOWS──▢[Convention]              β”‚  β”‚
β”‚  β”‚    β”‚                                      β”‚  β”‚
β”‚  β”‚  [Person]──AUTHORED──▢[Document]          β”‚  β”‚
β”‚  β”‚                          β”‚                β”‚  β”‚
β”‚  β”‚                    [Chunk + Embedding]     β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚         Ollama (nomic-embed-text)          β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Commands

Command

Description

km start

Boot Docker containers + pull embedding model

km stop

Stop containers

km index <path>

Index a git repo or docs directory

km search <query>

Semantic search with graph context

km blast-radius <target>

Show dependencies and affected entities

km check-conventions <path>

Verify code follows detected patterns

km list

Show indexed repos, techs, stats

km remove <name>

Remove a source from the knowledge base

km serve

Start web UI at http://127.0.0.1:9999

km status

Check system health

What gets extracted automatically

When you index a repo, Knowledge Master detects:

Category

Examples

Tech stack

Languages, frameworks, packages from dependency files

Services

From docker-compose.yml and K8s manifests

Dependencies

Service-to-service relationships

Conventions

File naming (snake_case/kebab-case), folder structure, design patterns

People

Git commit authors and file ownership

Code structure

Functions, classes, chunked by AST-aware boundaries

Comparison

Feature

Knowledge Master

Generic RAG

GitHub Copilot

Glean

Graph relationships

βœ…

❌

❌

Partial

Blast radius analysis

βœ…

❌

❌

❌

Convention enforcement

βœ…

❌

❌

❌

Local-first (no cloud)

βœ…

βœ…

❌

❌

MCP integration

βœ…

❌

❌

❌

Multi-repo intelligence

βœ…

Partial

❌

βœ…

Cost

Free

Free

$19/mo

$15-30/mo

Development

# Run tests
pytest

# Lint
ruff check knowledge_master/

# Run MCP server directly
python -m knowledge_master.server

# Run CLI directly
python -m knowledge_master.cli status

Troubleshooting

Issue

Fix

km start fails with "Docker not running"

Start Docker: colima start (macOS) or sudo systemctl start docker (Linux)

km start fails with "Ollama not found"

Install Ollama from https://ollama.com and run ollama serve

km index is slow

First run downloads the embedding model (~274MB). Subsequent runs are fast.

Web UI shows "Connection refused"

Make sure containers are running: km start

Search returns poor results

Index more content. Quality improves with more context in the graph.

Port 9999 already in use

Use km serve --port 8888

License

MIT

Install Server
A
license - permissive license
A
quality
A
maintenance

Maintenance

–Maintainers
–Response time
0dRelease cycle
5Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/subzone/knowledge-master'

If you have feedback or need assistance with the MCP directory API, please join our Discord server