一个用于通过GitHub Chat API分析和查询GitHub仓库的模型上下文协议(MCP)。官方网站:https://github-chat.com
# 使用pip安装
pip install github-chat-mcp
# 或者使用更新的uv包管理器安装
uv install github-chat-mcp
示例提示:
在开始之前,请确保您拥有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"
在mcp.json中:
{
"mcpServers": {
"github-chat": {
"command": "uvx",
"args": [
"github-chat-mcp"
]
}
}
}
由于这是一个免费增值版本,因此不需要环境变量。
# claude_desktop_config.json
# 可以通过以下方式找到位置:
# 汉堡菜单 -> 文件 -> 设置 -> 开发者 -> 编辑配置
# 必须执行:brew install uv
{
"mcpServers": {
"github-chat": {
"command": "uvx",
"args": ["github-chat-mcp"],
"env": {
}
}
}
}
您可以自动通过Smithery为Claude Desktop安装GitHub Chat:
npx -y @smithery/cli install github-chat-mcp --client claude
首先索引一个GitHub仓库: "索引位于https://github.com/username/repo的GitHub仓库"
然后询问关于该仓库的问题: "这个仓库使用的主技术栈是什么?"
运行:
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"
然后安装MCP服务器依赖项:
cd github-chat-mcp
# 创建虚拟环境并激活它
uv venv
source .venv/bin/activate # MacOS/Linux
# 或者
.venv/Scripts/activate # Windows
# 安装依赖项
uv sync
# 如果还没有安装,请运行 `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",
"run",
"github-chat-m
cp"
],
"env": {
}
}
}
}
首先索引一个GitHub仓库: "索引位于https://github.com/username/repo的GitHub仓库"
然后询问关于该仓库的问题: "这个仓库使用的主技术栈是什么?"
运行:
# 如果已安装mcp cli (`pip install mcp[cli]`)
mcp dev /ABSOLUTE/PATH/TO/PARENT/FOLDER/github-chat-mcp/src/github_chat_mcp/server.py
# 如果未安装
npx @modelcontextprotocol/inspector \
uv \
--directory /ABSOLUTE/PATH/TO/PARENT/FOLDER/github-chat-mcp \
run \
github-chat-mcp
然后访问MCP Inspector在http://localhost:5173。您可能需要在inspector下的环境变量中添加您的GitHub API密钥作为GITHUB_API_KEY。
FASTMCP_LOG_LEVEL环境变量进行调整(例如FASTMCP_LOG_LEVEL="ERROR")