Unable to get MCP servers depending on OAuth to work

Đang mở
#5 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

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
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Công nghệ
azure, github
Lĩnh vực
api, authentication, cloud

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện các yêu cầu OAuth và chưa xác thực tới https://p-ai-gateway.azure-api.net/default/toolservers/github/mcp bằng các cấu hình và nhật ký lỗi trong issue này. Kiểm tra cách endpoint Github được khởi tạo và cách quá trình khám phá OAuth xử lý thông tin xác thực của client. Công việc được xem là hoàn tất khi máy chủ MCP kết nối thành công bằng một cấu hình hoạt động đã được ghi lại.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

I can't figure out how to configure MCP servers which depend on OAuth to get working. A simple one to test is the Github Copilot MCP which works without configuring anything.

Works

		"github-mcp-server": {
			"type": "http",
			"url": "https://api.githubcopilot.com/mcp",
			"gallery": "https://p-ne1apim-apicenter.data.swedencentral.azure-apicenter.ms/workspaces/default",
			"version": "Original",
			"headers": {
				"X-MCP-Toolsets": "actions,git,pull_requests,repos",
				"X-MCP-Readonly": "true"
			}
		},

Does not work

		"githu-mcp-server2": {
			"type": "http",
			"url": "https://p-ai-gateway.azure-api.net/default/toolservers/github/mcp",
			"headers": {
				"api-key": "<redacted>"
			},
			"gallery": "https://p-ne1apim-apicenter.data.swedencentral.azure-apicenter.ms/workspaces/default",
			"version": "v0"
		}

I tried configuring the authentication to "None" - this results i :

2026-07-31 13:58:19.769 [info] Connection state: Error 404 status sending message to https://p-ai-gateway.azure-api.net/default/toolservers/github/mcp: { "statusCode": 404, "message": "Federation tools/list failed: required endpoint 'Github' returned error: Endpoint 'Github' init returned HTTP 401." }

When attempting to configure OAuth 2.0 with "Auto discover" I get the following settings:

Image

Just put "placeholder", "placeholder" in clientid and secret.

This ends up with:

2026-07-31 14:04:55.674 [info] Connection state: Error 404 status sending message to https://p-ai-gateway.azure-api.net/default/toolservers/github/mcp: { "statusCode": 404, "message": "Federation tools/list failed: required endpoint 'Github' returned error: OAuth2 endpoint 'Github' has no valid connection (ReconnectRequired)." }

Not sure how this is meant to be set up, and why is a client id and client secret needed in this case?

Ngôn ngữ chính
Python
Star
18
Fork
9
Merge trung bình
1 ngày 16 giờ
Pull request đã merge (30 ngày)
23

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Azure/aigateway

Tất cả issue của Azure/aigateway

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.