Minimal MCP server for searchable Markdown knowledge bases (SQLite FTS5)
Project description
Talk to your docs
kenso turns a folder of Markdown docs into a knowledge base you can talk to from your LLM. Ask questions, define tasks, brainstorm ideas — from your own docs. Zero config. No infrastructure. Always deterministic.
Docs · Getting Started · Writing Guide
Why kenso
Your documentation already has the answers. But finding them means remembering which file, scanning entire documents, or piecing together information scattered across multiple places. kenso lets you ask one question and get the right answer.
- Direct answers — finds the right paragraph without reading the whole doc.
- Cross-document reasoning — one question, ten docs, one synthesized answer.
- Natural queries — search how you think, not how the author wrote.
- Cross-domain — bridge code and business rules in one question.
- Define tasks, brainstorm, refine, explain — think with your docs, not from guesses.
- Generate docs from code — create documentation from your codebase.
Installation
With uv (recommended)
uv tool install kenso # → .agents/skills/ (standard — Codex, Cursor, Gemini CLI, ...)
uv tool install kenso --claude # → .claude/commands/ + .claude/skills/
uv tool install kenso --codex # → .codex/skills/ (legacy Codex projects)
With pip
pip install kenso[yaml] # install with YAML frontmatter support
kenso install # → .agents/skills/ (standard — Codex, Cursor, Gemini CLI, ...)
kenso install --claude # → .claude/commands/ + .claude/skills/
kenso install --codex # → .codex/skills/ (legacy Codex projects)
Claude Code
Add permissions so kenso CLI runs without confirmation prompts:
// .claude/settings.json
{
"permissions": {
"allow": [
"Bash(kenso search:*)",
"Bash(kenso stats:*)",
"Bash(kenso lint:*)",
"Bash(kenso ingest:*)"
]
}
}
Quick Start
Now open your LLM and initialize kenso:
# Claude Code
/kenso:init docs/ # initialize kenso with your docs
/kenso:ask How is code deployed to production?
# Codex CLI
$kenso:init docs/ # initialize kenso with your docs
$kenso:ask How is code deployed to production?
kenso works with any Markdown file.
To improve retrieval quality, see Writing Effective Documents.
Commands
Lifecycle
| Command | What it does |
|---|---|
kenso:init |
Analyzes your project, generates documentation, optimizes for retrieval, and indexes. Takes you from zero to a queryable knowledge base. |
kenso:update |
Detects code and doc changes, updates affected documentation, re-optimizes cross-links, re-indexes. Shows before/after metrics. |
kenso update --ci |
Headless version for CI/CD pipelines. Updates docs and opens a PR with a quality report. |
Consultation
| Command | What it does |
|---|---|
kenso:ask |
Ask a question, get a sourced answer from your docs. |
kenso:define |
Define a task with full project context — affected entities, rules, files, integration points, and acceptance criteria. |
kenso:brainstorm |
Explore ideas and trade-offs grounded in your real architecture and constraints. |
kenso:explain |
Understand why code exists — business rules, design decisions, domain context behind the implementation. |
How it compares
| Plain LLM | Embedding RAG | kenso | |
|---|---|---|---|
| Infrastructure | — | Model + vector DB + pipeline | pip install |
| Knows your project | ✗ | Partial | ✓ |
| Generates docs from code | ✗ | ✗ | ✓ |
| Keeps docs in sync | ✗ | ✗ | ✓ |
| Source citations | ✗ | Partial | ✓ |
| Deterministic | — | ✗ | ✓ |
| Semantic understanding | ✓ | ✓ | Relies on LLM |
| Vocabulary-independent | ✓ | ✓ | ✗ |
| Works with any content | ✓ | ✓ | Markdown only |
| Inspectable ranking | — | ✗ | ✓ |
| CI/CD automation | — | ✗ | ✓ |
| Free | ✗ | ✗ | ✓ |
kenso uses BM25 keyword search over SQLite — no embeddings, no vector database, no API costs for search. The LLM already understands meaning; kenso gives it the right source text
Writing Effective Documents
kenso works with any Markdown. Adding frontmatter improves retrieval:
---
title: CI/CD Deployment Pipeline
category: infrastructure
tags: deployment, CI/CD, rollback, blue-green
aliases:
- deploy pipeline
- continuous deployment
answers:
- How is code deployed to production?
relates_to:
- path: infrastructure/monitoring.md
relation: receives_from
---
Specific titles are indexed at 10× weight. Tags with synonyms your team uses help with vocabulary mismatch. A summary paragraph before the first H2 ensures the overview is always searchable.
See the full Writing Guide for field reference, structure tips, relation types, and a pre-commit checklist.
Performance
100% hit rate and 97.2% MRR across a 36-query eval harness covering 10 retrieval categories. Zero regressions across development. Run it yourself with python tests/eval/eval_harness.py.
Roadmap
kenso is under active development. Current focus areas:
-
Search quality — Tokenization for compound terms (camelCase, snake_case), synonym expansion via
.kenso/synonyms.yml, fuzzy matching for typos, smart snippets showing why a result matched. -
Near term —
/kenso:refine(expert panel review of task definitions), deprecated document support, BM25 score simulation during authoring, search log analysis. -
Long term — Multi-repo knowledge bases, real-time API data sources, Jira integration, controlled vocabulary as formal taxonomy.
See the full roadmap for details.
Troubleshooting
kenso search returns no results — Run kenso stats to check if docs are indexed. If zero docs, run kenso ingest <path>.
"No such table: chunks" — The database schema changed. Delete the database file (.kenso/docs.db or ~/.local/share/kenso/docs.db) and re-ingest.
MCP server not connecting — Verify the command path is correct. If installed in a venv, use the full path (e.g. /path/to/.venv/bin/kenso). Restart your editor after changing MCP config.
License
MIT
kenso — inspired by Japanese 検索 (kensaku): to search.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kenso-2.0.0.tar.gz.
File metadata
- Download URL: kenso-2.0.0.tar.gz
- Upload date:
- Size: 257.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2298e6bab7d7b8e185b16a40a44675fda4f7860c9c800edc5c96ad5e8adc8ac
|
|
| MD5 |
df5d1c2c9c4e0424f7110814869ff94f
|
|
| BLAKE2b-256 |
cb5c96ec8ff3a1eaa4019c24742d3e1090fa97491de346b15d26466612115878
|
Provenance
The following attestation bundles were made for kenso-2.0.0.tar.gz:
Publisher:
ci.yml on fvena/kenso
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kenso-2.0.0.tar.gz -
Subject digest:
e2298e6bab7d7b8e185b16a40a44675fda4f7860c9c800edc5c96ad5e8adc8ac - Sigstore transparency entry: 1113283224
- Sigstore integration time:
-
Permalink:
fvena/kenso@0a6caf56699b0db6ff9ab2ff54b6afc6b356780e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/fvena
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@0a6caf56699b0db6ff9ab2ff54b6afc6b356780e -
Trigger Event:
push
-
Statement type:
File details
Details for the file kenso-2.0.0-py3-none-any.whl.
File metadata
- Download URL: kenso-2.0.0-py3-none-any.whl
- Upload date:
- Size: 47.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1424d2aefc83e30a3b777c0983711912a5f7c43c7d4998be819829a00336030
|
|
| MD5 |
6961186c01846a9b0f13e3c71c6c2836
|
|
| BLAKE2b-256 |
7a593a1d84cd21b56a165e45d1cb5bf15f268a3dc9811b56214b0dc0d781b54d
|
Provenance
The following attestation bundles were made for kenso-2.0.0-py3-none-any.whl:
Publisher:
ci.yml on fvena/kenso
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kenso-2.0.0-py3-none-any.whl -
Subject digest:
f1424d2aefc83e30a3b777c0983711912a5f7c43c7d4998be819829a00336030 - Sigstore transparency entry: 1113283228
- Sigstore integration time:
-
Permalink:
fvena/kenso@0a6caf56699b0db6ff9ab2ff54b6afc6b356780e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/fvena
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@0a6caf56699b0db6ff9ab2ff54b6afc6b356780e -
Trigger Event:
push
-
Statement type: