Skip to content

Commit 112739f

Browse files
authored
Merge pull request #139 from GulerSevil/patch-1
Clarify token requirements for MCP integration
2 parents 02c6cc3 + f955549 commit 112739f

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,18 @@ This action now supports **read-only** integration with the GitHub-hosted Model
162162
Context Protocol (MCP) server, which provides access to GitHub tools like
163163
repository management, issue tracking, and pull request operations.
164164

165-
> [!NOTE]
166-
> The GitHub MCP integration requires a Personal Access Token (PAT) and cannot use the built-in `GITHUB_TOKEN`.
165+
#### Authentication
166+
167+
You can authenticate the MCP server with **either**:
168+
169+
1. **Personal Access Token (PAT)** – user-scoped token
170+
2. **GitHub App Installation Token** (`ghs_…`) – short-lived, app-scoped token
171+
> The built-in `GITHUB_TOKEN` is **not** accepted by the MCP server.
172+
> Using a **GitHub App installation token** is recommended in most CI environments because it is short-lived and least-privilege by design.
173+
174+
#### Enabling MCP in the action
175+
176+
Set `enable-github-mcp: true` and provide a token via `github-mcp-token`.
167177

168178
```yaml
169179
steps:
@@ -173,7 +183,7 @@ steps:
173183
with:
174184
prompt: 'List my open pull requests and create a summary'
175185
enable-github-mcp: true
176-
token: ${{ secrets.USER_PAT }}
186+
token: ${{ secrets.USER_PAT }} # or a ghs_ installation token
177187
```
178188

179189
If you want, you can use separate tokens for the AI inference endpoint
@@ -188,7 +198,7 @@ steps:
188198
prompt: 'List my open pull requests and create a summary'
189199
enable-github-mcp: true
190200
token: ${{ secrets.GITHUB_TOKEN }}
191-
github-mcp-token: ${{ secrets.USER_PAT }}
201+
github-mcp-token: ${{ secrets.USER_PAT }} # or a ghs_ installation token
192202
```
193203

194204
When MCP is enabled, the AI model will have access to GitHub tools and can
@@ -212,7 +222,7 @@ the action:
212222
| `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` |
213223
| `max-tokens` | The max number of tokens to generate | 200 |
214224
| `enable-github-mcp` | Enable Model Context Protocol integration with GitHub tools | `false` |
215-
| `github-mcp-token` | Token to use for GitHub MCP server (defaults to the main token if not specified). This must be a PAT in order for MCP to work | `""` |
225+
| `github-mcp-token` | Token to use for GitHub MCP server (defaults to the main token if not specified). | `""` |
216226

217227
## Outputs
218228

0 commit comments

Comments
 (0)