Skip to main content

Crate mdkb

Crate mdkb 

Source
Expand description

mdkb - Local markdown knowledge base with semantic search.

A Rust CLI tool and MCP server for indexing and searching markdown files.

§Architecture

The crate follows hexagonal architecture with three main layers:

  • Domain: Core business logic (entities, operations)
  • Store: SQLite storage layer (rusqlite + FTS5)
  • CLI/MCP: User interfaces (clap CLI, rmcp MCP server)

Modules§

cli
CLI layer - command parsing and execution with clap.
code
Code intelligence for multi-language source analysis.
config
Configuration management for .mdkb/config.toml.
daemon
Multi-repo daemon: manages N repositories through a single Unix domain socket.
domain
Domain layer - core business logic (hexagonal architecture).
error
Error types for mdkb.
llm
Embedding service for semantic search.
mcp
MCP (Model Context Protocol) server implementation.
metrics
Usage metrics and token tracking for MCP responses.
store
Storage layer - SQLite with FTS5 for full-text search.
watcher
File system watcher for auto-reindexing.

Structs§

Config
Main configuration structure.
DaemonConfig
Daemon configuration.
Error
Main error type for mdkb operations.

Enums§

ErrorKind
The specific kind of error that occurred.

Type Aliases§

Result
Result type alias for mdkb operations.