You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/changelog/2026-01-intelligent-scope-features.md
+14-96Lines changed: 14 additions & 96 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,88 +7,37 @@ category: feature
7
7
8
8
# Intelligent Scope Features
9
9
10
-
GitHub MCP Server now provides intelligent handling of OAuth scopes across all authentication methods—automatically filtering tools based on your permissions and enabling dynamic scope requests when needed.
10
+
GitHub MCP Server now intelligently handles OAuth scopes—filtering tools based on your permissions and enabling dynamic scope requests when needed.
11
11
12
12
## What's New
13
13
14
14
### OAuth Scope Challenges (Remote Server)
15
15
16
-
When using the remote MCP server with OAuth authentication (like VS Code's GitHub Copilot Chat), the server now implements the [MCP scope challenge handling specification](https://modelcontextprotocol.io/specification/2025-11-05/basic/authorization#scope-challenge-handling). Instead of failing when you lack a required scope, the server can request additional permissions dynamically.
17
-
18
-
**How it works:**
19
-
1. You attempt to use a tool that requires a scope you haven't granted
20
-
2. The server returns a `401` with a `WWW-Authenticate` header indicating the missing scope
21
-
3. Your MCP client (if supported) prompts you to authorize the additional scope
22
-
4. After granting permission, the operation completes automatically
23
-
24
-
This means you can start with minimal permissions and expand them naturally as you use more features—no upfront "grant all permissions" prompts.
16
+
The remote server now implements [MCP scope challenge handling](https://modelcontextprotocol.io/specification/2025-11-05/basic/authorization#scope-challenge-handling). Instead of failing when you lack a required scope, it requests additional permissions dynamically—start with minimal permissions and expand them as needed.
25
17
26
18
### PAT Scope Filtering
27
19
28
-
For users authenticating with a classic Personal Access Token (`ghp_` prefix), tools are now automatically filtered based on your token's scopes. At startup, the server discovers your token's scopes and hides tools you can't use. This works on both the local (stdio) and remote server.
20
+
For classic Personal Access Tokens (`ghp_` prefix), tools are automatically filtered based on your token's scopes. The server discovers your scopes at startup and hides tools you can't use.
29
21
30
-
**Benefits:**
31
-
-**Reduced clutter** — Only see tools your token supports
-**Clear expectations** — Your tool list matches your actual capabilities
34
-
35
-
**Example:** If your PAT only has `repo` and `gist` scopes, tools requiring `admin:org`, `project`, or `notifications` will be hidden from your tool list.
22
+
**Example:** If your PAT only has `repo` and `gist` scopes, tools requiring `admin:org`, `project`, or `notifications` are hidden.
When using server-to-server tokens (like the `GITHUB_TOKEN` in GitHub Actions), the remote server now intelligently hides user-context tools that don't make sense without a human user.
40
-
41
-
**Tools hidden for S2S tokens:**
42
-
-`get_me` — No user to query
43
-
- Other user-specific context tools
44
-
45
-
This ensures automated workflows see only the tools they can actually use, rather than failing when they attempt to call user-context APIs.
26
+
For server-to-server tokens (like `GITHUB_TOKEN` in Actions), the remote server hides user-context tools like `get_me` that don't apply without a human user.
46
27
47
28
### Documented OAuth Scopes
48
29
49
-
Every MCP tool now includes explicit OAuth scope documentation:
50
-
51
-
-**Required Scopes** — The minimum scope(s) needed to use the tool
52
-
-**Accepted Scopes** — All scopes that satisfy the requirement (including parent scopes)
53
-
54
-
This information is visible in:
55
-
-**README.md** — Each tool's documentation shows required and accepted scopes
56
-
-**Tool metadata** — Available programmatically via the MCP protocol
57
-
58
-
**Example from README:**
59
-
```
60
-
### create_issue
61
-
Creates a new issue in a GitHub repository.
62
-
Required scopes: repo
63
-
Accepted scopes: repo
64
-
```
30
+
Every MCP tool now documents its required and accepted OAuth scopes in the README and tool metadata.
65
31
66
32
### New `list-scopes` Command
67
33
68
-
A new CLI command helps you understand what scopes your configured toolsets need:
|**Fine-grained PAT** (`github_pat_`) | No filtering — API enforces permissions at call time|
112
-
|**GitHub App** (`ghs_`) | No filtering — permissions based on app installation|
60
+
|**Fine-grained PAT** (`github_pat_`) | No filtering — fine-grained permissions, not OAuth scopes|
61
+
|**GitHub App** (`ghs_`) | No filtering — fine-grained permissions, not OAuth scopes|
113
62
|**Server-to-Server** (`GITHUB_TOKEN`) | User tools hidden — no user context available |
114
63
115
64
## Getting Started
116
65
117
-
### For Remote Server (OAuth) Users
118
-
119
-
No action required! Scope challenges work automatically with supporting MCP clients like VS Code. You'll be prompted for additional permissions as needed.
**PAT users:** Run `list-scopes` to discover required scopes, create a PAT at [github.com/settings/tokens](https://github.com/settings/tokens), and start the server.
-[#609](https://github.com/github/github-mcp-server-remote/pull/609) — Dynamic OAuth scopes based on route and headers
160
-
-[#618](https://github.com/github/github-mcp-server-remote/pull/618) — Initialize tool scope map for scope challenge middleware
78
+
Share your experience in the [Scope filtering/challenging discussion](https://github.com/github/github-mcp-server/discussions/1802).
161
79
162
80
## What's Not Included
163
81
164
-
**Fine-grained PAT support** — Fine-grained Personal Access Tokens use a different permission model based on repository access rather than OAuth scopes. They don't return an `X-OAuth-Scopes`header, so scope filtering and scope challenges don't apply. The GitHub API enforces permissions at call time, and you'll receive clear error messages if an operation isn't permitted.
82
+
**Fine-grained permissions** — Fine-grained PATs (`github_pat_`) and GitHub Apps (`ghs_`) use repository-based permissions rather than OAuth scopes. They don't return `X-OAuth-Scopes`headers, so scope filtering and scope challenges don't apply. The API enforces permissions at call time.
0 commit comments