@@ -195,6 +195,31 @@ For stdio mode (local binary execution), you can use OAuth 2.1 with PKCE instead
195195- ** Docker container** : Uses device flow (displays code + URL, no callback needed)
196196- ** Docker with port binding** : Can use PKCE flow with ` --oauth-callback-port `
197197
198+ #### Quick Setup
199+
200+ ** Option 1: Device Flow (Easiest for Docker)**
201+ ``` bash
202+ # 1. Create GitHub OAuth App at https://github.com/settings/developers
203+ # 2. Run with Docker (device flow automatic)
204+ docker run -i --rm -e GITHUB_OAUTH_CLIENT_ID=your_client_id ghcr.io/github/github-mcp-server
205+ # → Displays: Visit https://github.com/login/device and enter code: ABCD-1234
206+ ```
207+
208+ ** Option 2: Interactive Flow (Best UX)**
209+ ``` bash
210+ # For native binary
211+ export GITHUB_OAUTH_CLIENT_ID=your_client_id
212+ ./github-mcp-server stdio
213+ # → Browser opens automatically
214+
215+ # For Docker with port binding (requires setup in OAuth app callback)
216+ docker run -i --rm -p 8080:8080 \
217+ -e GITHUB_OAUTH_CLIENT_ID=your_client_id \
218+ -e GITHUB_OAUTH_CALLBACK_PORT=8080 \
219+ ghcr.io/github/github-mcp-server
220+ # → Browser opens automatically (callback works via bound port)
221+ ```
222+
198223#### Prerequisites for OAuth
199224
2002251 . Create a GitHub OAuth App at [ https://github.com/settings/developers ] ( https://github.com/settings/developers )
@@ -238,6 +263,38 @@ Example with custom scopes:
238263./github-mcp-server stdio --oauth-client-id YOUR_CLIENT_ID --oauth-scopes repo,user
239264```
240265
266+ #### Pre-configured MCP Host Setup
267+
268+ OAuth can be pre-configured for MCP hosts (similar to PAT distribution). For Docker with port binding:
269+
270+ ** Claude Desktop/Code:**
271+ ``` bash
272+ claude mcp add github \
273+ -e GITHUB_OAUTH_CLIENT_ID=your_client_id \
274+ -e GITHUB_OAUTH_CALLBACK_PORT=8080 \
275+ -- docker run -i --rm -p 8080:8080 -e GITHUB_OAUTH_CLIENT_ID -e GITHUB_OAUTH_CALLBACK_PORT ghcr.io/github/github-mcp-server
276+ ```
277+
278+ ** VS Code (settings.json):**
279+ ``` json
280+ {
281+ "mcp" : {
282+ "servers" : {
283+ "github" : {
284+ "command" : " docker" ,
285+ "args" : [" run" , " -i" , " --rm" , " -p" , " 8080:8080" , " -e" , " GITHUB_OAUTH_CLIENT_ID" , " -e" , " GITHUB_OAUTH_CALLBACK_PORT" , " ghcr.io/github/github-mcp-server" ],
286+ "env" : {
287+ "GITHUB_OAUTH_CLIENT_ID" : " ${input:github_oauth_client_id}" ,
288+ "GITHUB_OAUTH_CALLBACK_PORT" : " 8080"
289+ }
290+ }
291+ }
292+ }
293+ }
294+ ```
295+
296+ Port binding setup is straightforward and can be automated through installation instructions.
297+
241298#### Device Flow vs Interactive Flow
242299
243300** Device Flow** (automatic in Docker):
0 commit comments