OKF Knowledge MCP
Automatically syncs changes to the knowledge base by committing and pushing to a Git repository upon write or delete operations.
Click on "Install 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 Knowledge MCPsearch knowledge for authentication rules"
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-knowledge-mcp
Model Context Protocol (MCP) server for querying, reading, writing, and automatically syncing an OKF (Open Knowledge Format) markdown knowledge base.
It acts as a secure, fast, and automated "shared brain" bridge for AI agents (like Claude Code, Cursor, and Cline) working in public or private repositories, letting them query or document architectural decisions and rules on the fly.
Features
TF-IDF Keyword Search: Highly relevance-ranked deterministic search over titles, descriptions, and file bodies, utilizing synonym expansion and kebab/underscore token parsing.
Auto-Discovery of Knowledge Root: Walks up ancestor directories to find a
knowledge/directory, falls back to a home directory config~/.okf-knowledge-mcp.jsonor custom environment variable.Write and Sync: Create or edit concept files with strict OKF v0.2 frontmatter compliance (
type,title,description,tags, etc.).Automatic Git Sync (Git-Ops): If your knowledge base is in a Git repo, writing or deleting concepts will automatically execute
git add,git commit, andgit pushto keep your remote repository in sync.Path Sanitization: Secure boundaries prevent directory traversal attacks.
Related MCP server: cortex-brain
Installation
You can run it directly via npx:
npx -y okf-knowledge-mcp1. Claude Desktop Configuration
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"okf-knowledge": {
"command": "npx",
"args": ["-y", "okf-knowledge-mcp"],
"env": {
"KNOWLEDGE_ROOT": "C:/g/knowledge"
}
}
}
}2. Claude Code or OpenCode Configuration
Register it directly:
claude mcp add okf-knowledge npx -y okf-knowledge-mcp --env KNOWLEDGE_ROOT="C:/g/knowledge"Tools Exposed
search_knowledge
Search the knowledge base using keyword TF-IDF relevance scoring.
query(string, required): Search termslimit(number, optional): Max results (default 5)minScore(number, optional): Min score threshold (default 0.15)
read_concept
Read a specific OKF concept file's parsed YAML frontmatter and body.
relativePath(string, required): Relative path under the knowledge root (e.g.rules/agent/afk-vs-hitl-tasks.md)
write_concept
Create or update a concept file with compliant frontmatter and body.
relativePath(string, required): Relative path under the knowledge roottype(enum, required):decision|rule|runbook|service|glossary|indextitle(string, required): Document titledescription(string, required): One-line summarytags(string[], required): Category tagsbody(string, required): Markdown body textconfidence(enum, optional):high|medium|lowdurability(enum, optional):durable|volatilestatus(enum, optional):active|deprecated|superseded|draftcustomFrontmatter(object, optional): Additional key/value frontmatter fields
delete_concept
Delete a concept file and run a Git sync.
relativePath(string, required): Relative path under the knowledge root
list_concepts
List all concepts in the knowledge base, optionally filtered by type or tag.
type(string, optional)tag(string, optional)
Configuration Options
The server looks for paths in the following priority order:
KNOWLEDGE_ROOTenvironment variable.An automatically discovered
knowledge/directory in CWD or any of its parents.The home folder config file:
~/.okf-knowledge-mcp.json.
If the Git auto-sync is not desired, set OKF_GIT_AUTO_SYNC=false in the environment.
License
MIT
This server cannot be installed
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/chirag127/okf-knowledge-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server