Icon Format
Icons use the standard MCP Icon type from the MCP protocol specification. Each icon specifies a source URL or data URI, and optionally includes MIME type, size, and theme information.- src: URL or data URI pointing to the icon image
- mime_type (optional): MIME type of the image (e.g., “image/png”, “image/svg+xml”)
- sizes (optional): Array of size descriptors (e.g., [“48x48”], [“any”])
- theme (optional): The UI theme the icon is designed for,
"light"or"dark"
Server Icons
Add icons and a website URL to your server for display in client applications. Multiple icons at different sizes help clients choose the best resolution for their display context.Component Icons
Icons can be added to individual tools, resources, resource templates, and prompts. This helps users visually distinguish between different component types and purposes.Tool Icons
Resource Icons
Resource Template Icons
Prompt Icons
Theme Variants
MCP clients like VS Code and GitHub Desktop render their own interface in either a light or dark theme, and an icon designed for one can be hard to see against the other, such as a dark logo that disappears into a dark sidebar. Thetheme field on Icon tells a client which UI theme an icon is designed for, so the client can display the version that stays visible.
Supply two icons with complementary theme values and the client picks the one that matches its current appearance:
theme means the icon is assumed suitable for any theme. That’s the right choice for a single icon with enough contrast to read clearly against both light and dark backgrounds.
Using Data URIs
For small icons or when you want to embed the icon directly without external dependencies, use data URIs. This approach eliminates the need for hosting and ensures the icon is always available.Generating Data URIs from Files
FastMCP provides theImage utility class to convert local image files into data URIs.

