kindex

The memory layer Claude Code doesn't have.

Kindex does one thing. It knows what you know. A persistent knowledge graph so your AI assistant never starts a session blind.

$ pip install kindex[mcp]
$ claude mcp add -s user -t stdio kindex -- kin-mcp
v0.4.0 Claude Code Plugin 12 MCP Tools 42 CLI Commands MIT License Free

Why Kindex

Memory plugins capture what happened. Kindex captures what it means and how it connects.

Most memory tools are session archives with search. Kindex is a weighted knowledge graph that grows intelligence over time — understanding relationships, surfacing constraints, and managing exactly how much context to inject based on your available token budget.

Context-Aware by Design

Five context tiers auto-select based on available tokens. When other plugins dump everything into context, Kindex gives you 200 tokens of executive summary or 4000 tokens of deep context — whatever fits. Your plugin doesn't eat the context window.

Knowledge Graph, Not Log File

Nodes have types, weights, domains, and audiences. Edges carry provenance and decay over time. The graph understands what matters — not just what was said.

Operational Guardrails

Constraints block deploys. Directives encode preferences. Watches flag attention items. Checkpoints run pre-flight. No other memory plugin has this.

Team & Org Ready

.kin inheritance chains let a service repo inherit from a platform context, which inherits from an org voice. Private/team/org/public scoping with PII stripping on export.

Install as Claude Code Plugin

Two commands. Zero configuration. Claude gets 12 native tools for your knowledge graph.

# Install and register (one time) $ pip install kindex[mcp] $ claude mcp add --scope user --transport stdio kindex -- kin-mcp $ kin init # That's it. Claude Code now has: search — hybrid FTS5 + graph search add — capture knowledge with auto-linking context — formatted context block at any tier show — full node details with edges ask — question classification + answer learn — extract knowledge from text link — create edges between nodes list_nodes — browse with filters status — graph health + operational summary suggest — bridge opportunity suggestions graph_stats — centrality, communities, density changelog — recent changes

Or add .mcp.json to any repo for project-scope access:

{ "mcpServers": { "kindex": { "command": "kin-mcp" } } }

Also works as a standalone CLI (kin search, kin add, etc.) and via Claude Code hooks. Use whichever integration fits your workflow.

Context Tiers

The core differentiator. Other plugins inject context and hope for the best. Kindex manages exactly how much based on what's available.

TierBudgetUse Case
full~4000 tokensSession start, deep work — everything relevant
abridged~1500 tokensMid-session reference — key facts and connections
summarized~750 tokensQuick orientation — what matters right now
executive~200 tokensPost-compaction — just the essentials
index~100 tokensExistence check — "I know about X"

Auto-selected via --tokens budget or set explicitly with --level. The MCP context tool does this automatically.

Quick Start (CLI)

# Initialize a knowledge store $ kin init # Add knowledge $ kin add "Stigmergy is coordination through environmental traces" Created node: stigmergy-is-coordination-th (concept) # Search with hybrid FTS5 + graph traversal $ kin search stigmergy 0.85 stigmergy-is-coordination-th concept Stigmergy is coordination... # Ask questions (with automatic classification) $ kin ask "How does weight decay work?" [procedural question] # Track operational rules $ kin add "Never break the API contract" --type constraint --trigger pre-deploy # Ingest from all sources (GitHub, git, sessions, files) $ kin ingest all

Architecture

SQLite + FTS5 primary store and full-text search nodes: id, title, content, type, weight, audience, domains, extra edges: from_id, to_id, type, weight, provenance fts5: content synced via triggers Retrieval pipeline: FTS5 BM25 ──┐ Graph BFS ──┼── RRF merge ── tier formatter ── context block (vectors) ──┘ | full | abridged | summarized | executive | index Two integration paths: MCP plugin ──> Claude calls tools natively (search, add, learn, ...) CLI hooks ──> SessionStart/PreCompact/Stop lifecycle events

Node Types

Knowledge: concept, document, session, person, project, decision, question, artifact, skill

Operational: constraint (invariants), directive (soft rules), checkpoint (pre-flight checks), watch (attention flags)

.kin Voice & Inheritance

Companies publish .kin files that encode their voice, standards, and context. Teams inherit from orgs. Repos inherit from teams. The knowledge graph carries the voice forward automatically.

Org Voice

# ~/.kindex/voices/acme.kin name: acme-voice audience: org voice: tone: precise, direct principles: - Explain reasoning - Be honest about trade-offs standards: code_review: - Every PR needs a "why"

Platform Team

# platform/.kin name: platform audience: org domains: [engineering] inherits: - ~/.kindex/voices/acme.kin

Service Repo

# payments-service/.kin name: payments-service audience: team domains: [payments, python] inherits: - ../platform/.kin

The payments service gets: domains: [payments, python, engineering], Acme's voice principles, the platform's review standards, and audience: team (local wins). Parent directories are auto-walked when no explicit inherits is set. Example voice files included.

Integrations

GitHub

Ingest issues, PRs, and commits via gh CLI.

Linear

Ingest issues via GraphQL API.

Git Hooks

Post-commit records. Pre-push surfaces constraints.

File Watcher

SHA-256 change detection for registered files.

CLI Reference

42 commands organized by function. All support --data-dir, --config, and --json flags.

Core

kin search <query>Hybrid FTS5 + graph search with RRF merging
kin contextFormatted context block for AI injection (--level, --tokens)
kin add <text>Quick capture with auto-extraction and linking
kin show <id>Full node details with edges, provenance, and state
kin listList nodes (--type, --status, --mine, --limit)
kin ask <question>Question classification + LLM or context answer

Knowledge Management

kin learnExtract knowledge from sessions and inbox
kin link <a> <b>Create weighted edge between nodes
kin alias <id>Manage AKA/synonyms for a node
kin register <id> <path>Associate a file path with a node
kin orphansNodes with no connections
kin trail <id>Temporal history and provenance chain
kin decayApply weight decay to stale nodes/edges
kin recentRecently active nodes

Graph Analytics

kin graph [mode]Dashboard: stats, centrality, communities, bridges, trailheads
kin suggestBridge opportunity suggestions (--accept, --reject)
kin skills [person]Skill profile and expertise for a person
kin embedIndex all nodes for vector similarity search

Operational

kin statusGraph health + operational summary (--trigger, --owner)
kin set-audience <id>Set privacy scope (private/team/org/public)
kin set-state <id> <k> <v>Set mutable state on directives/watches
kin exportAudience-aware graph export with PII stripping
kin import <file>Import nodes/edges from JSON/JSONL
kin sync-linksUpdate node content with connection references

Ingestion

kin ingest <source>Ingest from: projects, sessions, files, commits, github, linear, all
kin cronOne-shot maintenance cycle (for crontab/launchd)
kin watchWatch for new sessions and ingest (--interval)
kin analyticsArchive session analytics and activity heatmap
kin indexWrite .kin/index.json for git tracking

Infrastructure

kin initInitialize data directory
kin config [show|get|set]View or edit configuration
kin setup-hooksInstall lifecycle hooks into Claude Code
kin setup-cronInstall periodic maintenance (launchd/crontab)
kin doctorHealth check with graph enforcement
kin migrateImport markdown topics into SQLite
kin budgetLLM spend tracking
kin whoamiShow current user identity
kin changelogWhat changed (--since, --days, --actor)
kin logRecent activity log
kin git-hookInstall/uninstall git hooks in a repository
kin primeGenerate context for SessionStart hook
kin compact-hookPre-compact knowledge capture