只需几秒钟即可将您的AI助手连接到CodeAlive的强大代码理解平台!
此MCP(模型上下文协议)服务器使AI客户端如Claude Code、Cursor、Claude Desktop、Continue、VS Code(GitHub Copilot)、Cline、Codex、OpenCode、Qwen Code、Gemini CLI、Roo Code、Goose、Kilo Code、Windsurf、Kiro、Qoder、n8n和Amazon Q Developer能够访问CodeAlive的高级语义代码搜索和代码库交互功能。
CodeAlive是最准确和全面的上下文引擎服务,针对大型代码库进行了优化,并通过先进的GraphRAG提供支持,可通过MCP访问。它丰富了诸如Cursor、Claude Code、Codex等AI代理的上下文,使其效率提高35%,速度最多可提升84%。
它就像Context7,但专为您的(大型)代码库设计。
它允许AI编码代理:
一旦连接,您将可以访问这些强大的工具:
get_data_sources - 列出已索引的存储库和工作区codebase_search - 在已索引的代码库中进行语义代码搜索(主/主分支)codebase_consultant - 具有完整项目专业知识的AI顾问设置完成后,您可以尝试以下命令与您的AI助手互动:
get_data_sourcescodebase_searchcodebase_consultant最快的方式开始 - 不需要安装!我们的远程MCP服务器位于 https://mcp.codealive.ai/api,提供即时访问CodeAlive的功能。
选择您偏好的AI客户端以进行即时设置:
您可以要求您的AI代理为您安装CodeAlive MCP服务器。
这是CodeAlive API密钥:PASTE_YOUR_API_KEY_HERE
按照README中的安装指南添加CodeAlive MCP服务器:https://raw.githubusercontent.com/CodeAlive-AI/codealive-mcp/main/README.md
找到“AI客户端集成”部分并定位您的客户端(Claude Code、Cursor、Gemini CLI等)。每个客户端都有特定的设置说明:
- 对于Gemini CLI:使用单命令设置 `gemini mcp add`
- 对于Claude Code:使用 `claude mcp add` 并加上 `--transport http` 标志
- 对于其他客户端:遵循提供的配置片段
当可用时,请优先选择远程HTTP选项。如果上面没有提供API密钥,请先帮助我生成一个CodeAlive API密钥。
然后允许执行。
选项1:远程HTTP(推荐)
claude mcp add --transport http codealive https://mcp.codealive.ai/api --header "Authorization: Bearer YOUR_API_KEY_HERE"
选项2:Docker(STDIO)
claude mcp add codealive-docker /usr/bin/docker run --rm -i -e CODEALIVE_API_KEY=YOUR_API_KEY_HERE ghcr.io/codealive-ai/codealive-mcp:v0.3.0
将 YOUR_API_KEY_HERE 替换为您的实际API密钥。
选项1:远程HTTP(推荐)
Cmd+, 或 Ctrl+,){
"mcpServers": {
"codealive": {
"url": "https://mcp.codealive.ai/api",
"headers": {
"Authorization": "Bearer YOUR_API_KEY_HERE"
}
}
}
}
选项2:Docker(STDIO)
{
"mcpServers": {
"codealive": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "CODEALIVE_API_KEY=YOUR_API_KEY_HERE",
"ghcr.io/codealive-ai/codealive-mcp:v0.3.0"
]
}
}
}
</details>
<details>
<summary><b>Codex</b></summary>
OpenAI Codex CLI通过 ~/.codex/config.toml 支持MCP。
~/.codex/config.toml(Docker stdio – 推荐)
[mcp_servers.codealive]
command = "docker"
args = ["run", "--rm", "-i",
"-e", "CODEALIVE_API_KEY=YOUR_API_KEY_HERE",
"ghcr.io/codealive-ai/codealive-mcp:v0.3.0"]
实验性:流式HTTP(需要启用实验性Rust MCP客户端)
注意: 流式HTTP支持需要在您的Codex配置中启用实验性Rust MCP客户端。
[mcp_servers.codealive]
url = "https://mcp.codealive.ai/api"
headers = { Authorization = "Bearer YOUR_API_KEY_HERE" }
</details>
<details>
<summary><b>Gemini CLI</b></summary>
一键设置(完整):
gemini mcp add --transport http secure-http https://mcp.codealive.ai/api --header "Authorization: Bearer YOUR_API_KEY_HERE"
将 YOUR_API_KEY_HERE 替换为您的实际API密钥。就这样 - 不需要配置文件!🎉
选项1:远程HTTP(推荐)
~/.continue/config.yaml 中创建或编辑 .continue/config.yamlmcpServers:
- name: CodeAlive
type: streamable-http
url: https://mcp.codealive.ai/api
requestOptions:
headers:
Authorization: "Bearer YOUR_API_KEY_HERE"
选项2:Docker(STDIO)
mcpServers:
- name: CodeAlive
type: stdio
command: docker
args:
- run
- --rm
- -i
- -e
- CODEALIVE_API_KEY=YOUR_API_KEY_HERE
- ghcr.io/codealive-ai/codealive-mcp:v0.3.0
</details>
<details>
<summary><b>Visual Studio Code with GitHub Copilot</b></summary>
选项1:远程HTTP(推荐)
注意: VS Code同时支持流式HTTP和SSE传输,如果流式HTTP失败会自动回退到SSE。
Ctrl+Shift+P 或 Cmd+Shift+P){
"servers": {
"codealive": {
"type": "http",
"url": "https://mcp.codealive.ai/api",
"headers": {
"Authorization": "Bearer YOUR_API_KEY_HERE"
}
}
}
}
选项2:Docker(STDIO)
在您的工作区创建 .vscode/mcp.json:
{
"servers": {
"codealive": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "CODEALIVE_API_KEY=YOUR_API_KEY_HERE",
"ghcr.io/codealive-ai/codealive-mcp:v0.3.0"
]
}
}
}
</details>
<details>
<summary><b>Claude Desktop</b></summary>
注意: Claude Desktop远程MCP需要OAuth认证。使用Docker选项以支持Bearer令牌。
Docker(STDIO)
编辑您的配置文件:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json添加以下配置:
{
"mcpServers": {
"codealive": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "CODEALIVE_API_KEY=YOUR_API_KEY_HERE",
"ghcr.io/codealive-ai/codealive-mcp:v0.3.0"
]
}
}
}
选项1:远程HTTP(推荐)
{
"mcpServers": {
"codealive": {
"url": "https://mcp.codealive.ai/api",
"headers": {
"Authorization": "Bearer YOUR_API_KEY_HERE"
}
}
}
}
选项2:Docker(STDIO)
{
"mcpServers": {
"codealive": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "CODEALIVE_API_KEY=YOUR_API_KEY_HERE",
"ghcr.io/codealive-ai/codealive-mcp:v0.3.0"
]
}
}
}
</details>
<details>
<summary><b>OpenCode</b></summary>
在您的 opencode.json 中将CodeAlive作为远程MCP服务器添加。
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"codealive": {
"type": "remote",
"url": "https://mcp.codealive.ai/api",
"enabled": true,
"headers": {
"Authorization": "Bearer YOUR_API_KEY_HERE"
}
}
}
}
</details>
<details>
<summary><b>Qwen Code</b></summary>
Qwen Code通过其 settings.json 中的 mcpServers 和多种传输方式(stdio/SSE/流式HTTP)支持MCP。当可用时使用流式HTTP;否则使用Docker(stdio)。
~/.qwen/settings.json(流式HTTP)
{
"mcpServers": {
"codealive": {
"type": "streamable-http",
"url": "https://mcp.codealive.ai/api",
"requestOptions": {
"headers": {
"Authorization": "Bearer YOUR_API_KEY_HERE"
}
}
}
}
}
备用:Docker(stdio)
{
"mcpServers": {
"codealive": {
"type": "stdio",
"command": "docker",
"args": ["run", "--rm", "-i",
"-e", "CODEALIVE_API_KEY=YOUR_API_KEY_HERE",
"ghcr.io/codealive-ai/codealive-mcp:v0.3.0"]
}
}
}
</details>
<details>
<summary><b>Roo Code</b></summary>
Roo Code读取类似于Cline的JSON设置文件。
全局配置: mcp_settings.json(Roo)或 cline_mcp_settings.json(Cline风格)
选项A — 远程HTTP
{
"mcpServers": {
"codealive": {
"type": "streamable-http",
"url": "https://mcp.codealive.ai/api",
"headers": {
"Authorization": "Bearer YOUR_API_KEY_HERE"
}
}
}
}
选项B — Docker(STDIO)
{
"mcpServers": {
"codealive": {
"type": "stdio",
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "CODEALIVE_API_KEY=YOUR_API_KEY_HERE",
"ghcr.io/codealive-ai/codealive-mcp:v0.3.0"
]
}
}
}
</details> <details> <summary><b>Goose</b></summary>提示: 如果您的Roo构建不遵守HTTP头,请使用Docker/STDIO选项。
UI路径: 设置 → MCP服务器 → 添加 → 选择流式HTTP
流式HTTP配置:
codealivehttps://mcp.codealive.ai/apiAuthorization: Bearer YOUR_API_KEY_HEREDocker(STDIO)替代方案:
添加一个STDIO扩展:
dockerrun --rm -i -e CODEALIVE_API_KEY=YOUR_API_KEY_HERE ghcr.io/codealive-ai/codealive-mcp:v0.3.0UI路径: 管理 → 集成 → 模型上下文协议(MCP)→ 添加服务器
HTTP
{
"mcpServers": {
"codealive": {
"type": "streamable-http",
"url": "https://mcp.codealive.ai/api",
"headers": {
"Authorization": "Bearer YOUR_API_KEY_HERE"
}
}
}
}
STDIO(Docker)
{
"mcpServers": {
"codealive": {
"type": "stdio",
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "CODEALIVE_API_KEY=YOUR_API_KEY_HERE",
"ghcr.io/codealive-ai/codealive-mcp:v0.3.0"
]
}
}
}
</details>
<details>
<summary><b>Windsurf(Codeium)</b></summary>
文件: ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"codealive": {
"type": "streamable-http",
"serverUrl": "https://mcp.codealive.ai/api",
"headers": {
"Authorization": "Bearer YOUR_API_KEY_HERE"
}
}
}
}
</details>
<details>
<summary><b>Kiro</b></summary>
注意: Kiro目前尚未原生支持远程MCP服务器。使用
mcp-remote工作绕过以连接到远程HTTP服务器。
前提条件:
npm install -g mcp-remote
UI路径: 设置 → MCP → 添加服务器
全局文件: ~/.kiro/settings/mcp.json
工作区文件: .kiro/settings/mcp.json
远程HTTP(通过mcp-remote工作绕过)
{
"mcpServers": {
"codealive": {
"type": "stdio",
"command": "npx",
"args": [
"mcp-remote",
"https://mcp.codealive.ai/api",
"--header",
"Authorization: Bearer ${CODEALIVE_API_KEY}"
],
"env": {
"CODEALIVE_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
Docker(STDIO)
{
"mcpServers": {
"codealive": {
"type": "stdio",
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "CODEALIVE_API_KEY=YOUR_API_KEY_HERE",
"ghcr.io/codealive-ai/codealive-mcp:v0.3.0"
]
}
}
}
</details>
<details>
<summary><b>Qoder</b></summary>
UI路径: 用户图标 → Qoder设置 → MCP → 我的服务器 → + 添加(代理模式)
SSE(远程HTTP)
{
"mcpServers": {
"codealive": {
"type