Token导航 LogoToken导航TokenDH.com
Gei Migration MCP logo
开发工具stdio官方级别未说明来源级核验

Gei Migration MCP

MCP Server

一个封装GitHub企业导入器API的模型上下文协议服务器,支持通过自然语言驱动仓库迁移,适用于GitHub和Azure DevOps之间的仓库迁移。

工具数

14

提示词数

0

GitHub Stars

0

资源数

0
开发工具TypeScriptClaudeClaude DesktopClaudeVS Code

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

chikamsoachumsft

提供方

chikamsoachumsft

最后核验

2026/5/17 20:20

运行时

Docker

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

docker run -p 3000:3000 gei-migration-mcp

详细介绍

GEI迁移MCP服务器

一个模型上下文协议(MCP)服务器,封装了GitHub Enterprise Importer(GEI)API,支持自然语言驱动的存储库迁移。

特性

  • GitHub→ GitHub 迁移
  • Azure DevOps→ GitHub 迁移
  • 通过MCP的自然语言界面
  • 库存和发现工具
  • 迁移跟踪和历史
  • 本地(stdio)远程(HTTP+SSE) 运输支援
  • Azure容器应用 部署就绪

快速入门(托管服务器)

MCP服务器已部署并准备就绪,无需安装。只需将其添加到您的VS代码设置中。

1.打开MCP设置

在VS Code中,按 Ctrl+Shift+P首选项:打开MCP配置 (或编辑您的 mcp.json 直接)。

2.添加服务器

将以下内容合并到您的 mcp.json:

{
  "servers": {
    "gei-migration": {
      "type": "sse",
      "url": "https://gei-migration-mcp.proudgrass-ef996862.eastus.azurecontainerapps.io/sse",
      "headers": {
        "X-GitHub-Source-PAT": "${input:gei_github_token}",
        "X-GitHub-Target-PAT": "${input:gei_target_pat}",
        "X-ADO-PAT": "${input:gei_ado_pat}"
      }
    }
  },
  "inputs": [
    {
      "id": "gei_github_token",
      "type": "promptString",
      "description": "GitHub PAT for source org (needs repo, read:org scopes)",
      "password": true
    },
    {
      "id": "gei_target_pat",
      "type": "promptString",
      "description": "GitHub PAT for target org (needs admin:org, repo, workflow scopes)",
      "password": true
    },
    {
      "id": "gei_ado_pat",
      "type": "promptString",
      "description": "Azure DevOps PAT (optional — press Enter to skip if not doing ADO migrations)",
      "password": true
    }
  ]
}

3.创建您的PAT

PAT需要范围需要时
来源GitHub PATrepo, read:org始终(读取源组织)
目标GitHub PATadmin:org, repo, workflow始终(写入目标组织)
阿多·帕特Code (Read), Project and Team (Read)仅适用于ADO→ GitHub迁移
注: 当服务器连接时,VS Code将提示您输入PAT。它们通过HTTP标头按会话发送,从不存储在服务器上。

4.开始使用

在代理模式下打开Copilot Chat,然后尝试:

@gei-migration list repos in github org my-source-org
@gei-migration migrate repo my-repo from my-source-org to my-target-org
@gei-migration check migration status

______________________________________________________________________

可用工具

工具说明
check_prerequisites验证PAT是否已配置
list_source_repos从GitHub或ADO列出存储库
inventory_github_org完整的GitHub组织目录
inventory_ado_org完整的ADO组织清单
find_large_repos查找超过大小阈值的存储库
find_stale_repos查找非活动存储库
migrate_repo开始迁移
get_migration_status检查迁移进度
list_active_migrations显示正在运行的迁移
wait_for_migration等待完成
abort_migration取消迁移
get_migration_history查看已完成的迁移
grant_migrator_role授予迁移者权限
export_inventory_csv将库存导出为CSV

本地设置(stdio)

  1. 安装依赖项:
   npm install
  1. 构建:
   npm run build
  1. 添加到VS代码 mcp.json:
   {
     "servers": {
       "gei-migration": {
         "type": "stdio",
         "command": "node",
         "args": ["path/to/gei-migration-mcp/dist/index.js"],
         "env": {
           "GITHUB_TOKEN": "your-source-pat",
           "GH_PAT": "your-target-pat",
           "ADO_PAT": "your-ado-pat"
         }
       }
     }
   }

远程设置(HTTP+SSE)

