Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Implement SEP-973: Add icons and metadata support #708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kakooch wants to merge 1 commit into modelcontextprotocol:main
base: main
Choose a base branch
Loading
from kakooch:feature/sep-973-icons-metadata

Conversation

@kakooch
Copy link

@kakooch kakooch commented Dec 1, 2025

Summary

This PR implements SEP-973 by adding icon support to MCP schema types, enabling clients to visually identify servers, tools, resources, and prompts.

Changes

  • New Icon record with src, mimeType, and sizes fields
  • Implementation: Added icons and websiteUrl fields
  • Tool: Added icons field and updated Builder
  • Resource: Added icons field and updated Builder
  • Prompt: Added icons field

Icon Type Details

The Icon record supports:

  • HTTP/HTTPS URLs for remote icons
  • Data URIs for embedded base64-encoded icons (e.g., data:image/png;base64,...)
  • Multiple sizes following Web Manifest format (e.g., "48x48", "48x48 96x96", "any")
  • Common image MIME types (image/png, image/svg+xml, image/x-icon, etc.)

Example Usage

// Server implementation with icons
var implementation = new Implementation(
 "my-server",
 "My Server",
 "1.0.0",
 List.of(
 new Icon("https://example.com/icon-48.png", "image/png", "48x48"),
 new Icon("https://example.com/icon.svg", "image/svg+xml", "any")
 ),
 "https://example.com"
);
// Tool with icon
var tool = Tool.builder()
 .name("search")
 .description("Search the web")
 .icons(List.of(new Icon("https://example.com/search-icon.png")))
 .build();

Backward Compatibility

All existing constructors remain functional and pass null for the new optional fields. This ensures a seamless upgrade path for existing implementations.

Test Plan

  • Build compiles successfully
  • Spring Java format validation passes
  • Unit tests for Icon record validation
  • Serialization/deserialization tests for new fields

Related

🤖 Generated with Claude Code

This commit implements SEP-973 by adding icon support to MCP schema types,
enabling clients to visually identify servers, tools, resources, and prompts.
Changes:
- Add new Icon record with src, mimeType, and sizes fields
- Add icons and websiteUrl fields to Implementation
- Add icons field to Tool, Resource, and Prompt records
- Update Builder classes to support new fields
- Maintain backward compatibility with existing constructors
The Icon type supports:
- HTTP/HTTPS URLs for remote icons
- Data URIs for embedded base64-encoded icons
- Multiple sizes following Web Manifest format (e.g., "48x48", "any")
- Common image MIME types (image/png, image/svg+xml, etc.)
Resolves: modelcontextprotocol#532
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Implement SEP-973: Icons and metadata support

1 participant

AltStyle によって変換されたページ (->オリジナル) /