Icon sources are https: or data: URIs
Tool icon sources should be https: or data: URIs; clients MUST reject unsafe schemes such as javascript:, file:, ftp: and ws:, so the tool shows without its icon.
Check spec-icon-scheme · MCP specification 2026-07-28 · default severity: attention · rubric 2.1.0
What fails
Icons with other schemes are rejected, so the tool shows without its icon. The same section asks consumers to ensure the URI is either HTTPS or data:.
The rule
Clients MUST reject icon URIs that use unsafe schemes and redirects, such as
javascript:,file:,ftp:,ws:, or local app URI schemes.Source: MCP specification 2026-07-28: Overview (JSON Schema usage, _meta, icons)
How to fix it
Serve the icon over https from the server's own origin, or inline it as a data: URI.
- Serve icons over https, ideally from the server’s own origin.
- Or inline small icons as data:image/svg+xml or data:image/png URIs.
- Set mimeType and sizes so clients can pick the right one.
TypeScript SDK
import { McpServer } from '@modelcontextprotocol/server';
import * as z from 'zod';
const server = new McpServer({ name: 'issues', version: '1.0.0' });
server.registerTool(
'get_issue',
{
title: 'Get issue',
description: 'Return one issue by ID. Use when the user names an issue.',
inputSchema: z.strictObject({
issue_id: z.string().describe('Issue ID, for example ISS-42'),
}),
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
icons: [{ src: 'https://example.com/icons/issue.svg', mimeType: 'image/svg+xml', sizes: ['any'] }],
},
async ({ issue_id }) => ({ content: [{ type: 'text', text: 'Done' }] }),
);Python SDK
from typing import Annotated
from pydantic import Field
from mcp.server.mcpserver import MCPServer
from mcp.types import ToolAnnotations
from mcp.types import Icon
server = MCPServer("issues")
@server.tool(
title="Get issue",
annotations=ToolAnnotations(readOnlyHint=True, destructiveHint=False, openWorldHint=False),
icons=[Icon(src="https://example.com/icons/issue.svg", mimeType="image/svg+xml", sizes=["any"])],
)
def get_issue(
issue_id: Annotated[str, Field(description="Issue ID, for example ISS-42")],
) -> str:
"""Return one issue by ID. Use when the user names an issue."""
return "Done"Run against @modelcontextprotocol/server 2.4.0, mcp 2.3.0 and fastmcp 4.2.2 on 2026-11-18; the checker confirms this check passes on the tool list each snippet produces.
Questions
Can I use an http: icon?
Clients are asked to ensure icons are HTTPS or data:. Plain http: is likely to be blocked by the client’s content policy.
Does a broken icon fail review?
No rule rejects a tool for its icon, but the tool appears without one and the finding signals a client-side rejection.
Related checks
- Tool fields have the types the schema defines
- _meta keys follow the key-name grammar
- Every list entry is a tool object with a name
- All checks in MCP specification 2026-07-28: tools/list rules
How this check is graded
It counts toward: MCP specification 2026-07-28. See the rubric.
Last verified against MCP specification 2026-07-28: Overview (JSON Schema usage, _meta, icons) on 2026-11-18. The rule above is quoted in the source’s own words. This page as Markdown.
Check your tool list: paste your tools/list, nothing is sent anywhere