github / github/copilot-cli

MCP OAuth in headless session times out

Open
#3,039 0 comments 4 reactions 0 assignees View on GitHub
area:authentication area:mcp
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
6

Description

### Describe the bug

When performing OAuth authentication against a remote https mcp server on a machine without browser, it spins waiting to open a browser and eventually times out and fails.

### Affected version

v1.0.40-0

### Steps to reproduce the behavior

Created a basic ubuntu 24 docker image with no UI elements that I can ssh into, install copilot cli, and run through the /mcp add flow. It will fail during the authentication step.

### Expected behavior

Ideally would like a fast fail if it can't identify a browser, and then device flow for oauth (assuming it's supported by the mcp)

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the /mcp add flow against a remote HTTPS MCP server in the headless Ubuntu 24 Docker setup described. Trace the OAuth authentication path to determine how browser availability is detected and whether the MCP supports device flow. Done means headless sessions no longer wait for a browser indefinitely and follow the supported authentication outcome.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
authentication, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.