Skip to content

Conversation

@mattpodwysocki
Copy link
Contributor

Summary

This PR implements the MCP Apps pattern for static_map_image_tool, maintaining backward compatibility by supporting both patterns simultaneously.

Changes

Tool with MCP Apps Support

  • static_map_image_tool - Generate and preview static map images

Implementation Details

The tool now returns both:

  1. MCP-UI resource content via createUIResource() (existing pattern)
  2. MCP Apps metadata via _meta.ui.resourceUri field (new pattern)

New UI resource created (ui:// scheme):

  • StaticMapUIResource - Serves HTML for static map preview

Client Compatibility

This graceful degradation approach supports:

  • Claude Code - Supports MCP Apps via _meta.ui.resourceUri
  • VS Code - Supports MCP Apps via _meta.ui.resourceUri
  • Existing MCP-UI clients - Continue to use createUIResource()

Testing

All tests passing: 582 tests

Build verified successfully.

Related

mattpodwysocki and others added 6 commits January 12, 2026 16:18
Implements MCP server icons at the correct architectural level (server
initialization) instead of at the tool level. Adds both light and dark
theme variants of the Mapbox logo using base64-encoded SVG data URIs.

- Add mapbox-logo-black.svg for light theme backgrounds
- Add mapbox-logo-white.svg for dark theme backgrounds
- Update server initialization to include icons array with theme property
- Use 800x180 SVG logos embedded as base64 data URIs

This replaces the previous incorrect approach of adding icons to
individual tools, which was not aligned with the MCP specification.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updates the MCP SDK from 1.25.1 to 1.25.2 and recreates the output
validation patch for the new version. The patch continues to convert
strict output schema validation errors to warnings, allowing tools
to gracefully handle schema mismatches.

Changes:
- Update @modelcontextprotocol/sdk from ^1.25.1 to ^1.25.2
- Recreate SDK patch for version 1.25.2
- Remove obsolete 1.25.1 patch file
- All 397 tests pass with new SDK version

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implement the MCP Apps pattern for static_map_image_tool, maintaining backward compatibility by supporting both patterns simultaneously.

Changes:
- Add _meta.ui.resourceUri to static_map_image_tool response for MCP Apps pattern
- Create StaticMapUIResource (ui:// scheme) for static map previews
- Register StaticMapUIResource in resourceRegistry.ts

The MCP Apps pattern enables broader client compatibility (Claude Code, VS Code) while preserving existing MCP-UI functionality. The tool now returns both:
1. MCP-UI resource content via createUIResource()
2. MCP Apps metadata via _meta.ui.resourceUri

This graceful degradation allows clients to use whichever pattern they support.

Related: https://blog.modelcontextprotocol.io/posts/2026-01-26-mcp-apps/
All tests passing (582 tests).
@mattpodwysocki mattpodwysocki requested a review from a team as a code owner January 28, 2026 15:05
@mattpodwysocki
Copy link
Contributor Author

Closing this PR - MCP Apps support doesn't make sense for static_map_image_tool since it returns an image (base64 data), not a URL. The tool already includes the image in the response and MCP-UI handles iframe display.

MCP Apps is better suited for tools that return URLs as primary content (like the devkit tools: preview_style_tool, style_comparison_tool, geojson_preview_tool).

Focusing on mcp-devkit-server PR #62 for MCP Apps support instead.

@mattpodwysocki mattpodwysocki deleted the add-mcp-apps-support branch January 28, 2026 16:01
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.

1 participant