MCP server for Open Knowledge Format (OKF) bundles — expose okf-ingest's deterministic consume verbs (search, context, graph impact, diff, doctor) as agent tools.
Project description
okf-mcp
MCP server for Open Knowledge Format bundles — expose okf-ingest's deterministic consume verbs as tools any MCP client (Claude Code, Cursor, custom agents) can call.
Existing OKF MCP servers hand agents the markdown files. This one hands them the queryable catalog and concept graph: index-first context assembly, impact/backlink analysis, SQL over frontmatter, drift diffs, and health checks — all deterministic okf-ingest code, no model calls in the server.
Tools
| Tool | What the agent gets |
|---|---|
okf_list_bundles |
which bundles this server exposes |
okf_search |
concepts whose title/body match a term |
okf_get_concept |
one concept's frontmatter + full body |
okf_context |
the flagship — index.md + a concept's link-neighborhood as one curated markdown blob (the author's graph, not fuzzy matches) |
okf_impact |
inbound / outbound / transitive links — "what breaks if X changes" |
okf_sql |
read-only SELECT over the DuckDB catalog (okf_concept, okf_link, okf_validation) |
okf_diff |
what changed on disk since the server loaded the bundle — an agent's memory-refresh between looks |
okf_refresh |
re-ingest a directory bundle after okf_diff shows changes |
okf_doctor |
health score + per-rule findings before trusting a bundle |
Install & run
pip install okf-mcp # depends on okf-ingest >= 0.7.0
# one or more bundles: directories and/or okf-ingest .duckdb catalogs,
# optionally named (first one is the default target)
okf-mcp ~/my-bundle
okf-mcp wiki=~/wiki notes=~/vault snapshot=./kb.duckdb
Register with Claude Code:
claude mcp add okf -- okf-mcp ~/my-bundle
Or in any MCP client config:
{ "mcpServers": { "okf": { "command": "okf-mcp", "args": ["wiki=/path/to/bundle"] } } }
Design notes
- Read-only. Directory bundles are ingested into disposable in-memory
DuckDB catalogs at startup;
.duckdbsources open read-only;okf_sqlaccepts SELECT/WITH only. The server never writes to your bundle. - Deterministic. Every tool is plain okf-ingest code — same input, same answer; the only nondeterminism an agent sees is its own.
[[wikilinks]]work. Vault-style bundles (Obsidian/Logseq/Foam) resolve by id / alias / title / stem, same as okf-ingest 0.6.0+.
Apache-2.0. Sibling project: okf-ingest (the R + Python ingestion tool this wraps).
Project details
Release history Release notifications | RSS feed
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 okf_mcp-0.1.0.tar.gz.
File metadata
- Download URL: okf_mcp-0.1.0.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
003f5ce21e516ee1d60c96ba9ebc4c950b7d255346cda5ee5499bb43cda70ebc
|
|
| MD5 |
25769d04c6d6e774a395534cfdaefea8
|
|
| BLAKE2b-256 |
720e1de540b8e4fbcd2e68925cc9b5ac0a92151bf1624ff2b2fdb4cec0767578
|
File details
Details for the file okf_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: okf_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58cb781553bb4ff4969069f88b279650730617dbf0086fe3c31c5ef534c426b3
|
|
| MD5 |
cb294d065477e14ce4af0e3ebdc04d29
|
|
| BLAKE2b-256 |
d5f937af4ed5715482363630ecbe7ff3ad77964bab69e17a144ec512b191df05
|