Commit 93b7315
committed
fix: include transport path in Protected Resource Metadata resource URL
The resource field in /.well-known/oauth-protected-resource was set to the
base resource_server_url (e.g. http://localhost:8000/) instead of the actual
protected endpoint URL (e.g. http://localhost:8000/mcp). Per RFC 9728,
the resource identifier must match the URL that clients use to access
the protected resource.
Append the transport path (streamable_http_path or sse_path) to the
resource_server_url in both lowlevel/server.py and mcpserver/server.py.1 parent 62575ed commit 93b7315
2 files changed
Lines changed: 17 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
595 | 596 | | |
596 | 597 | | |
597 | 598 | | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
598 | 602 | | |
599 | | - | |
| 603 | + | |
600 | 604 | | |
601 | 605 | | |
602 | 606 | | |
| |||
615 | 619 | | |
616 | 620 | | |
617 | 621 | | |
| 622 | + | |
618 | 623 | | |
619 | 624 | | |
620 | | - | |
| 625 | + | |
621 | 626 | | |
622 | 627 | | |
623 | 628 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
982 | 982 | | |
983 | 983 | | |
984 | 984 | | |
| 985 | + | |
| 986 | + | |
985 | 987 | | |
986 | 988 | | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
987 | 992 | | |
988 | | - | |
| 993 | + | |
989 | 994 | | |
990 | 995 | | |
991 | 996 | | |
| |||
1023 | 1028 | | |
1024 | 1029 | | |
1025 | 1030 | | |
| 1031 | + | |
| 1032 | + | |
1026 | 1033 | | |
1027 | 1034 | | |
| 1035 | + | |
1028 | 1036 | | |
1029 | 1037 | | |
1030 | | - | |
| 1038 | + | |
1031 | 1039 | | |
1032 | 1040 | | |
1033 | 1041 | | |
| |||
0 commit comments