MCPcopy
hub / github.com/github/github-mcp-server / Icons

Function Icons

pkg/octicons/octicons.go:68–84  ·  view source on GitHub ↗

Icons returns MCP Icon objects for the given octicon name in light and dark themes. Icons are embedded as 24x24 PNG data URIs for offline use and faster loading. The name should be the base octicon name without size suffix (e.g., "repo" not "repo-16"). See https://primer.style/foundations/icons for

(name string)

Source from the content-addressed store, hash-verified

66// Note: The Sizes field is omitted for backward compatibility with older MCP clients
67// that expect it to be a string rather than an array per the 2025-11-25 MCP spec.
68func Icons(name string) []mcp.Icon {
69 if name == "" {
70 return nil
71 }
72 return []mcp.Icon{
73 {
74 Source: DataURI(name, ThemeLight),
75 MIMEType: "image/png",
76 Theme: mcp.IconThemeLight,
77 },
78 {
79 Source: DataURI(name, ThemeDark),
80 MIMEType: "image/png",
81 Theme: mcp.IconThemeDark,
82 },
83 }
84}

Callers 14

ForkRepositoryFunction · 0.92
StarRepositoryFunction · 0.92
NewServerFunction · 0.92
TestAllToolsetIconsExistFunction · 0.92
AssignCopilotToIssueFunction · 0.92
RequestCopilotReviewFunction · 0.92
MergePullRequestFunction · 0.92

Calls 1

DataURIFunction · 0.85

Tested by 2

TestAllToolsetIconsExistFunction · 0.74
TestIconsFunction · 0.68