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] 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