Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Practical OAuth implementation for production

Đang mở
#1,052 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ó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tài liệu
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Công nghệ
csharp
Lĩnh vực
authentication, security

Hướng nghiên cứu

Bắt đầu bằng việc xem xét samples/ProtectedMcpServer và tests/ModelContextProtocol.TestOAuthServer, sau đó đọc issue #648 và cách sử dụng metadata của AuthorizationServers. Hãy ghi lại một quy trình xác thực thực tế cho môi trường production dành cho remote MCP servers, bao gồm việc các nhà cung cấp hiện có có được hỗ trợ hay không và những phần nào của samples chỉ mang tính giáo dục. Công việc được coi là hoàn tất khi hướng dẫn trả lời các câu hỏi về triển khai mà không yêu cầu người đọc phải tự suy ra các chi tiết của giao thức.

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

Mô tả

area-auth documentation enhancement help wanted P3 ready for work

For building a production-ready remote MCP server with OAuth authentication, what is a practical way to implement the authentication part?

So far all the examples I've checked have comments like "not for production use" and often contain code implementing low-level details of some security protocols. For example, the ProtectedMcpServer sample seem to depend on the TestOAuthServer, which basically implements an OAuth server from scratch, including things like token encryption, encoding etc. This is very useful for educational purposes, but probably not very practical for building a real application.

It's also possible to point the AuthorizationServers metadata to an existing auth provider (Microsoft/Google/etc.), but seems like even that doesn't work well with some providers due to issues like https://github.com/modelcontextprotocol/csharp-sdk/issues/648, and it's not clear whether those issues might actually be by design due to incorrect usage.

So, as of today, how should someone building a real world MCP server go about authentication? Is their best bet to build an OAuth server from scratch just like the samples show? Or is there a better re-usable solution, ideally an existing authentication service that is well supported and works smoothly with MCP scenarios?

Ngôn ngữ chính
C#
Star
4.6k
Fork
817
Merge trung bình
8 ngày 7 giờ
Pull request đã merge (30 ngày)
3

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 modelcontextprotocol/csharp-sdk

Tất cả issue của modelcontextprotocol/csharp-sdk

Issue tương tự

Thêm issue về C#

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.