返回市场
代码活化-mcp

代码活化-mcp

作者:CodeAlive-AI68 星标更新:2025-11-10

项目介绍

CodeAlive MCP:适用于项目的最深层次上下文引擎(特别是大型代码库)

<!-- MCP Server Name: io.github.codealive-ai.codealive-mcp -->

CodeAlive Logo

只需几秒钟即可将您的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?

CodeAlive是最准确和全面的上下文引擎服务,针对大型代码库进行了优化,并通过先进的GraphRAG提供支持,可通过MCP访问。它丰富了诸如Cursor、Claude Code、Codex等AI代理的上下文,使其效率提高35%,速度最多可提升84%。

它就像Context7,但专为您的(大型)代码库设计。

它允许AI编码代理:

  • 更快地找到相关代码,使用语义搜索
  • 理解更大的图景,超越孤立的文件
  • 提供更好的答案,具有完整的项目上下文
  • 减少成本和时间,消除猜测工作

🛠 可用工具

一旦连接,您将可以访问这些强大的工具:

  1. get_data_sources - 列出已索引的存储库和工作区
  2. codebase_search - 在已索引的代码库中进行语义代码搜索(主/主分支)
  3. codebase_consultant - 具有完整项目专业知识的AI顾问

🎯 使用示例

设置完成后,您可以尝试以下命令与您的AI助手互动:

  • "显示所有可用的存储库" → 使用 get_data_sources
  • "在用户服务中查找身份验证代码" → 使用 codebase_search
  • "解释这个代码库中的支付流程是如何工作的" → 使用 codebase_consultant

目录

🚀 快速开始(远程)

最快的方式开始 - 不需要安装!我们的远程MCP服务器位于 https://mcp.codealive.ai/api,提供即时访问CodeAlive的功能。

第一步:获取您的API密钥

  1. https://app.codealive.ai/ 注册
  2. 导航至 MCP & API
  3. 点击 "+ 创建API密钥"
  4. 立即复制您的API密钥 - 您不会再看到它!

第二步:选择您的AI客户端

选择您偏好的AI客户端以进行即时设置:

🚀 快速开始(代理安装)

您可以要求您的AI代理为您安装CodeAlive MCP服务器。

  1. 将以下提示复制粘贴到您的AI代理中(记得插入您的API密钥):
这是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. 重新启动您的AI代理。

🤖 AI客户端集成

<details> <summary><b>Claude Code</b></summary>

选项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密钥。

</details> <details> <summary><b>Cursor</b></summary>

选项1:远程HTTP(推荐)

  1. 打开Cursor → 设置(Cmd+,Ctrl+,
  2. 在左侧面板导航到 "MCP"
  3. 点击 "添加新MCP服务器"
  4. 粘贴以下配置:
{
  "mcpServers": {
    "codealive": {
      "url": "https://mcp.codealive.ai/api",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY_HERE"
      }
    }
  }
}
  1. 保存并重启Cursor

选项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密钥。就这样 - 不需要配置文件!🎉

</details> <details> <summary><b>Continue</b></summary>

选项1:远程HTTP(推荐)

  1. 在项目或 ~/.continue/config.yaml 中创建或编辑 .continue/config.yaml
  2. 添加以下配置:
mcpServers:
  - name: CodeAlive
    type: streamable-http
    url: https://mcp.codealive.ai/api
    requestOptions:
      headers:
        Authorization: "Bearer YOUR_API_KEY_HERE"
  1. 重启VS Code

选项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。

  1. 打开命令面板(Ctrl+Shift+PCmd+Shift+P
  2. 运行 "MCP: 添加服务器"
  3. 选择 "HTTP" 服务器类型
  4. 输入以下配置:
{
  "servers": {
    "codealive": {
      "type": "http",
      "url": "https://mcp.codealive.ai/api",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY_HERE"
      }
    }
  }
}
  1. 重启VS Code

选项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)

  1. 编辑您的配置文件:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. 添加以下配置:

{
  "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. 重启Claude Desktop
</details> <details> <summary><b>Cline</b></summary>

选项1:远程HTTP(推荐)

  1. 在VS Code中打开Cline扩展
  2. 单击MCP服务器图标进行配置
  3. 向您的MCP设置添加以下配置:
{
  "mcpServers": {
    "codealive": {
      "url": "https://mcp.codealive.ai/api",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY_HERE"
      }
    }
  }
}
  1. 保存并重启VS Code

选项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"
      ]
    }
  }
}

提示: 如果您的Roo构建不遵守HTTP头,请使用Docker/STDIO选项。

</details> <details> <summary><b>Goose</b></summary>

UI路径: 设置 → MCP服务器 → 添加 → 选择流式HTTP

流式HTTP配置:

  • 名称: codealive
  • 端点URL: https://mcp.codealive.ai/api
  • 头信息: Authorization: Bearer YOUR_API_KEY_HERE

Docker(STDIO)替代方案:

添加一个STDIO扩展:

  • 命令: docker
  • 参数: run --rm -i -e CODEALIVE_API_KEY=YOUR_API_KEY_HERE ghcr.io/codealive-ai/codealive-mcp:v0.3.0
</details> <details> <summary><b>Kilo Code</b></summary>

UI路径: 管理 → 集成 → 模型上下文协议(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