Skip to content

feat: Add SEP-973 icons and metadata support#912

Open
sainathreddyb wants to merge 1 commit intomodelcontextprotocol:mainfrom
sainathreddyb:feature/sep-973-metadata-icons
Open

feat: Add SEP-973 icons and metadata support#912
sainathreddyb wants to merge 1 commit intomodelcontextprotocol:mainfrom
sainathreddyb:feature/sep-973-metadata-icons

Conversation

@sainathreddyb
Copy link
Copy Markdown

Add Icon record and icons field to Implementation, Resource, ResourceTemplate, Prompt, and Tool records per SEP-973. Add websiteUrl and description fields to Implementation.

All fields are optional and backward compatible. Existing constructors and builders continue to work unchanged. Icon.src is validated as required per the spec.

Includes serialization, deserialization, round-trip, and backward compatibility tests for all modified records.

Closes #694

Motivation and Context

SEP-973 adds visual metadata (icons, website URLs) to MCP protocol types so that client UIs can display icons next to tools, resources, prompts, and server implementations. This is already implemented in the TypeScript SDK and Python SDK. The Java SDK is the remaining SDK without this support.

How Has This Been Tested?

  • 12 new unit tests covering Icon serialization, deserialization, round-trip, required src validation, and backward compatibility
  • Tests for icons on Implementation, Tool, Resource, ResourceTemplate, and Prompt
  • Full test suite passes: 760 tests, 0 failures (./mvnw clean test)
  • Verified backward compatibility: all existing constructors and builders work unchanged

Breaking Changes

None. All new fields are optional and default to null. Existing code compiles and runs without modification.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

  • Matches the TypeScript SDK's IconSchema/IconsSchema approach (commit 856d9ec)
  • The Python SDK already has full icons support across all types
  • Icon.src is validated as non-empty in the compact constructor, consistent with how Resource.uri and Resource.name are validated in their builder
  • @JsonIgnoreProperties(ignoreUnknown = true) on Icon ensures forward compatibility if the spec adds more fields later

Add Icon record and icons field to Implementation, Resource,
ResourceTemplate, Prompt, and Tool records per SEP-973. Add
websiteUrl and description fields to Implementation.

All fields are optional and backward compatible. Existing
constructors and builders continue to work unchanged.
Icon.src is validated as required per the spec.

Includes serialization, deserialization, round-trip, and backward
compatibility tests for all modified records.

Closes modelcontextprotocol#694
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SEP-973: Expose additional metadata for Implementations, Resources, Tools and Prompts

1 participant