Skip to content

Commit 6ed3ac7

Browse files
committed
add avatar resource domain
1 parent 8a77a25 commit 6ed3ac7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkg/github/ui_resources.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ func RegisterUIResources(s *mcp.Server) {
2020
},
2121
func(_ context.Context, _ *mcp.ReadResourceRequest) (*mcp.ReadResourceResult, error) {
2222
return &mcp.ReadResourceResult{
23+
// MCP Apps UI metadata - CSP configuration to allow loading GitHub avatars
24+
// See: https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/draft/apps.mdx
25+
Meta: mcp.Meta{
26+
"ui": map[string]any{
27+
"csp": map[string]any{
28+
// Allow loading images from GitHub's avatar CDN
29+
"resourceDomains": []string{"https://avatars.githubusercontent.com"},
30+
},
31+
},
32+
},
2333
Contents: []*mcp.ResourceContents{
2434
{
2535
URI: GetMeUIResourceURI,

0 commit comments

Comments
 (0)