CodeKB Search MCP Server
AI Agent 代码知识库检索服务 — 通过 MCP 协议将代码检索能力接入 Claude Code / OpenCode / Codex 等 AI 终端。
安装
# 推荐:uvx 自动拉取运行,无需预装
uvx codekb-mcp
# 或 pip 安装
pip install codekb-mcp
配置
环境变量
| 变量 | 默认值 | 说明 |
|---|---|---|
CODEKB_API_URL |
http://localhost:8000/api/v1 |
CodeKB API 地址 |
OpenCode (opencode.json)
{
"mcp": {
"codekb-search": {
"type": "local",
"command": ["uvx", "codekb-mcp"],
"enabled": true,
"environment": {
"CODEKB_API_URL": "http://your-server:8000/api/v1"
}
}
}
}
Claude Code (.mcp.json)
{
"mcpServers": {
"codekb-search": {
"command": "uvx",
"args": ["codekb-mcp"],
"env": {
"CODEKB_API_URL": "http://your-server:8000/api/v1"
}
}
}
}
Codex (.codex/config.toml)
[mcp_servers.codekb-search]
command = "uvx"
args = ["codekb-mcp"]
env = { CODEKB_API_URL = "http://your-server:8000/api/v1" }
enabled = true
startup_timeout_sec = 30
可用工具
| 工具 | 说明 |
|---|---|
codekb_list_repos |
列出可用仓库 |
codekb_get_repo_card |
仓库导航卡片(首次必调) |
codekb_search |
多路代码检索 (<200ms) |
codekb_symbol_search |
符号搜索 |
codekb_graph_expand |
调用链扩展 |
codekb_graph_path |
调用路径查询 |
codekb_file_knowledge |
文件级知识 |
使用流程
codekb_list_repos→ 了解有哪些仓库codekb_get_repo_card→ 获取仓库结构、业务域、可用过滤条件codekb_search→ 按语义/代码/结构/关键词多路检索codekb_graph_expand/codekb_graph_path→ 追踪调用链codekb_file_knowledge→ 深入了解文件设计
License
MIT
Metadata
Release files for codekb-mcp 0.1.1
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 | |
|---|---|---|---|---|
| codekb_mcp-0.1.1.tar.gz | 8.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| codekb_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.2 kB
Release files / codekb_mcp-0.1.1.tar.gz
| Download URL | codekb_mcp-0.1.1.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b194bf2f76a3e092bdb2054c4bbf98f5d118ace2f05ed32353a97717a1a7678c
|
|
BLAKE2b-256 checksum How to use checksums |
af48876704602ca3d8ce901f85a934756740bc43cb510d952db8ca716e00bfbf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / codekb_mcp-0.1.1-py3-none-any.whl
| Download URL | codekb_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
999ad7358febea19791a9c991de95938bdd49a732988ce5850a8b038c1591722
|
|
BLAKE2b-256 checksum How to use checksums |
2646beb0e9dc10c3dbb16d4d16ac0fd6c971aa1101a3ea2031662a06cda540cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for codekb-mcp 0.1.1
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.