Skip to content

Conversation

@DaleSeo
Copy link
Contributor

@DaleSeo DaleSeo commented Dec 12, 2025

This PR adds the missing theme property to IconSchema to bring the TypeScript SDK into full compliance with the MCP specification (2025-11-25).

Motivation and Context

The MCP specification defines an optional theme property on the Icon interface to indicate whether an icon is designed for light or dark backgrounds. While the SDK's spec.types.ts (auto-generated from the MCP spec) correctly includes theme?: "light" | "dark" on the Icon interface, the IconSchema in types.ts used for Zod validation was missing this property.

How Has This Been Tested?

No type errors from running npm run typecheck

Breaking Changes

None. This is a non-breaking additive change:

  • The theme property is optional, so existing code continues to work
  • Icons without a theme specified will pass validation as before
  • Servers can now optionally include theme: "light" or theme: "dark" in their icon definitions

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 12, 2025

Open in StackBlitz

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/sdk@1290

commit: 911f353

@DaleSeo DaleSeo marked this pull request as ready for review December 12, 2025 01:09
@DaleSeo DaleSeo requested a review from a team as a code owner December 12, 2025 01:09
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.

1 participant