# okf-mcp

okf-mcp is an MCP server for coding agents that validates Open Knowledge Format v0.2 bundles, builds a link graph, and searches their contents.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 8 repo stars
- Author: mfdaves
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/mfdaves/okf-mcp
- Updated: 2026-09-19
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/okf-mcp

## What it does

okf-mcp exposes Open Knowledge Format v0.2 directories to coding assistants. It scans Markdown files with YAML frontmatter, builds a graph of cross-references, and provides in-memory BM25+ text search via MiniSearch. The core works without vector databases, remote cloud endpoints, or compilation steps.

When external producers create documentation bundles, okf-mcp applies ownership manifests. Hand-written files stay untouched, and automated generators cannot step outside their target folder. The tool inspects execution contracts purely at the syntax level and will never execute referenced source files.

Running the package requires Node 22 or higher. In standard single-root setups, the server operates entirely offline over stdio.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add okf-mcp -- npx -y @mfdaves/okf-mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add okf-mcp -- npx -y @mfdaves/okf-mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "okf-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@mfdaves/okf-mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "okf-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@mfdaves/okf-mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add okf-mcp npx -y @mfdaves/okf-mcp
```

## When to use it
- expose local OKF v0.2 documentation trees to AI coding assistants
- perform in-memory BM25+ searches across project notes without vector stores
- validate concept schemas and cross-reference links inside Markdown bundles
- prevent automated catalog generators from overwriting hand-crafted notes

## Example prompts
- Search the local OKF bundle for concepts related to authorization
- Validate the structure and links of all files in `./knowledge-base`
- Inspect the provenance and dependency graph for `overview/okf-mcp`

## Similar
- [okf-knowledge-base](https://affpapa.org/en/nevibecode/skills/okf-knowledge-base.md) — skill · 9400 installs
- [okf](https://affpapa.org/en/nevibecode/skills/okf.md) — skill · 1200 installs
- [okf-open-knowledge-format](https://affpapa.org/en/nevibecode/skills/okf-open-knowledge-format.md) — skill · ★ 141 repo stars
- [memory-okf](https://affpapa.org/en/nevibecode/skills/memory-okf.md) — skill · 305 installs
- [okf-produce](https://affpapa.org/en/nevibecode/skills/okf-produce.md) — skill · ★ 105 repo stars
- [firecrawl-knowledge-ingest](https://affpapa.org/en/nevibecode/skills/firecrawl-knowledge-ingest.md) — skill · 31600 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
