canpoint-knowledge-mcp
面向业务项目的知识库 MCP。安装后,AI 助手可以直接检索和阅读你项目的知识库
文档:查大纲、混合检索、读全文与章节、沿文档引用关系跳转;项目发布后,
还能一键把最新的 docs/ 同步进知识库。
能做什么
查询 MCP(只读,绑定一个项目):
| 工具 | 能力 |
|---|---|
get_outline |
查看项目知识库的文档大纲(可按版本/分组过滤) |
search |
在项目范围内混合检索,命中结果带标题路径、父章节与行号 |
get_document |
按文档路径读取全文 |
get_section |
读取章节块及其父块、子块 |
hop |
沿文档之间的引用边跳转相邻内容 |
同步 MCP(发布后更新知识库):
| 工具 | 能力 |
|---|---|
sync_now(project_root) |
把业务项目 docs/ 下的最新文档提交到知识库,返回受理任务号;project_root 传业务项目的绝对根目录 |
sync_status(job_id) |
查询同步任务进度,done / failed 为终态 |
怎么用
前提:
- 一个可访问的 KB2 知识库服务(通常由团队统一部署,向管理员要地址)
- 通过 npm 使用时需要先安装 uv
启动前设置两个环境变量,把 MCP 绑定到服务和项目:
KB_SERVER_URL=http://your-kb-service:8001
KB_PROJECT_KEY=your-project
Claude Code 配置示例(.mcp.json):
{
"mcpServers": {
"kb2-query": {
"command": "npx",
"args": ["-y", "canpoint-knowledge-mcp"],
"env": {
"KB_SERVER_URL": "http://your-kb-service:8001",
"KB_PROJECT_KEY": "your-project"
}
},
"kb2-sync": {
"command": "npx",
"args": ["-y", "--package", "canpoint-knowledge-mcp", "kb2-sync-mcp"],
"env": {
"KB_SERVER_URL": "http://your-kb-service:8001",
"KB_PROJECT_KEY": "your-project"
}
}
}
}
也可以用 Python 方式安装运行:
pip install canpoint-knowledge-mcp # 提供 kb2-query-mcp / kb2-sync-mcp 命令
uvx canpoint-knowledge-mcp # 免安装直接运行查询 MCP
Codex 配置示例(~/.codex/config.toml):
[mcp_servers.kb2-query]
type = "stdio"
command = "npx"
args = ["-y", "canpoint-knowledge-mcp"]
[mcp_servers.kb2-query.env]
KB_SERVER_URL = "http://your-kb-service:8001"
KB_PROJECT_KEY = "your-project"
[mcp_servers.kb2-sync]
type = "stdio"
command = "npx"
args = ["-y", "--package", "canpoint-knowledge-mcp", "kb2-sync-mcp"]
[mcp_servers.kb2-sync.env]
KB_SERVER_URL = "http://your-kb-service:8001"
KB_PROJECT_KEY = "your-project"
Windows 下若 npx 启动失败,可把 command 改为 cmd、args 改为
["/c", "npx", "-y", "canpoint-knowledge-mcp"](env 表不变)。
推荐的发布规则(写入业务项目的 AGENTS.md):
发布成功后调用同步 MCP 的 sync_now(project_root="<当前项目绝对根目录>");
取得并汇报已受理的 job_id 后继续发布流程;除非知识库索引完成是发布门禁,
否则不要等待或轮询 sync_status。
项目
- 仓库与完整文档:https://github.com/mjwyr/canpoint-mcp
- 作者:若清风
- 协议:Apache-2.0
Metadata
Release files for canpoint-knowledge-mcp 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| canpoint_knowledge_mcp-0.1.9.tar.gz | 81.6 kB | Without provenance | Details for canpoint_knowledge_mcp-0.1.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| canpoint_knowledge_mcp-0.1.9-py3-none-any.whl | Python 3 | none | any | Details for canpoint_knowledge_mcp-0.1.9-py3-none-any.whl |
Total release size: 117.3 kB
Release files / canpoint_knowledge_mcp-0.1.9.tar.gz
| Download URL | canpoint_knowledge_mcp-0.1.9.tar.gz |
|---|---|
| Size | 81.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
07346c442768d4a5ec249cac6c964e8184ff0eaa3a60ab33615fad4d08a9ab64
|
|
BLAKE2b-256 checksum How to use checksums |
5549f3d22c9a3fa41fe3514ff731c7d4dc625e823072f769bb25cfc9de0bc3b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / canpoint_knowledge_mcp-0.1.9-py3-none-any.whl
| Download URL | canpoint_knowledge_mcp-0.1.9-py3-none-any.whl |
|---|---|
| Size | 35.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c36b3c534c800708a383e6746d01bc96c73586f0ca9da48e71afef6ea88b650
|
|
BLAKE2b-256 checksum How to use checksums |
025a4e1c9fb2d0239230c84f21a7cdc9fe7919b509bf41b0ac4237f7588f5d42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for canpoint-knowledge-mcp 0.1.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.