CodeKB Search MCP Server — AI Agent 代码知识库检索服务
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
codekb_mcp-0.1.0.tar.gz
(7.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codekb_mcp-0.1.0.tar.gz.
File metadata
- Download URL: codekb_mcp-0.1.0.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d735ef2026db38bce250cfcaa3d948cca93373a519aa16d41cc957d0f18d4cd1
|
|
| MD5 |
bf7e1f688573ad2a116927270206bd31
|
|
| BLAKE2b-256 |
71e9d066702e79c0c4ea981a4f48a84778b945c76e0e2131e8ce6686a0c3b39a
|
File details
Details for the file codekb_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: codekb_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0137ac29ab37f1c855ee62656ebb65253d3ca3e11df33497c26843443fd289c6
|
|
| MD5 |
bf6c8d554182d5f38529e00dcae7ef33
|
|
| BLAKE2b-256 |
339196921e0513e6a4a18ea43e9c0e47d46ffc9ff4eccdc12ea0b1c06d41664e
|