GitHub Chat

GitHub Chat

🚀 使用 GitHub Chat MCP 分析和查询GitHub仓库

GitHub Chat MCP(Model Context Protocol)是用于通过 GitHub Chat API 分析和查询GitHub仓库的协议。借助该协议,用户能够方便地对 GitHub 仓库进行索引和查询操作。官方网址:https://github-chat.com

🚀 快速开始

要开始使用 GitHub Chat MCP,你可以按照以下步骤操作:

  1. 完成安装(具体安装步骤见下文“📦 安装指南”)。
  2. 开始与Claude一起使用它!以下是示例提示:
    • "使用github - chat - mcp分析React仓库"
    • "用github - chat - mcp索引TypeScript仓库并询问其架构"

✨ 主要特性

  • 仓库索引:能够对指定的 GitHub 仓库进行索引和分析。
  • 仓库查询:支持对已索引的仓库进行查询,获取相关信息。

📦 安装指南

你可以选择以下方式进行安装:

# 使用 pip 安装
pip install github-chat-mcp

# 或使用较新的 uv 包管理器安装
uv install github-chat-mcp

📚 详细文档

GitHub Chat MCP 服务器设置

smithery徽章

设置说明

⚠️ 重要提示

首先,请确保您拥有GitHub Chat API密钥。这是使用服务的必需条件。

首先安装uv:

  • MacOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
  • Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

使用 Cursor推荐设置

在mcp.json中:

{
"mcpServers": {
"github-chat": {
"command": "uvx",
"args": [
"github-chat-mcp"
]
}
}
}

这样设置后,无需环境变量,因为这是免费试用版本。

使用Claude Desktop设置

# claude_desktop_config.json
# 可以通过以下步骤找到位置:
# 点击汉堡菜单 -> 文件 -> 设置 -> 开发人员 -> 编辑配置
# 必须先执行:brew install uv
{
"mcpServers": {
"github-chat": {
"command": "uvx",
"args": ["github-chat-mcp"],
"env": {
}
}
}
}

使用Smithery安装

您可以使用Smithery自动为Claude Desktop安装GitHub Chat:

npx -y @smithery/cli install github-chat-mcp --client claude

使用GitHub Chat与Claude

  1. 首先索引一个GitHub仓库:
    • 发送指令 "索引位于https://github.com/username/repo的GitHub仓库"
  2. 然后询问关于该仓库的问题:
    • 例如 "此仓库的核心技术栈是什么?"

调试

运行以下命令进行调试:

npx @modelcontextprotocol/inspector uvx github-chat-mcp

本地/开发环境设置指南

克隆代码库

git clone https://github.com/yourusername/github-chat-mcp.git

安装依赖项

首先安装uv:

  • MacOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
  • Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

然后在GitHub Chat - MCP项目中安装依赖项:

cd github-chat-mcp

# 创建虚拟环境并激活它
uv venv

source .venv/bin/activate # MacOS/Linux
# 或者
.venv/Scripts/activate # Windows

# 安装依赖项
uv sync

使用Claude Desktop设置

使用MCP CLI SDK
# 如果尚未安装,请先执行 `pip install mcp[cli]`
mcp install /ABSOLUTE/PATH/TO/PARENT/FOLDER/github-chat-mcp/src/github_chat_mcp/server.py -v "GITHUB_API_KEY=API_KEY_HERE"
手动设置
# claude_desktop_config.json
# 可以通过以下步骤找到位置:
# 点击汉堡菜单 -> 文件 -> 设置 -> 开发人员 -> 编辑配置
{
"mcpServers": {
"github-chat": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/github-chat-mcp",
"github-chat-mcp"
]
}
}
}

使用GitHub Chat与Claude

  1. 首先索引一个GitHub仓库:
    • 发送/index 命令,例如:/index https://github.com/yourusername/repo
  2. 然后查询索引的仓库:
    • 发送/query 命令,例如:/query 这个仓库的核心技术栈是什么?

注意事项

⚠️ 重要提示

  • 通过环境变量 FASTMCP_LOG_LEVEL 可以调节日志级别(例如:FASTMCP_LOG_LEVEL="ERROR"
  • 此MCP服务器提供两个主要功能:
    1. 仓库索引 - 索引和分析一个GitHub仓库
    2. 仓库查询 - 查询已索引的仓库
  • 0 关注
  • 0 收藏,13 浏览
  • system 提出于 2025-09-26 23:06

相似服务问题

相关AI产品