[mcp-ui] Adding MCP-UI support to those that support URLs #42
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


Description
Adds MCP-UI support to URL-returning tools, enabling rich iframe embedding in compatible MCP clients
while maintaining full backwards compatibility.
What is MCP-UI?
MCP-UI is an open specification that allows MCP tools to return interactive UI resources that clients can
render as embedded iframes. This enables richer, more visual experiences in supporting clients like
Goose, while seamlessly falling back to text URLs in clients like Claude Desktop.
Changes
Enhanced Tools (3 total):
preview_style_tool- Embeds Mapbox style previewsgeojson_preview_tool- Embeds geojson.io visualizationsstyle_comparison_tool- Embeds side-by-side style comparisonsImplementation Details:
@mcp-ui/server@^5.13.1dependencyENABLE_MCP_UIenv var or--disable-mcp-uiflagisMcpUiEnabled()insrc/config/toolConfig.tsBackwards Compatibility:
Documentation:
README.mdwith MCP-UI configuration sectionCLAUDE.mdwith developer guidanceFiles Changed
src/config/toolConfig.ts- Configuration and helper functionssrc/tools/preview-style-tool/PreviewStyleTool.ts- MCP-UI supportsrc/tools/geojson-preview-tool/GeojsonPreviewTool.ts- MCP-UI supportsrc/tools/style-comparison-tool/StyleComparisonTool.ts- MCP-UI supportpackage.json- Added@mcp-ui/serverdependencytest/**/*.test.ts- Updated tests for default enabled behaviorREADME.md&CLAUDE.md- Documentation updatesTest
Unit Tests:
--disable-mcp-uiflagManual Testing:
npm run build # Test in Goose or ui-inspector - should see both text URL and UIResourceENABLE_MCP_UI=false npm run build
Should return only text URL (original behavior)
- Tested in Claude Desktop - works unchanged (ignores UIResource)
- Text URLs remain fully functional in all clients
Test Prompts:
Preview a Mapbox style:
Preview Mapbox style Urban Night with my public token
Results in Claude with no MCP-UI support (redacted for security)

Results in Goose with MCP-UI support

Preview GeoJSON:
Preview this GeoJSON: {"type": "Point", "coordinates": [2.2945, 48.8584]}
In Claude Desktop with no MCP-UI support

In Goose with MCP-UI support (note there is a CORS issue)

We can ask Goose, however to visualize it inline with their own OSM view:

Expected Behavior:
Code Quality:
Checklist
Additional Notes