OKF Knowledge MCP
MCP server for managing an OKF markdown knowledge base, enabling AI agents to query, read, write, and auto-sync architectural decisions and rules via Git.
README
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.
Installation
You can run it directly via npx:
npx -y okf-knowledge-mcp
1. 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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。