This document explains how to work with toolsets and icons in the GitHub MCP Server.
Toolsets are logical groupings of related tools. Each toolset has metadata defined in pkg/github/tools.go:
ToolsetMetadataRepos = inventory.ToolsetMetadata{
ID: "repos",
Description: "GitHub Repository related tools",
Default: true,
Icon: "repo",
}| Field | Type | Description |
|---|---|---|
ID |
ToolsetID |
Unique identifier used in URLs and CLI flags (e.g., repos, issues) |
Description |
string |
Human-readable description shown in documentation |
Default |
bool |
Whether this toolset is enabled by default |
Icon |
string |
Octicon name for visual representation in MCP clients |
Icons help users quickly identify toolsets in MCP-compatible clients. We use Primer Octicons for all icons.
Browse the Octicon gallery and select an appropriate icon. Use the base name without size suffix (e.g., repo not repo-16).
Icons are defined in pkg/octicons/required_icons.txt, which is the single source of truth for which icons should be embedded:
# Required icons for the GitHub MCP Server
# Add new icons below (one per line)
repo
issue-opened
git-pull-request
your-new-icon # Add your icon here
Run the fetch-icons script to download and convert the icon:
# Fetch a specific icon
script/fetch-icons your-new-icon
# Or fetch all required icons
script/fetch-iconsThis script:
- Downloads the 24px SVG from Primer Octicons
- Converts to PNG with light theme (dark icons for light backgrounds)
- Converts to PNG with dark theme (white icons for dark backgrounds)
- Saves both variants to
pkg/octicons/icons/
Requirements: The script requires rsvg-convert:
- Ubuntu/Debian:
sudo apt-get install librsvg2-bin - macOS:
brew install librsvg
Add or update the Icon field in the toolset definition:
// In pkg/github/tools.go
ToolsetMetadataRepos = inventory.ToolsetMetadata{
ID: "repos",
Description: "GitHub Repository related tools",
Default: true,
Icon: "repo", // Add this line
}Run the documentation generator to update all markdown files:
go run ./cmd/github-mcp-server generate-docsThis updates icons in:
README.md- Toolsets table and tool section headersdocs/remote-server.md- Remote toolsets table
Some toolsets are only available in the remote GitHub MCP Server (hosted at api.githubcopilot.com). These are defined in pkg/github/tools.go with their icons, but are not registered with the local server:
// Remote-only toolsets
ToolsetMetadataCopilot = inventory.ToolsetMetadata{
ID: "copilot",
Description: "Copilot related tools",
Icon: "copilot",
}The RemoteOnlyToolsets() function returns the list of these toolsets for documentation generation.
To add a new remote-only toolset:
- Add the metadata definition in
pkg/github/tools.go - Add it to the slice returned by
RemoteOnlyToolsets() - Regenerate documentation
Individual tools inherit icons from their parent toolset. When a tool is registered with a toolset, its icons are automatically set:
// In pkg/inventory/server_tool.go
toolCopy.Icons = tool.Toolset.Icons()This means you only need to set the icon once on the toolset, and all tools in that toolset will display the same icon.
The MCP protocol supports tool icons via the icons field. We provide icons in two formats:
- Data URIs - Base64-encoded PNG images embedded in the tool definition
- Light/Dark variants - Both theme variants are provided for proper display
The octicons.Icons() function generates the MCP-compatible icon objects:
// Returns []mcp.Icon with both light and dark variants
icons := octicons.Icons("repo")| Toolset | Octicon Name |
|---|---|
| Context | person |
| Repositories | repo |
| Issues | issue-opened |
| Pull Requests | git-pull-request |
| Git | git-branch |
| Users | people |
| Organizations | organization |
| Actions | workflow |
| Code Security | codescan |
| Secret Protection | shield-lock |
| Dependabot | dependabot |
| Discussions | comment-discussion |
| Gists | logo-gist |
| Security Advisories | shield |
| Projects | project |
| Labels | tag |
| Stargazers | star |
| Notifications | bell |
| Dynamic | tools |
| Copilot | copilot |
| Support Search | book |
- Ensure PNG files exist in
pkg/octicons/icons/with-light.pngand-dark.pngsuffixes - Run
go run ./cmd/github-mcp-server generate-docsto regenerate - Check that the
Iconfield is set on the toolset metadata
- Verify the client supports MCP tool icons
- Check that the octicons package is properly generating base64 data URIs
- Ensure the icon name matches a file in
pkg/octicons/icons/
The following tests run in CI to catch icon issues early:
Verifies that all icons listed in pkg/octicons/required_icons.txt have corresponding PNG files embedded.
Verifies that all toolset Icon fields reference icons that are properly embedded.
Ensures all toolsets have an Icon field set.
If any of these tests fail:
- Add the missing icon to
pkg/octicons/required_icons.txt - Run
script/fetch-iconsto download the icon - Commit the new icon files