GitHub Models MCP Server Configuration & Usage Guide

📦
Installationnpx
⚠️
Risk LevelMedium Risk
🔑
API KeyRequired
💻
Clients3 supported

通过 GitHub Models 访问多种 AI 模型进行推理

Medium Risk Category: Search & Knowledge Base Verified: 2026-05-18 状态:部分核验

Supported Clients

Installation Command

npx -y @github/mcp-server

Configuration Example

{
  "mcpServers": {
    "github-models": {
      "command": "npx",
      "args": [
        "-y",
        "@github/mcp-server"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "<your-token>"
      }
    }
  }
}

Environment variable required:GITHUB_PERSONAL_ACCESS_TOKEN。Do not commit these values to public repositories.

Permission Scope & Security Notes

Required GitHub Token,可访问仓库和 GitHub 功能

Risk Score:3/10

Common Errors

Token 权限不足
确认 Token 有 repo 和 models 权限
模型不可用
部分模型Required GitHub Copilot 订阅

Sources

Recently Verified:2026-05-18。Client versions and configuration formats may change. Please refer to official documentation before use.

Related Tools