2.13.0
Icons provide visual representations for your MCP servers and components, helping client applications present better user interfaces. When displayed in MCP clients, icons help users quickly identify and navigate your serverβs capabilities.
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
New in version4.0.0
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. The theme 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.

