Skip to main content

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 文件级知识

使用流程

  1. codekb_list_repos → 了解有哪些仓库
  2. codekb_get_repo_card → 获取仓库结构、业务域、可用过滤条件
  3. codekb_search → 按语义/代码/结构/关键词多路检索
  4. codekb_graph_expand / codekb_graph_path → 追踪调用链
  5. codekb_file_knowledge → 深入了解文件设计

License

MIT

Project details


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.1.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codekb_mcp-0.1.1-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file codekb_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: codekb_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for codekb_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b194bf2f76a3e092bdb2054c4bbf98f5d118ace2f05ed32353a97717a1a7678c
MD5 68cbfed86006f6128abb08bcc477f6d1
BLAKE2b-256 af48876704602ca3d8ce901f85a934756740bc43cb510d952db8ca716e00bfbf

See more details on using hashes here.

File details

Details for the file codekb_mcp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: codekb_mcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for codekb_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 999ad7358febea19791a9c991de95938bdd49a732988ce5850a8b038c1591722
MD5 060adcf4aabac8dd38c304cd57c670df
BLAKE2b-256 2646beb0e9dc10c3dbb16d4d16ac0fd6c971aa1101a3ea2031662a06cda540cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page