okf-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@okf-mcp search for concepts about project planning"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
okf-mcp
An MCP server that gives LLMs full read/write access to an Open Knowledge Format (OKF) v0.1 knowledge bundle — usable as structured, persistent long-term memory.
What is OKF?
OKF represents knowledge as a directory of plain markdown files with YAML frontmatter. Every file is a concept:
---
type: Memory # REQUIRED — what kind of thing this is
title: Project kickoff notes
description: Key decisions from the 2026-07-12 kickoff meeting
tags: [project-alpha, decisions]
timestamp: 2026-07-12T09:00:00Z
---
# Decisions
- Use OKF as the canonical knowledge format.
- Bundle stored in git alongside the codebase.Concepts are organised in a directory hierarchy and can cross-link to each other
with standard markdown links. Two reserved filenames have special meaning:
index.md (directory listing) and log.md (change history).
Related MCP server: dragon-brain
MCP Tools
Tool | Description |
| List all concepts (or a subdirectory) |
| Read a full concept by ID |
| Full-text + tag + type search |
| Read an |
| Read a |
| Create a new concept (fails if exists) |
| Update body and/or frontmatter fields |
| Delete a concept |
| Write a custom |
| Auto-generate |
| Append a dated entry to |
Quick Start
Requirements
Python 3.11+
Install
git clone <this-repo>
cd okf-mcp
uv syncRun (stdio — for MCP clients)
uv run okf-mcpRun (HTTP — for testing)
uv run fastmcp run src/okf_mcp/server.py:mcp --transport http --port 8000Run with Docker
The Docker image serves MCP over HTTP on port 8000. Mount the bundle so
memories persist when the container is recreated:
docker build -t okf-mcp .
docker run --rm -p 8000:8000 \
-v okf-bundle:/app/bundle \
okf-mcpThe MCP endpoint is http://localhost:8000/mcp. To use this repository's local
bundle instead of a named Docker volume, run:
docker run --rm \
--name okf-mcp \
--user "$(id -u):$(id -g)" \
-p 8000:8000 \
--mount type=bind,src=/home/matteo/Documents/Dev/Personal/okf-mcp/bundle,dst=/app/bundle,rw \
okf-mcpThe --user option prevents Docker from creating root-owned files in the
mounted bundle. To run the container in the background:
docker run -d \
--name okf-mcp \
--restart unless-stopped \
--user "$(id -u):$(id -g)" \
-p 8000:8000 \
--mount type=bind,src=/home/matteo/Documents/Dev/Personal/okf-mcp/bundle,dst=/app/bundle,rw \
okf-mcpUse docker logs -f okf-mcp to view logs and docker stop okf-mcp to stop it.
Configure the bundle path
By default the bundle lives at ./bundle (relative to the working directory).
Override it with the OKF_BUNDLE_PATH environment variable:
OKF_BUNDLE_PATH=/path/to/my/bundle uv run okf-mcpVS Code Integration
Local UV server with GitHub Copilot
Install VS Code and the Python extension.
Install UV.
Install and sign in to the GitHub Copilot extensions.
Open this repository as a folder in VS Code.
Run
uv synconce in the integrated terminal.Open the Command Palette with
Ctrl+Shift+P, run MCP: List Servers, selectokf-knowledge-server, and choose Start if necessary.Open Copilot Chat, switch to Agent mode, and allow the server tools when prompted.
The repository includes .vscode/mcp.json. It starts the local server with UV
and uses ${workspaceFolder}/bundle as the memory store, so no manual MCP
configuration is required in VS Code.
Docker server with GitHub Copilot
If the Docker container is running on port 8000, change .vscode/mcp.json to
use the HTTP endpoint instead of the local stdio server:
{
"servers": {
"okf-knowledge-server": {
"type": "http",
"url": "http://127.0.0.1:8000/mcp"
}
}
}Restart the MCP server from the Command Palette after saving the file. Use either the UV configuration or the Docker configuration, not both at the same time.
Cline
Cline uses its own MCP settings file. For the local UV server, configure
okf-knowledge-server with the project path and bundle path:
"okf-knowledge-server": {
"type": "stdio",
"command": "uv",
"args": [
"run",
"--project",
"/home/matteo/Documents/Dev/Personal/okf-mcp",
"okf-mcp"
],
"env": {
"OKF_BUNDLE_PATH": "/home/matteo/Documents/Dev/Personal/okf-mcp/bundle"
},
"disabled": false,
"autoApprove": []
}For the Docker server, use an HTTP entry instead:
"okf-knowledge-server": {
"type": "streamableHttp",
"url": "http://127.0.0.1:8000/mcp",
"disabled": false,
"autoApprove": []
}After changing Cline's settings, restart or reconnect the MCP server in the
Cline MCP panel. Ask Cline to list the available tools; it should show
get_concept, create_concept, search_concepts, and the other OKF tools.
Security
All file paths are validated against
BUNDLE_ROOTto prevent path traversal.Reserved filenames (
index.md,log.md) are protected from concept create/update/delete operations.
Project Layout
src/okf_mcp/
├── __init__.py — exports `mcp`
└── server.py — FastMCP server with all tools
bundle/ — Default OKF knowledge bundle (git-tracked)
└── index.md — Bundle root indexAvailable Tools
11 toolsappend_log_entryA
Append a dated entry to the log.md file for a directory.
Entries are grouped under today's ISO 8601 date heading, newest first. Creates log.md if it does not exist.
Inputs: action (required), description (required), path. Returns: object
create_conceptA
Create a new OKF concept document.
Fails if the concept already exists — use update_concept to modify existing ones.
Inputs: type (required), concept_id (required), body, tags, +4 more. Returns: object
delete_conceptA
Delete a concept document from the bundle.
Also removes any parent directories that become empty after deletion (stopping at the bundle root).
Inputs: concept_id (required). Returns: object
generate_indexA
Auto-generate an index.md for a directory from existing concept frontmatter.
Scans only the immediate children of the directory (one level deep). Writes and returns the generated index content.
Inputs: path. Returns: object
get_conceptA
Retrieve a full concept document by its ID.
Returns the concept's frontmatter metadata and its markdown body.
Inputs: concept_id (required). Returns: object
get_indexA
Get the index.md content for a directory in the bundle.
Index files list the directory's concepts for progressive disclosure. Returns empty string if no index exists.
Inputs: path. Returns: result
get_logA
Get the log.md content for a directory in the bundle.
Log files contain the chronological history of changes. Returns empty string if no log exists.
Inputs: path. Returns: result
list_conceptsA
List all concepts in the bundle (or a subdirectory).
Returns concept_id, type, title, description, tags, and timestamp for each concept. Reserved files (index.md, log.md) are excluded.
Inputs: path. Returns: result
search_conceptsA
Search concepts by full-text query, tags, and/or type.
Case-insensitive substring search across concept IDs, titles, descriptions, and body content. All provided filters are ANDed together.
Inputs: path, tags, query, type_filter. Returns: result
update_conceptA
Update an existing OKF concept document.
Merges frontmatter_updates into existing metadata and refreshes the timestamp. Pass body=null to keep the existing body unchanged. Set a frontmatter key to null to remove it.
Inputs: concept_id (required), body, frontmatter_updates. Returns: object
update_indexB
Create or overwrite an index.md file for a directory.
Index files have no frontmatter (except the bundle root which may include okf_version) and list the directory's concepts for progressive disclosure. See OKF spec §6 for the recommended format.
Inputs: path, content. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool targets a distinct resource or action, but update_index and generate_index both write index.md and could be confused. Otherwise, get_concept, get_index, get_log, search, CRUD, and list are clearly separated.
All tools follow a consistent verb_noun pattern in snake_case, e.g., get_concept, create_concept, update_index, append_log_entry. The only minor deviation is list_concepts using plural, but the pattern remains highly predictable.
With 11 tools, the set is well-scoped for managing an OKF bundle. It covers concept CRUD, search, index handling, and log entries without excessive specialization or redundancy.
The server provides thorough coverage for concept lifecycle (create, read, update, delete, list, search) plus index and log management. Missing delete_index/log is not a gap since those files are overwritten or managed through other tools.
Maintenance
Related MCP Connectors
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
An MCP memory server. One memory your agents share — across models, devices and apps.
Cloud-hosted MCP server for durable AI memory
Persistent, portable memory for AI assistants — your private memory graph, from any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA local MCP memory server giving LLMs a persistent, auditable memory fabric with temporal awareness, relationship tracking, and contradiction detection.1MIT
- AlicenseNot gradedqualityDmaintenanceOpen-source MCP server that gives any LLM long-term memory using a knowledge graph and vector search hybrid. It stores entities, observations, and relationships, enabling semantic recall across sessions with automatic clustering and fail-loud infrastructure.51MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that provides persistent memory and contextual awareness to language models, enabling project onboarding, recall of architectural rules, and code consistency across sessions.32MIT
- AlicenseNot gradedqualityCmaintenanceA lightweight MCP server that provides long-term memory for LLMs by storing and retrieving important facts, decisions, and preferences through smart semantic search and automatic organization.12MIT