Skip to content

Conversation

@antonpk1
Copy link
Collaborator

Summary

Adds documentation for the styles field introduced in #127 to the MCP Apps specification (SEP-1865).

  • Add styles field to HostContext interface
  • Add dedicated Theming section documenting all 36 standardized CSS variables
  • Document Host/App behavior including light-dark() usage
  • Add Design Decision docs: update UI resource format and metadata fields #4 in Rationale section explaining the approach

Changes

HostContext Interface

  • New styles?: Record<string, string> field with reference to Theming section

Theming Section

  • Table of 36 CSS variables organized by category (colors, typography, borders)
  • Host Behavior: MAY provide any subset, MAY use light-dark()
  • App Behavior: SHOULD use fallbacks, MUST set color-scheme when using light-dark() values

Rationale

🤖 Generated with Claude Code

- Add styles field to HostContext interface with reference to Theming section
- Add Theming section documenting 36 standardized CSS variables
- Document Host/App behavior for theming including light-dark() usage
- Add Design Decision #4 explaining CSS variables approach
- Include JSON example showing light-dark() pattern

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 11, 2025

Open in StackBlitz

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/ext-apps@130

commit: 854fec2

@antonpk1 antonpk1 requested a review from martinalong December 11, 2025 12:37
@liady
Copy link
Collaborator

liady commented Dec 11, 2025

@antonpk1 looks like a good subset of variables.

  1. Do we want to state that apps MUST apply these variables? Currently it's not mentioned explicitly in the SEP.
  2. Do we think in the future we'll add more style customization mechanisms? Perhaps the key should be more specific, like styleVariables - or a key in anobject (styles.variables).
  3. Do we also want more semantic variables and not just these style atoms? For example if we want buttons to be consistent across apps (one app can use border-radius-small for buttons and other can use border-radius-medium). I think we need to decide the level of design consistency we're aiming for across apps - which might require more semantic definitions (or a concerete example).

@martinalong martinalong merged commit d07eb1f into martinalong/mcp-apps/add-styles Dec 12, 2025
3 checks passed
@martinalong
Copy link
Collaborator

martinalong commented Dec 12, 2025

Merging this into my PR, but @liady I'll address your points in my PR!

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.

4 participants