使用HTTP在本地运行

npm run build
MCP_TRANSPORT=http PORT=3000 npm start

码头工人

docker build -t gei-migration-mcp .
docker run -p 3000:3000 gei-migration-mcp

部署到Azure容器应用程序

# Create resource group
az group create -n gei-migration-rg -l eastus

# Deploy with Bicep (no secrets needed - users provide their own)
az deployment group create \
  -g gei-migration-rg \
  -f infra/main.bicep

将MCP客户端连接到远程服务器

推荐:HTTP标头(安全)

使用带有VS Code输入提示的HTTP标头进行安全凭据处理:

{
  "servers": {
    "gei-migration": {
      "type": "sse",
      "url": "https://your-app.azurecontainerapps.io/sse",
      "headers": {
        "X-GitHub-Source-PAT": "${input:ghSourcePat}",
        "X-GitHub-Target-PAT": "${input:ghTargetPat}",
        "X-ADO-PAT": "${input:adoPat}"
      }
    }
  },
  "inputs": [
    { "id": "ghSourcePat", "type": "promptString", "description": "GitHub PAT for source org", "password": true },
    { "id": "ghTargetPat", "type": "promptString", "description": "GitHub PAT for target org", "password": true },
    { "id": "adoPat", "type": "promptString", "description": "Azure DevOps PAT (optional, press Enter to skip)", "password": true }
  ]
}

这种方法:

  • 运行时提示输入凭据(不存储在配置文件中)
  • 通过HTTP标头发送凭据(未登录URL)
  • 屏蔽输入 password: true

备选方案:查询参数

为了快速测试,凭据也可以作为查询参数传递:

{
  "servers": {
    "gei-migration": {
      "type": "sse",
      "url": "https://your-app.azurecontainerapps.io/sse?gh_source_pat=YOUR_SOURCE_PAT&gh_pat=YOUR_TARGET_PAT"
    }
  }
}

⚠️ 警告:查询参数可能会出现在日志和浏览器历史记录中。使用标头进行生产。

标题/查询参数:

标题查询参数描述
X-GitHub-Source-PATgh_source_patPAT阅读源代码GitHub org
X-GitHub-Target-PATgh_patPAT用于写入目标GitHub组织
X-ADO-PATado_patAzure DevOps的PAT(可选)

多租户支持

服务器支持多个并发用户,每个用户都有自己的凭据:

  • 每个SSE连接都会创建一个隔离的会话
  • 凭据按会话存储,从不共享
  • 连接关闭时,会话会自动清理
  • 服务器上没有存储凭据-用户提供自己的凭据

使用示例

@gei-migration check prerequisites
@gei-migration inventory github org my-source-org
@gei-migration migrate repo my-repo to target org my-target-org
@gei-migration list active migrations

环境变量(本地/stdio模式)

变量描述必填
GITHUB_TOKEN源代码GitHub组织的PAT
GH_PAT目标GitHub组织的PAT
ADO_PATAzure DevOps的PAT
MCP_TRANSPORTstdio (默认)或 http没有
PORTHTTP端口(默认值:3000)

需要PAT范围

  • 来源PAT: repo, read:org, workflow
  • 目标PAT: admin:org, repo, workflow
  • 阿多·帕特:完全访问或 Code (Read)

建筑

┌─────────────────────────────────────────────────────────────┐
│  MCP Client (VS Code, Claude Desktop, etc.)                 │
└─────────────────────┬───────────────────────────────────────┘
                      │ MCP Protocol (stdio or HTTP+SSE)
                      ▼
┌─────────────────────────────────────────────────────────────┐
│  GEI Migration MCP Server                                   │
│  ├── Tools (migrate, inventory, status, etc.)               │
│  ├── Resources (active migrations, history)                 │
│  └── Prompts (migration planning templates)                 │
└─────────────────────┬───────────────────────────────────────┘
                      │ GraphQL / REST APIs
                      ▼
┌─────────────────────────────────────────────────────────────┐
│  GitHub API          │  Azure DevOps API                    │
│  (GraphQL)           │  (REST)                              │
└─────────────────────────────────────────────────────────────┘

许可证

麻省理工学院

目录标签

目录标签

开发工具TypeScriptClaude仓库迁移混合部署GitHubAzureDevOps自然语言接口

支持客户端

Claude DesktopClaudeVS Code

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Docker

工具数量(toolCount,工具数)

14

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP