Skip to content

Conversation

@jesselumarie
Copy link
Contributor

@jesselumarie jesselumarie commented Jul 11, 2025

Currently, prompts and tool descriptions are often concatenated within a namespace to assure there are no collisions e.g.
image

This change adds an optional Icons argument so that Implementations can identify themselves visually, as well as a websiteUrl for linking to documentation. It also adds icons to Resources, Tools, and Prompts.

This PR consolidates @timrogers PR #417 and my PR #862, taking in feedback from @dsp-ant and @myaroshefsky to allow icons of multiple sizes.

Motivation and Context

While we can encourage MCP clients to only show the tool/prompt name, it makes it difficult to succinctly show in the UI that it's coming from a specified 3rd party source. Adding an icon would allow for better affordances for tool/resource/prompt source identification for users, and the website url can help client self direct to documentation.

How Has This Been Tested?

n/a

Breaking Changes

n/a

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • 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

Would love to get this merged in so we can make it a bit easier to highlight where tools/resources are coming from 🙏🏻

/**
* A string that specifies one or more sizes at which the icon file can be used.
* Each size is specified as <width in pixels>x<height in pixels>. If multiple sizes are specified, they are separated by spaces; for example, 48x48 96x96.
* For vector formats like SVG, you can use any to indicate scalability
Copy link
Contributor Author

@jesselumarie jesselumarie Jul 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i borrowed heavily from the the web manifest docs here 😅

@timrogers
Copy link
Contributor

@jesselumarie Thanks for taking these changes forward. This looks great to me, and is something I'd love to implement in GitHub Copilot coding agent.

@dsp-ant
Copy link
Member

dsp-ant commented Jul 15, 2025

I would love if this would have an accompanying Specification Enhancement Proposal, that we can then put forward to @modelcontextprotocol/core-maintainers

@dsp-ant dsp-ant added SEP and removed SEP-requested labels Jul 15, 2025
@dsp-ant dsp-ant added this to the DRAFT-XX-XX milestone Jul 15, 2025
@dsp-ant dsp-ant moved this from Draft to Consulting in Standards Track Jul 15, 2025
@dsp-ant dsp-ant changed the title Expose additional metadata for Implementations SEP-002: Expose additional metadata for Implementations Jul 15, 2025
@dsp-ant dsp-ant added the draft SEP proposal with a sponsor. label Jul 15, 2025
@jesselumarie jesselumarie requested a review from a team July 17, 2025 20:32
Comment on lines 317 to 347
/**
* An optional URL of the website for this implementation.
*
* @format: uri
*/
websiteUrl?: string;

/**
* An optional list of icons for this implementation.
* This can be used by clients to display the implementation in a user interface.
* Each icon should have a `kind` property that specifies whether it is a data representation or a URL source, a `src` property that points to the icon file or data representation, and may also include a `mimeType` and `sizes` property.
* The `mimeType` property should be a valid MIME type for the icon file, such as "image/png" or "image/svg+xml".
* The `sizes` property should be a string that specifies one or more sizes at which the icon file can be used, such as "48x48" or "any" for scalable formats like SVG.
* The `sizes` property is optional, and if not provided, the client should assume that the icon can be used at any size.
*/
icons?: Icon[];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now there are many types that extend BaseMetadata:

I think websiteUrl is probably only appropriate for Implementation, and icons is probably only appropriate for Implementation + primitives (i.e. not PromptArgument nor PromptReference).

Also, websiteUrl will probably be covered by the upcoming server.json file. (See also modelcontextprotocol/registry#183.)

One alternative would be to create a dedicated Icons interface, and make the relevant types extend that interface.

Another alternative would be to add a new base type like SupremeDeluxeBaseMetadata that itself extends BaseMetadata and adds icons.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's worth separating these out.

i'm happy to exclude websiteUrl from arguments/templates (I agree it doesn't make sense under PromptArgument or PromptReference).

The one nice thing about having URLs on all of these is you could potentially have deep links to sections for specific documentation e.g. link to a tool's docs. Right now the UI can get crowded with tool argument descriptions:
image

sizes?: string;
}

export type Icon = UrlIcon | DataIcon;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unconvinced a separate icon type between URL or data icons is useful. A data URI is an entirely valid URL and it's easy to distinguish the two by looking at the scheme. Do we see the types here diverging further?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to what @connor4312 suggested - it feels like this can be simplified.

