From e0da58c63f1400b59c6b84d51e78f422a6199dac Mon Sep 17 00:00:00 2001 From: Sevil <71987252+GulerSevil@users.noreply.github.com> Date: Sat, 25 Oct 2025 22:53:45 +0200 Subject: [PATCH 1/3] Clarify token requirements for MCP integration Updated authentication section to clarify token usage for MCP integration. --- README.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d57c33e..32dfd9e 100644 --- a/README.md +++ b/README.md @@ -162,9 +162,16 @@ This action now supports **read-only** integration with the GitHub-hosted Model Context Protocol (MCP) server, which provides access to GitHub tools like repository management, issue tracking, and pull request operations. -> [!NOTE] -> The GitHub MCP integration requires a Personal Access Token (PAT) and cannot use the built-in `GITHUB_TOKEN`. +### Authentication +You can authenticate the MCP server with **either**: +1. **Personal Access Token (PAT)** – user-scoped token +2. **GitHub App Installation Token** (`ghs_…`) – short-lived, app-scoped token +> The built-in `GITHUB_TOKEN` is **not** accepted by the MCP server. +Using a **GitHub App installation token** is recommended in most CI environments because it is short-lived and least-privilege by design. + ### Enabling MCP in the action +Set `enable-github-mcp: true` and provide a token via `github-mcp-token`. + ```yaml steps: - name: AI Inference with GitHub Tools @@ -173,7 +180,7 @@ steps: with: prompt: 'List my open pull requests and create a summary' enable-github-mcp: true - token: ${{ secrets.USER_PAT }} + token: ${{ secrets.USER_PAT }} # or a ghs_ installation token ``` If you want, you can use separate tokens for the AI inference endpoint @@ -188,7 +195,7 @@ steps: prompt: 'List my open pull requests and create a summary' enable-github-mcp: true token: ${{ secrets.GITHUB_TOKEN }} - github-mcp-token: ${{ secrets.USER_PAT }} + github-mcp-token: ${{ secrets.USER_PAT }} # or a ghs_ installation token ``` When MCP is enabled, the AI model will have access to GitHub tools and can @@ -212,7 +219,7 @@ the action: | `endpoint` | The endpoint to use for inference. If you're running this as part of an org, you should probably use the org-specific Models endpoint | `https://models.github.ai/inference` | | `max-tokens` | The max number of tokens to generate | 200 | | `enable-github-mcp` | Enable Model Context Protocol integration with GitHub tools | `false` | -| `github-mcp-token` | Token to use for GitHub MCP server (defaults to the main token if not specified). This must be a PAT for MCP to work | `""` | +| `github-mcp-token` | Token to use for GitHub MCP server (defaults to the main token if not specified). | `""` | ## Outputs From d061fc54690accc59c18aba38cb47a172591b850 Mon Sep 17 00:00:00 2001 From: Sevil <71987252+GulerSevil@users.noreply.github.com> Date: Tue, 25 Nov 2025 14:59:33 +0100 Subject: [PATCH 2/3] Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 32dfd9e..b2823e1 100644 --- a/README.md +++ b/README.md @@ -162,14 +162,14 @@ This action now supports **read-only** integration with the GitHub-hosted Model Context Protocol (MCP) server, which provides access to GitHub tools like repository management, issue tracking, and pull request operations. -### Authentication +#### Authentication You can authenticate the MCP server with **either**: 1. **Personal Access Token (PAT)** – user-scoped token 2. **GitHub App Installation Token** (`ghs_…`) – short-lived, app-scoped token > The built-in `GITHUB_TOKEN` is **not** accepted by the MCP server. Using a **GitHub App installation token** is recommended in most CI environments because it is short-lived and least-privilege by design. - ### Enabling MCP in the action +#### Enabling MCP in the action Set `enable-github-mcp: true` and provide a token via `github-mcp-token`. ```yaml From 9e60aa0a3f27cab0e62286d74d9c77b04b1d0596 Mon Sep 17 00:00:00 2001 From: Sevil <71987252+GulerSevil@users.noreply.github.com> Date: Sat, 29 Nov 2025 21:15:11 +0100 Subject: [PATCH 3/3] Lint fix Lint fix --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b2823e1..4539529 100644 --- a/README.md +++ b/README.md @@ -163,15 +163,18 @@ Context Protocol (MCP) server, which provides access to GitHub tools like repository management, issue tracking, and pull request operations. #### Authentication + You can authenticate the MCP server with **either**: + 1. **Personal Access Token (PAT)** – user-scoped token 2. **GitHub App Installation Token** (`ghs_…`) – short-lived, app-scoped token -> The built-in `GITHUB_TOKEN` is **not** accepted by the MCP server. -Using a **GitHub App installation token** is recommended in most CI environments because it is short-lived and least-privilege by design. + > The built-in `GITHUB_TOKEN` is **not** accepted by the MCP server. + > Using a **GitHub App installation token** is recommended in most CI environments because it is short-lived and least-privilege by design. #### Enabling MCP in the action + Set `enable-github-mcp: true` and provide a token via `github-mcp-token`. - + ```yaml steps: - name: AI Inference with GitHub Tools