Skip to content

Fix OAuth protected-resource discovery for GitHub Copilot MCP#120

Merged
patvice merged 2 commits intomainfrom
protected-resource-discovery-issue
Feb 22, 2026
Merged

Fix OAuth protected-resource discovery for GitHub Copilot MCP#120
patvice merged 2 commits intomainfrom
protected-resource-discovery-issue

Conversation

@patvice
Copy link
Copy Markdown
Owner

@patvice patvice commented Feb 22, 2026

Summary

  • implement MCP 2025-11-25 compliant protected-resource discovery order (path-based endpoint first, then root)
  • support delegated authorization servers from authorization_servers and RFC 8414/OIDC metadata endpoint fallback ordering
  • validate resource/issuer matching during discovery and keep challenge-provided resource_metadata context through auth flows
  • harden OAuth challenge handling in SSE and StreamableHTTP transports with retry-loop guards and better diagnostics
  • add focused specs covering protected-resource discovery, URL ordering, issuer/resource validation, and transport OAuth challenge retries
  • add a runnable verifier script at scripts/test_github_copilot_mcp_oauth_tool.rb to authenticate, list tools, and execute one tool against GitHub Copilot MCP

Validation

  • bundle exec ruby scripts/verify_github_copilot_mcp_auth.rb
  • bundle exec rspec spec/ruby_llm/mcp/auth/discoverer_spec.rb spec/ruby_llm/mcp/auth/url_builder_spec.rb spec/ruby_llm/mcp/native/transports/streamable_http_spec.rb

Issue

Closes #117

@patvice patvice force-pushed the protected-resource-discovery-issue branch from 13b909e to 0b697e4 Compare February 22, 2026 17:23
@patvice patvice merged commit ac98947 into main Feb 22, 2026
7 checks passed
@patvice patvice deleted the protected-resource-discovery-issue branch February 22, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP Discovery Does Not Comply With Protected Resource and Authorization Server Metadata Discovery Requirements

1 participant