发展
设置您的环境
首先,让我们安装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检查员.
您可以通过以下方式启动MCP检查器 使用此命令:
npx @modelcontextprotocol/inspector uv --directory C:\Users\Hp\Github-Oauth run github-oauth启动后,检查器将显示一个URL,您可以在浏览器中访问该URL以开始调试。
