Atlas / MCP servers / xrieros / okf-cli

okf-cliSAFE

mcp/xrieros/okf-cli

CLI + MCP server for Open Knowledge Format (OKF) v0.2 catalogues: hybrid BM25/semantic search, link-safe rename, validation. Python stdlib only.

Verdict
SAFE
Grade
B
Trust score
89 /100
Exposed tools
21 14r · 7w · 0d
Transport
—
License
Apache-2.0
Stars
0
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

Search, navigate, validate and refactor a catalogue of [Open Knowledge Format (OKF) v0.2](https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/main/SPEC.md) bundles — markdown files with YAML frontmatter, built for humans and AI agents.

  • Agent-ready. read returns one section, or a page together with the pages it links to, in one call; one command registers an MCP server and an agent skill with Claude Code, Codex, opencode, omp, Kimi Code, OpenClaw and Hermes; prime onboards a fresh agent session in one call.
  • Predictable. Every command answers --json with one envelope, and every failure has an exit code that names its class.
  • Hybrid search. Local SQLite FTS5/BM25 plus optional semantic arm (Voyage embeddings), narrowed by one --where filter language.
  • Safe refactoring. rename and archive move a concept and rewrite every inbound and outbound link. Every mutating command previews a unified diff before --apply writes it.
  • Trust and freshness. OKF v0.2 provenance (generated, sources, verified, stale_after) is checked by check, recorded by verify and queried by --where.
  • Catalogue-aware. Works across many bundles at once, not only one.

Keywords: Open Knowledge Format, OKF v0.2, knowledge base CLI, markdown frontmatter, MCP server, Claude Code, agent memory, Obsidian, BM25, link checker, wikilinks.

Install

okf is a single-file script with inline dependencies (PEP 723): Python 3.11 or newer, ruamel.yaml and argcomplete. `uv` reads that header and installs the packages on first use, so install uv first. Run it from a clone, or install it as a tool. Both end in the same step, okf install: it wires okf into your coding agents and shells, and previews before it writes anything.

# From a clone: runs in place, `git pull` updates it
git c
Read from source at commit 8efaf9619671OBSERVED · 2026-10-13
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.

claude-code
claude mcp add okf-cli --env VOYAGE_API_KEY=${VOYAGE_API_KEY} -- uvx okf-cli
claude-desktop
{
  "mcpServers": {
    "okf-cli": {
      "command": "uvx",
      "args": [
        "okf-cli"
      ],
      "env": {
        "VOYAGE_API_KEY": "${VOYAGE_API_KEY}"
      }
    }
  }
}
03

Exposed tools (21)

14 read · 7 write · 0 destructive.

ToolRiskDescription
okf_build_indexread(Re)build the FTS5 lexical index at <root>/.fts/fts.sqlite. Local
okf_build_semantic_indexreadFill <root>/.tagvec/tag_vectors.sqlite
okf_checkread§9 conformance scan (config-aware TYPES). Returns {findings}: a list of
okf_ctx_listreadCurated ctx bundles (_ctx/<slug>.md): slug, description, entry counts.
okf_ctx_showwriteOne ctx bundle in reading order: entries with live title, type,
okf_findreadRanked search across a catalogue/repo root, narrowed by a `where`
okf_indexreadCatalogue/bundle TOC. Without `bundle`, defaults to one entry per
okf_inforeadThe catalogue
okf_listwriteThe complete, unranked set of concepts a `where` expression selects;
okf_primereadOne-shot onboarding for a fresh session: what the store is, how to
okf_readreadPrint one concept page (bundle/concept-id). At most one of `section`,
okf_refsreadInbound and outbound markdown references of a file (reference-integrity step a).
okf_reindexreadRegenerate marker-bounded index listings for a bundle/subdir.
okf_renamewriteMove a concept and keep every reference intact: rewrites inbound links
okf_sync_exportwritePrint one canonical block
okf_sync_insertwriteMaterialise a canonical block inside a consumer concept, so the
okf_sync_statuswriteDrift report for every materialised canon block: returns
okf_sync_updatewriteRe-materialise every outdated consumer block from its canon owner.
okf_tagsreadList all tags with usage counts (query omitted), or fuzzy-search a
okf_tocreadSection headings of a concept.
okf_wikilinksreadObsidian wikilinks ([[...]]) in a catalogue, with the resolution status
04

Trust audit

SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codePASS
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (5 observation(s))
Network
declared (5 observation(s))
Shell
none-observed
Dependencies
pinned
Secrets in source
none-found

Findings (10)

LOWInventory / provenance · inv.hidden_file · CWE-1104
.beans.yml
.beans.yml
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
tests/golden/catalogue/.okf.toml
.okf.toml
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
cli/embeddings/build_tagvec.py:112
return hashlib.sha1(payload).hexdigest()
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
cli/embeddings/build_tagvec.py:156
return hashlib.sha1(payload).hexdigest()
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
cli/okf/sync.py:36
return hashlib.sha1(
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
scripts/skill-eval.py:99
snap[rel] = hashlib.sha1(p.read_bytes()).hexdigest()
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
tests/test_embeddings_tagvec.py:64
expected = hashlib.sha1(
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
tests/test_okf_navigation.py:133
self._w("a.md", "[O](../../outside.md)\n")
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
tests/test_okf_navigation.py:135
self.assertEqual(out["target"], os.path.abspath(os.path.join(self.tmp, "../../outside.md")))
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
tests/okf_golden.py:41
_NO_NETWORK = "http://127.0.0.1:9"  # discard port, closed: every proxied request is refused

Gates applied: no_behavioural_pass.

Audited 2026-10-13 · audit v0.4.1 · source sha 8efaf9619671full audit observations/trust-audit/mcp-server/xrieros__okf-cli.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-138efaf9619671SAFEB89first audit
06

Questions

What is the okf-cli MCP server?

CLI + MCP server for Open Knowledge Format (OKF) v0.2 catalogues: hybrid BM25/semantic search, link-safe rename, validation. Python stdlib only.

What tools does okf-cli expose?

21 in total: 14 read-only, 7 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.

Is okf-cli safe to connect to an agent?

The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.

What credentials does okf-cli need?

It reads VOYAGE_API_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How current is this page?

The grade is for one exact copy of the source (8efaf9619671), read on 2026-10-13. The repository is watched and re-audited when it changes.

Advertisement