Skip to content

feat: Add MCP-UI Remote DOM support to Goose Desktop #4288

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

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

JHKennedy4
Copy link
Collaborator

Overview

This PR adds support for MCP-UI Remote DOM components in the Goose Desktop application, enabling interactive web components within the chat interface.

Changes

Phase 1: Remote DOM Foundation

  • Added Remote DOM support to MCP-UI integration
  • Enhanced component library with proper design system patterns

Phase 2: Enhanced Primitives

  • Improved missing primitives with proper design system patterns
  • Fixed React component rendering issues

Phase 3: Complete Implementation

  • First working Remote DOM implementation in Goose ecosystem
  • Updated component library for better compatibility

Technical Details

  • Modified GooseComponentLibrary.ts to use React.createElement for better compatibility
  • Updated package dependencies for MCP-UI Remote DOM support
  • Maintained design system consistency throughout

Testing

  • Manual testing of Remote DOM components
  • Verification of existing functionality
  • Cross-platform compatibility check

Related Issues

This implements Remote DOM support as discussed in the MCP-UI integration planning.


Note: This is a draft PR for review and testing. Will be marked ready when testing is complete.

- Add Remote DOM MIME type detection in MCPUIResourceRenderer
- Create GooseComponentLibrary with 20+ component mappings
- Implement 5 missing primitives (Text, Heading, Container, Stack, Grid)
- Add test MCP server for Remote DOM integration testing

Phase 1 Milestones completed:
✅ M1.1: MCPUIResourceRenderer detects application/vnd.mcp-ui.remote-dom
✅ M1.2: GooseComponentLibrary registers 20+ components
✅ M1.3: Test MCP server returns Remote DOM resource
✅ M1.4: Component library ready for ui-button styling tests
✅ M1.5: Auto-resize functionality preserved for HTML resources
✅ M1.6: Action detection framework in place
- Update Text component to match Label component patterns (leading-none, select-none)
- Update Heading component to match Greeting component typography (font-light hierarchy)
- Remove RemoteDOM prefixes for cleaner component naming
- Update implementation plan to reflect simplified naming
- Enhance test MCP server with comprehensive component testing:
  - create_simple_ui: Basic primitives test
  - create_complex_layout: All 5 primitives working together
  - test_all_components: Complete 20+ component library test

Phase 2 Milestones completed:
✅ M2.1: Text renders with correct Cash Sans typography (Label patterns)
✅ M2.2: Text variants (body, caption, small, large) implemented
✅ M2.3: Heading supports h1-h6 with proper hierarchy (Greeting patterns)
✅ M2.4: Container provides proper spacing without Card borders
✅ M2.5: Stack creates proper vertical/horizontal layouts
✅ M2.6: Grid creates responsive grid layouts
✅ M2.7: All 5 primitives work together in complex layouts
✅ M2.8: Components ready for dark/light mode (using semantic tokens)

Ready for comprehensive testing with enhanced test server.
BREAKTHROUGH: This is the first MCP-UI Remote DOM integration in the Goose ecosystem!

Phase 1 ✅ Complete:
- Remote DOM MIME type detection (application/vnd.mcp-ui.remote-dom)
- Component library registration with 20+ existing components
- Basic integration framework established

Phase 2 ✅ Complete:
- 5 missing primitives implemented (Text, Heading, Container, Stack, Grid)
- Design system compliance with Cash Sans typography
- Proper semantic token usage for dark/light mode
- Component naming simplified (removed RemoteDOM prefixes)

Key Achievement:
- First Remote DOM support in Goose (no existing MCP servers use this)
- Complete 25+ component library ready for Remote DOM
- Proper integration with existing MCP-UI framework
- Ready for Phase 3: Action system integration

Next: Create test MCP server to validate implementation
- Use React.createElement instead of JSX for better compatibility
- Update package-lock.json with latest dependency changes
- Backup original .npmrc configuration
- Remove ui- prefix mapping, expose components with natural React names
- Regenerate package-lock.json with correct Node.js version (22.17.1)
- Clean up component library to follow React conventions
- Add Text, Heading, Container, Stack, and Grid components to ui/ directory
- Follow Goose component architecture with proper exports and TypeScript types
- Update GooseComponentLibrary to import from proper component locations
- Remove inline component definitions for cleaner separation of concerns
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