Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines +165 to +172
Copy link

Copilot AI Oct 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The heading hierarchy is inconsistent. This should be '## Enabling MCP in the action' (H2) to match the level of '### Authentication' (H3), or '### Authentication' should be '#### Authentication' (H4) if this is meant to be H3.

Suggested change
### 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
#### 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

Copilot uses AI. Check for mistakes.
Set `enable-github-mcp: true` and provide a token via `github-mcp-token`.

```yaml
steps:
- name: AI Inference with GitHub Tools
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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

Expand Down