@okfshare/mcp
okfshare CLI 和 MCP 服务器
本仓库为 okfshare 的客户端、开源部分:为 AI 编码代理提供共享、版本化的知识。
只需发布一次经过验证的 Markdown 包。所有已授权的代理都使用同一个不可变修订版工作,并且带有可审计的行级引用。托管服务保存修订版、引用和工作区授权信息;本仓库保存你的代理真正运行的工具。
包
包 | 命令 | 用途 |
| 命令行:setup、publish、search、context、diff、rollback | |
| 面向 Claude Code、Cursor、opencode、Codex 的 MCP 服务器 | |
| 将 okfshare 技能安装到代理工具中 |
Related MCP server: JacBrain
快速开始
# 1. One-time onboarding (device pairing in your browser)
npx okfshare@latest setup
# 2. Validate and publish a folder of Markdown
npx okfshare@latest validate ./knowledge
npx okfshare@latest publish ./knowledge --visibility public --yes
# 3. Any teammate's agent retrieves cited context
npx okfshare@latest context SHARE_ID "how do we handle db migrations"无头/CI 环境:通过 OKFSHARE_TOKEN 环境变量提供预先配置的凭据(仅检查其是否存在;切勿记录),然后使用 whoami 和 doctor 进行验证。
MCP 设置
claude mcp add okfshare -- npx @okfshare/mcp@latest或任何 MCP 客户端:
{
"mcpServers": {
"okfshare": {
"command": "npx",
"args": ["@okfshare/mcp@latest"]
}
}
}工具:whoami、doctor、list_shares、search_share、search_workspace、get_context、pull_bundle、publish_bundle。注册表清单:server.json。
为什么引用重要
检索会返回文件、精确的行号以及它们所在的不可变修订版。当代理声称“我们的约定是 X”时,你可以在几秒钟内验证这一说法——并且因为修订内容永远不会变动,一条引用在明天仍然意味着同样的含义。
Open Knowledge Format
Bundle 是带有结构化 frontmatter 的 Markdown:一个 type 字段、标签、来源和验证事件。该格式刻意保持小巧,并在任何编辑器中都可读。最坏情况下,你只会得到纯文件——没有任何锁定。
规范:https://github.com/GoogleCloudPlatform/knowledge-catalog/blob/main/okf/SPEC.md
指南(随 okfshare 一起发布):https://okfshare.app/s/ecf08367a22273482c0887ca8700ee8e
可 fork 的约定起始模板:https://okfshare.app/s/e8ddeda5aab619495c970f031dce7058
开发
pnpm install
pnpm check # typecheck + test + build across all packagesNode 20+ 和 pnpm 10。
各包使用位于
https://okfshare.app的托管 API 进行通信;开发它们无需本地服务器。查看 CONTRIBUTING.md 了解接收流程,查看 SECURITY.md 了解如何报告漏洞。
链接
网站和文档:https://okfshare.app
可供代理阅读的文档:https://okfshare.app/llms.txt 和 https://okfshare.app/llms-full.txt
许可证
Apache-2.0。参见 NOTICE — 代码许可证不授予对 okfshare 名称或品牌的任何权利。
This server cannot be deployed
Maintenance
Related MCP Connectors
Versioned documentation registry and semantic search for AI tools and coding assistants.
Securely search and manage workspace context files for AI agents and teams.
- ArtfctOAuthdev.artfct
Shared workspace for AI artifacts: your agents publish, search and cite each other's work.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables humans and AI coding agents to collaboratively write to a shared knowledge base with conflict-safe claims, code-anchored staleness detection, and synchronized human/agent documentation via MCP and REST.AGPL 3.0
- AlicenseBqualityBmaintenanceEnables AI coding agents to store and retrieve versioned project knowledge and compiler-verified Jac snippets, so they can reuse relevant context across tasks and validate candidate code with the Jac compiler.3MIT
- AlicenseNot gradedqualityAmaintenanceEnables humans and AI coding agents such as Claude Code, Codex, Cursor, and Gemini CLI to pass in-progress work between each other through shared, versioned, authenticated context that preserves decisions, artifacts, evidence, review history, and authorship. It exposes identity, search, retrieval, review, continuation, publishing, and portability tools over a Streamable HTTP endpoint.2MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents to create, search, read, write, and manage persistent structured repository context such as facts, decisions, regressions, preferences, sessions, and changelog entries. This helps agents orient themselves, avoid repeating past mistakes, and retain knowledge across coding sessions.48 npm2MIT