Skip to content

McpAdapter: declare MCP Apps UI capability on client init #129

Description

@bokelley

Problem

McpAdapter initializes the MCP client without declaring UI/Apps capabilities:

this.mcpClient = new Client({
  name: 'scope3-sdk',
  version: SDK_VERSION,
}, {
  capabilities: {
    tools: {},
  },
});

Without declaring the io.modelcontextprotocol/ui extension capability, the MCP server has no way to know that this client supports MCP Apps. Servers that gate UI metadata (like _meta.ui.resourceUri) behind capability negotiation will not include it in responses to this client.

Proposed Solution

Add the MCP Apps extension capability to the client initialization:

this.mcpClient = new Client({
  name: 'scope3-sdk',
  version: SDK_VERSION,
}, {
  capabilities: {
    tools: {},
  },
});

// Declare MCP Apps support
// Uses @mcp-ui/client's UI_EXTENSION_CAPABILITIES or manual declaration

The exact capability key depends on the current MCP Apps spec — likely io.modelcontextprotocol/ui with config { mimeTypes: ["text/html;profile=mcp-app"] }.

Related

Depends on #128 — declaring the capability is only useful if consumers can actually access the raw CallToolResult and MCP App resources.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions