Skip to content

AppRenderer: Add hostInfo and hostCapabilities props #175

@aharvard

Description

@aharvard

Problem

The AppRenderer component currently hardcodes hostInfo and capabilities when creating the internal AppBridge:

const bridge = new AppBridge(
  client ?? null,
  {
    name: 'MCP-UI Host',  // Hardcoded
    version: '1.0.0',     // Hardcoded
  },
  {
    openLinks: {},
    serverTools: serverCapabilities?.tools,
    serverResources: serverCapabilities?.resources,
  },
);

This means MCP apps receive generic host information in McpUiInitializeResult instead of the actual host application's identity and capabilities.

Use Case

We're integrating @mcp-ui/client into goose and we'd like MCP apps to know they're running in goose and what capabilities are available:

  • hostInfo.name: "goose" (not "MCP-UI Host")
  • hostInfo.version: goose's actual version
  • hostCapabilities: goose-specific capabilities (e.g., sampling, logging)

Proposed Solution

Add optional hostInfo and hostCapabilities props to AppRendererProps:

interface AppRendererProps {
  // ... existing props ...
  
  /** Host application identification (name and version). Defaults to { name: 'MCP-UI Host', version: '1.0.0' } */
  hostInfo?: { name: string; version: string };
  
  /** Host capabilities to advertise to the MCP app */
  hostCapabilities?: McpUiHostCapabilities;
}

Workaround

Currently, we could use AppFrame + AppBridge directly for full control, but AppRenderer is much more convenient for common use cases.

Related

This would allow hosts to properly identify themselves per the MCP UI spec's McpUiInitializeResult type.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions