Atlassian MCP OAuth fails: unauthorized_client: redirect_uri is not registered (v2 endpoint)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- api, authentication, cli
Hướng nghiên cứu
Reproduce the flow using ~/.copilot/mcp-config.json and the Atlassian v2 endpoint, then inspect ~/.copilot/logs/process-*.log and ~/.copilot/mcp-oauth-config/. Compare the authorization request with the expected DCR or CIMD behavior. Done means authentication completes successfully against the Atlassian MCP server without the redirect_uri error.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Title
Atlassian MCP OAuth fails: unauthorized_client: redirect_uri is not registered (v2 endpoint)
Affected version
1.0.86 (also observed on prior builds per related issues #4490, #2536)
Environment
- OS: macOS
- MCP server config (
~/.copilot/mcp-config.json):{ "mcpServers": { "atlassian": { "type": "http", "url": "https://mcp.atlassian.com/v2/mcp", "tools": ["*"] } } }
Description
When authenticating to the Atlassian MCP server (https://mcp.atlassian.com/v2/mcp), the OAuth flow fails on Atlassian's side with:
https://id.atlassian.com/error?error=unauthorized_client&error_description=redirect_uri%20is%20not%20registered%20for%20client:%20http://127.0.0.1:<random-port>/
The client_id used appears to differ from — or its declared metadata does not include — the dynamic loopback redirect_uri (http://127.0.0.1:<random-port>/) that Copilot CLI generates for each auth attempt.
By contrast, VS Code's Atlassian/Rovo Dev MCP integration succeeds using a Client ID Metadata Document (CIMD) approach: its client_id is a URL (https://vscode.dev/oauth/client-metadata.json) whose fetched JSON document lists VS Code's trusted redirect URIs. Atlassian's authorization server fetches this metadata document to validate the redirect_uri instead of requiring prior Dynamic Client Registration (DCR).
Local log excerpts (~/.copilot/logs/process-*.log) confirm the flow:
[ERROR] [rust:rmcp::transport::worker] worker quit with fatal: Transport channel closed, when Client(OAuthChallenge { www_authenticate_header: "...https://mcp.atlassian.com/.well-known/oauth-protected-resource/v2/mcp...", response: McpOAuthHttpResponse { status_code: 401, ... } })
[ERROR] Connecting to atlassian...
[ERROR] Opening browser for atlassian authentication...
No client-registration record is persisted locally (~/.copilot/mcp-oauth-config/ only contains a PKCE .verifier file), suggesting Copilot CLI attempts a fresh DCR (or static client_id) each time rather than caching/reusing a CIMD-style registration — and whatever it sends doesn't match what Atlassian's server expects.
Steps to reproduce
- Configure Atlassian HTTP MCP server pointing to
https://mcp.atlassian.com/v2/mcp. - Run
/mcp→ selectatlassian→ attempt to authenticate. - Browser opens
https://auth.atlassian.com/authorize?...&redirect_uri=http://127.0.0.1:<random-port>/.... - Atlassian immediately redirects to an error page:
unauthorized_client: redirect_uri is not registered for client: http://127.0.0.1:<random-port>/.
Expected behavior
OAuth flow completes successfully, matching VS Code's behavior against the same Atlassian MCP endpoint.
Suggested fix
- Adopt the same Client ID Metadata Document (CIMD) pattern VS Code uses: host/declare a
client-metadata.jsonfor Copilot CLI listing its expected loopback redirect URI pattern, and use that document's URL asclient_id. - Alternatively, verify whether Atlassian's
/register(DCR) endpoint is being called at all before/authorize, and confirm the registeredredirect_urismatch the one sent in the subsequent authorize request.
Related issues
- github/copilot-cli#4490 (RFC 8414 issuer mismatch, v1.0.80)
- github/copilot-cli#2536 (re-auth required on every launch)
- Ngôn ngữ chính
- Shell
- Star
- 11.2k
- Fork
- 1.9k
- Merge trung bình
- 14 giờ 16 phút
- Pull request đã merge (30 ngày)
- 6
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/copilot-cli
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
github/copilot-cli#4932 ·
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
github/copilot-cli#4909 ·
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
github/copilot-cli#4906 ·
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/copilot-cli#4848 ·
-
area:agents area:mcp
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/copilot-cli#4729 ·
Tất cả issue của github/copilot-cli
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
elastic/gradle-plugins#156 ·
-
Priority/High ready-for-agent Severity/Major Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
comp/cli P3 type/docs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
NousResearch/hermes-agent#119756 · 1 bình luận ·
-
comp: build/pipeline type: bug version: current (v17+)
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
angular/angularfire#3766 ·
-
out-of-date
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
CachyOS/CachyOS-PKGBUILDS#1903 ·