Skip to content

Explore OpenGenerativeUI as an MCP server #17

@GeneralJerel

Description

@GeneralJerel

Overview

Explore the feasibility and design of OpenGenerativeUI as a Model Context Protocol (MCP) server. This would enable Claude and other AI systems to generate UIs directly through the MCP interface, making generative UI a first-class capability available to any MCP-compatible client.

Motivation

  • Unified Interface: MCP standardizes how Claude and other AI systems interact with external tools
  • Broader Access: Makes OpenGenerativeUI available beyond just the CopilotKit ecosystem
  • Composability: Other MCP tools could request UI generation as part of their workflows
  • AI-Native: Natural fit for AI systems to compose and generate UI structures

Use Cases

  1. Document Agent as MCP: Generate UIs for documents, forms, or reports through MCP
  2. Multi-Tool Workflows: An agent could call multiple MCPs (data fetch, transform, generate UI)
  3. Claude Integration: Direct Claude → MCP → OpenGenerativeUI → UI generation
  4. Third-Party Integration: Any MCP-compatible client can request UI generation

Design Exploration

  • MCP Resources: What would OpenGenerativeUI expose as resources?

    • UI component library definitions
    • Generated UI templates
    • Available rendering targets
  • MCP Tools: What tools should the MCP provide?

    • generateUI(data, dataSchema, context) - Generate UI from data
    • saveTemplate(ui, metadata) - Save a generated UI as a template
    • applyTemplate(data, templateId) - Apply saved template to data
    • listTemplates() - Browse available templates
  • Input/Output Format: How should UI data be represented?

    • Current JSON/component structure in OpenGenerativeUI
    • Integration with MCP's standard message format
    • Validation/schema enforcement
  • Rendering: How are generated UIs rendered?

    • Web-based renderer on the MCP client side
    • Integration with CopilotKit's widget system
    • Support for headless/CLI rendering

Implementation Questions

  1. Does OpenGenerativeUI's current architecture support exposing as an MCP server?
  2. What's the minimal viable MCP server for OpenGenerativeUI?
  3. How would the MCP handle complex stateful interactions?
  4. Authentication/authorization model for the MCP?
  5. Performance considerations for streaming UI generation over MCP?

Related Work

  • CopilotKit MCP integration (existing)
  • Other generative systems as MCPs
  • Claude's native MCP support
  • Existing OpenGenerativeUI architecture

Next Steps

  1. Audit current OpenGenerativeUI architecture for MCP compatibility
  2. Design MCP interface/contract for UI generation
  3. Create minimal MCP server prototype
  4. Test with Claude and other MCP clients
  5. Document patterns and best practices

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions