MCP-GitHub-OAuth 认证工具
通过OAuth协议促进使用GitHub进行身份验证,允许安全访问和与GitHub存储库和服务进行交互。
服务介绍
开发
设置你的环境
首先,让我们安装 uv 并设置我们的 Python 项目和环境:
MacOS/Linux : curl -LsSf https://astral.sh/uv/install.sh | sh
Windows : powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
确保之后重启你的终端,以保证 uv 命令能够被识别。
现在,让我们创建并设置我们的项目:
运行本地 Claude 桌面应用程序
- 确保你需要更新
claude_desktop_config.json来注册工具
你可以找到 claude_desktop_config.json :
For Windows : code $env:AppData\Claude\claude_desktop_config.json
For Mac/Linux :code ~/Library/Application\ Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"Github-Oauth": {
"command": "C:\\Users\\Hp\\.local\\bin\\uv",
"args": [
"--directory",
"C:\\Users\\Hp\\Github-Oauth\\src\\github_oauth",
"run",
"server.py"
]
}
}
}
调试
由于 MCP 服务器通过 stdio 运行,调试可能会比较困难。为了获得最佳的调试体验,我们强烈建议使用 MCP Inspector。
你可以通过以下命令使用 npm 启动 MCP Inspector:
npx @modelcontextprotocol/inspector uv --directory C:\Users\Hp\Github-Oauth run github-oauth
启动后,Inspector 会显示一个 URL,你可以在浏览器中访问该 URL 开始调试。