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 and size information.- src: URL or data URI pointing to the icon image
- mimeType (optional): MIME type of the image (e.g., “image/png”, “image/svg+xml”)
- sizes (optional): Array of size descriptors (e.g., [“48x48”], [“any”])
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
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.

