From cb3c02eea960881471d0ea7ba3ff2b0dd75ff30b Mon Sep 17 00:00:00 2001 From: Jason Li Date: Fri, 20 Nov 2026 08:08:35 +0000 Subject: [PATCH] feat(github): add optional X-MCP-Features header for headless runs --- third_party/github/.cursor-plugin/plugin.json | 8 +++++++- third_party/github/CHANGELOG.md | 4 ++++ third_party/github/README.md | 7 ++++++- third_party/github/mcp.json | 3 ++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/third_party/github/.cursor-plugin/plugin.json b/third_party/github/.cursor-plugin/plugin.json index caa4158ce3..6dcbd1d0d7 100644 --- a/third_party/github/.cursor-plugin/plugin.json +++ b/third_party/github/.cursor-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "github", "displayName": "GitHub", - "version": "1.0.0", + "version": "1.1.0", "minClientVersions": { "cursor": "3.13.0" }, @@ -37,6 +37,12 @@ "type": "string", "title": "GitHub personal access token", "description": "Fine-grained or classic PAT from https://github.com/settings/tokens with the repo scopes you want the agent to use." + }, + "GITHUB_MCP_FEATURES": { + "type": "string", + "title": "GitHub MCP feature flags (optional)", + "description": "Comma-separated feature flags sent in the X-MCP-Features header. Set mcp_apps_disable_form_deferral so issue_write, create_pull_request and update_pull_request run directly instead of waiting on an interactive form, which automations and background agents cannot submit. Leave empty to keep GitHub's defaults.", + "default": "" } }, "required": ["GITHUB_PERSONAL_ACCESS_TOKEN"] diff --git a/third_party/github/CHANGELOG.md b/third_party/github/CHANGELOG.md index 2d8967b5e7..f3b1707397 100644 --- a/third_party/github/CHANGELOG.md +++ b/third_party/github/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this plugin will be documented here. +## 1.1.0 + +- Added the optional `GITHUB_MCP_FEATURES` plugin variable, forwarded through the `X-MCP-Features` header. Set it to `mcp_apps_disable_form_deferral` so `issue_write`, `create_pull_request` and `update_pull_request` run directly in automations and background agents instead of stopping on an MCP App form nobody can submit. Empty by default, which keeps GitHub's defaults. + ## 1.0.0 — initial release - Logo: GitHub's official Octocat mark, on a padded white tile. diff --git a/third_party/github/README.md b/third_party/github/README.md index 38628e92f9..f3eabddbad 100644 --- a/third_party/github/README.md +++ b/third_party/github/README.md @@ -21,7 +21,8 @@ Or run `/add-plugin github` in chat. "type": "http", "url": "https://api.githubcopilot.com/mcp/", "headers": { - "Authorization": "Bearer ${GITHUB_PERSONAL_ACCESS_TOKEN}" + "Authorization": "Bearer ${GITHUB_PERSONAL_ACCESS_TOKEN}", + "X-MCP-Features": "${GITHUB_MCP_FEATURES}" } } } @@ -52,6 +53,10 @@ In **Dashboard → Plugins → Configure**, set **GitHub personal access token** Tool calls run with that token's permissions. Rotate or revoke the token from GitHub Settings if it is ever exposed. +### 3. Automations and background agents (optional) + +When the client supports MCP Apps, GitHub's server answers `issue_write`, `create_pull_request` and `update_pull_request` with an interactive form and waits for someone to submit it. Automations and background agents have nobody to submit it, so the issue or PR is never created. Set **GitHub MCP feature flags** to `mcp_apps_disable_form_deferral` to make those tools run directly. The value is sent as the `X-MCP-Features` header (comma-separated); leave it empty to keep GitHub's defaults. + ## Docs - Use the GitHub MCP server: https://docs.github.com/en/copilot/how-tos/context/use-mcp/use-the-github-mcp-server diff --git a/third_party/github/mcp.json b/third_party/github/mcp.json index e2dafb8451..18e647c12b 100644 --- a/third_party/github/mcp.json +++ b/third_party/github/mcp.json @@ -4,7 +4,8 @@ "type": "http", "url": "https://api.githubcopilot.com/mcp/", "headers": { - "Authorization": "Bearer ${GITHUB_PERSONAL_ACCESS_TOKEN}" + "Authorization": "Bearer ${GITHUB_PERSONAL_ACCESS_TOKEN}", + "X-MCP-Features": "${GITHUB_MCP_FEATURES}" } } }