You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: enhance MCP OAuth Gateway with full compliance and security features
- Updated architecture documentation to reflect full implementation of resource parameter support and service-specific audience binding per RFC 8707.
- Added advanced security features including Origin header validation, MCP-Protocol-Version validation, and localhost binding warnings.
- Implemented middleware for origin validation and MCP protocol version checking in the gateway.
- Enhanced metadata provider to generate service-specific canonical URIs.
- Updated tests to cover new middleware functionality and ensure compliance with security requirements.
- MCP clients get tokens bound to specific services per specification ✅
702
706
703
707
### ❌ Current Limitations
704
708
@@ -874,20 +878,21 @@ The gateway implements the MCP authorization specification based on OAuth 2.1 st
874
878
- Redirect URI validation
875
879
- State parameter for CSRF protection
876
880
877
-
#### ⚠️ Partial Compliance
881
+
#### ✅ Full Compliance
878
882
879
883
**Resource Parameter Implementation**
880
884
- Accepts resource parameter in authorization and token requests ✅
881
-
-**Issue**: Currently uses gateway issuer as audience instead of service-specific canonical URIs
882
-
-**MCP Requirement**: Should use canonical URIs like `https://mcp.example.com/{service-id}/mcp`
883
-
**Single Provider Constraint**: Resource parameter binding requires all services to use the same OAuth provider per gateway instance
885
+
-Implements service-specific canonical URIs per RFC 8707 ✅
886
+
-Uses canonical URIs like `https://gateway.example.com/{service-id}/mcp` ✅
887
+
-**Single Provider Constraint**: Resource parameter binding requires all services to use the same OAuth provider per gateway instance (architectural design choice)
884
888
885
889
#### 📝 Implementation Notes
886
890
887
891
**Resource Parameter Handling**
888
-
- Uses gateway issuer as token audience for simplicity
889
-
- Works effectively with MCP clients in development scenarios
890
-
- Resource parameter accepted and stored for future enhancement
892
+
- Implements service-specific canonical URIs per RFC 8707 (e.g., `https://gateway.com/calculator/mcp`)
893
+
- Tokens are bound to specific services preventing cross-service reuse
894
+
- Full compliance with MCP Authorization specification requirements
895
+
- Proper audience validation ensures security isolation between services
@@ -4,7 +4,13 @@ This file provides guidance to Claude Code when working with the MCP OAuth Gatew
4
4
5
5
## Project Overview
6
6
7
-
The **MCP OAuth Gateway** is a work-in-progress OAuth 2.1 authorization server that provides transparent authentication and authorization for Model Context Protocol (MCP) services. It acts as a secure proxy that handles all OAuth complexity, allowing users to simply access `https://gateway.example.com/<service-id>/mcp` and have authentication handled automatically.
7
+
The **MCP OAuth Gateway** is a work-in-progress OAuth 2.1 authorization server that provides transparent authentication and authorization for Model Context Protocol (MCP) services. It acts as a secure proxy that handles all OAuth complexity, allowing users to simply access `https://gateway.example.com/{service-id}/mcp` and have authentication handled automatically.
0 commit comments