@jesselumarie jesselumarie changed the title SEP-002: Expose additional metadata for Implementations SEP-002: Expose additional metadata for Implementations, Resources, Tools and Prompts Jul 23, 2025
@dsp-ant dsp-ant changed the title SEP-002: Expose additional metadata for Implementations, Resources, Tools and Prompts SEP-973: Expose additional metadata for Implementations, Resources, Tools and Prompts Jul 24, 2025
@tadasant tadasant mentioned this pull request Jul 25, 2025
9 tasks
@jesselumarie jesselumarie force-pushed the jlumarie/add-icons-to-implementations branch from bb0decf to b5c7196 Compare August 22, 2025 18:35
Comment on lines +349 to +357
/**
* An optional list of icons for this implementation.
* This can be used by clients to display the implementation in a user interface.
* Each icon should have a `kind` property that specifies whether it is a data representation or a URL source, a `src` property that points to the icon file or data representation, and may also include a `mimeType` and `sizes` property.
* The `mimeType` property should be a valid MIME type for the icon file, such as "image/png" or "image/svg+xml".
* The `sizes` property should be a string that specifies one or more sizes at which the icon file can be used, such as "48x48" or "any" for scalable formats like SVG.
* The `sizes` property is optional, and if not provided, the client should assume that the icon can be used at any size.
*/
icons?: Icon[];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it may be worth factoring this out into an Icons interface, such that interface Implementation extends BaseMetadata, Icons (and likewise for the other interfaces). That way, the documentation for the icons property is shared / centralized.

}

interface Icons {
src: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is src? It doens't have a comment.

- An HTTP/HTTPS URL pointing to an image file
- A data URI with base64-encoded image data
- `mimeType`: Optional MIME type if the server's type is missing or generic
- `sizes`: Optional size specification (e.g., "48x48", "any" for scalable formats like SVG, or "48x48 96x96" for multiple sizes)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be size instead of sizes?

@dsp-ant dsp-ant merged commit 2985f36 into modelcontextprotocol:main Sep 9, 2025
2 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Approved in Standards Track Sep 9, 2025
- `src`: A URI pointing to the icon resource (required). This can be:
- An HTTP/HTTPS URL pointing to an image file
- A data URI with base64-encoded image data
- `mimeType`: Optional MIME type if the server's type is missing or generic

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if this was mediaType instead as the term mimeType was replaced decades ago https://www.iana.org/assignments/media-types/media-types.xhtml

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you, but mimeType is consistent with other occurrences within our schema. For example, Resource.mimeType.

/**
* An optional list of icons for this implementation.
* This can be used by clients to display the implementation in a user interface.
* Each icon should have a `kind` property that specifies whether it is a data representation or a URL source, a `src` property that points to the icon file or data representation, and may also include a `mimeType` and `sizes` property.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this kind property? It's not in the schema.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kind was from an earlier revision of the SEP (see #973 (comment)). I've submitted #1451 to remove that, plus a few other clean-ups.

jonathanhefner added a commit to jonathanhefner/modelcontextprotocol that referenced this pull request Sep 9, 2025
Follow-up to modelcontextprotocol#955.

This factors out an `Icons` interface to centralize the implementation
and documentation of the various `icons` properties.

This also cleans up the type docs a bit, including removing reference to
a nonexistent `kind` property from an earlier revision of the SEP.
"description": "Primary application entry point",
"mimeType": "text/x-rust"
"mimeType": "text/x-rust",
"icons": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason that resource templates don't also have icons?

dsp-ant pushed a commit that referenced this pull request Sep 11, 2025
Follow-up to #955.

This factors out an `Icons` interface to centralize the implementation
and documentation of the various `icons` properties.

This also cleans up the type docs a bit, including removing reference to
a nonexistent `kind` property from an earlier revision of the SEP.
connor4312 added a commit to microsoft/vscode that referenced this pull request Sep 29, 2025
* mcp: support custom icons for servers, tools, resources

Adopts modelcontextprotocol/modelcontextprotocol#955

Closes #265892

* fix
polatengin added a commit to microsoft/azure-devops-mcp that referenced this pull request Oct 15, 2025
The project dependency on `@modelcontextprotocol/sdk` has been updated
to the latest version, 1.19.1 (from 1.18.2) with PR #564

With this update we can take benefit of the new features introduced in
the `@modelcontextprotocol/sdk`;
modelcontextprotocol/modelcontextprotocol#955

One interesting feature is the icon support for MCP servers. With
version 1.105 VSCode supports MCP Server icons;
https://code.visualstudio.com/updates/v1_105#_mcp-specification-updates

This PR configures Azure DevOps MCP Server to have Azure DevOps logo as
it's icon.

## **Associated Risks**

None

## ✅ **PR Checklist**

- [x] **I have read the [contribution
guidelines](https://github.com/microsoft/azure-devops-mcp/blob/main/CONTRIBUTING.md)**
- [x] **I have read the [code of conduct
guidelines](https://github.com/microsoft/azure-devops-mcp/blob/main/CODE_OF_CONDUCT.md)**
- [x] Title of the pull request is clear and informative.
- [x] 👌 Code hygiene
- [x] 🔭 Telemetry added, updated, or N/A
- [x] 📄 Documentation added, updated, or N/A
- [x] 🛡️ Automated tests added, or N/A

---------

Co-authored-by: Dan Hellem <dahellem@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted SEP accepted by core maintainers, but still requires final wording and reference implementation. SEP

Projects

No open projects
Status: Approved

Development

Successfully merging this pull request may close these issues.

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

10 participants