Skip to content

feat: add infrastructure for MCP Apps#10259

Merged
joehan merged 2 commits intomcp-sse-supportfrom
mcp-app-infra
Apr 3, 2026
Merged

feat: add infrastructure for MCP Apps#10259
joehan merged 2 commits intomcp-sse-supportfrom
mcp-app-infra

Conversation

@joehan
Copy link
Copy Markdown
Member

@joehan joehan commented Apr 3, 2026

Adds support for returning structured content from tools, which is used by MCP Apps to pass complex data to the host. (Chained off #10258)

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds several new UI resources—login, update environment, deploy, and init—to the MCP resources collection. It also updates the toContent utility to include structuredContent in its return object. A review comment identified a violation of the repository's style guide regarding the use of as any in src/mcp/util.ts and suggested using an intersection type for better type safety.

src/mcp/util.ts Outdated
content: [{ type: "text", text: `${prefix}${text}${suffix}` }],
};
structuredContent: data,
} as any;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The use of as any as a type cast is discouraged by the repository style guide. To include the structuredContent property while remaining compatible with the CallToolResult return type, consider using an intersection type instead of an escape hatch.

Suggested change
} as any;
} as CallToolResult & { structuredContent: unknown };
References
  1. Never use any or unknown as an escape hatch. Define proper interfaces/types or use type guards. (link)

### Description
Adds support for returning structured content from tools, which is used by MCP Apps to pass complex data to the host. Also updates the resource index.

### Scenarios Tested
- Verified build and file changes.
### Description
- Removes imports and registry entries for UI resources that are not yet available in this branch (login, update_environment, deploy, init).
- Replaces as any in toContent with an intersection type for better type safety.

### Scenarios Tested
- Verified build succeeds.
@joehan joehan marked this pull request as ready for review April 3, 2026 22:08
@joehan joehan merged commit fdf875e into mcp-sse-support Apr 3, 2026
22 of 23 checks passed
@joehan joehan deleted the mcp-app-infra branch April 3, 2026 22:08
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.

2 participants