GitHub Models MCP Server Configuration & Usage Guide
Installationnpx
Risk LevelMedium Risk
API KeyRequired
Clients3 supported
通过 GitHub Models 访问多种 AI 模型进行推理
Supported Clients
- Claude Desktop
- Cursor
- VS Code / Cline
Installation Command
npx -y @github/mcp-serverConfiguration 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 功能
- network-access
- credential-required
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.