Back to MCP directory
publicPublicdnsLocal runtime

github-oauth-mcp-server

项目介绍如何设置Python开发环境并使用uv工具,配置Claude桌面应用的MCP服务,以及调试MCP服务的指南。

article

README

🚀 开发指南

本开发指南将指导你完成开发环境的配置、项目的设置以及调试工作,帮助你顺利开展开发工作。

🚀 快速开始

📦 安装指南

首先,安装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的位置

Windows : code $env:AppData\Claude\claude_desktop_config.json  
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

你可以通过以下命令启动MCP Inspector:

npx @modelcontextprotocol/inspector uv --directory C:\Users\Hp\Github-Oauth run github-oauth

启动后,Inspector会在浏览器中显示一个URL,你可以在浏览器中开始调试。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client