Skip to content

Conversation

@mattpodwysocki
Copy link
Contributor

Summary

Implements MCP Apps support for static_map_image_tool, enabling interactive map preview in compatible hosts (VS Code, Claude Code, Goose). This properly addresses the original intent of closed PR #107.

Changes

Dependencies

  • Add @modelcontextprotocol/ext-apps@^1.0.1
  • Upgrade @modelcontextprotocol/sdk from 1.25.2 to 1.25.3

Tool Enhancement

  • Refactored StaticMapImageTool to return URL directly instead of fetching and base64-encoding
  • Added meta property with resourceUri and CSP configuration
  • Maintains backward compatibility with MCP-UI via createUIResource()

MCP Apps Support

  • Created StaticMapUIResource serving interactive HTML
  • Includes inline MCP Apps SDK client (avoids CSP issues)
  • Configured CSP for api.mapbox.com domains
  • Uses proper RESOURCE_MIME_TYPE ("text/html;profile=mcp-app")

Infrastructure

  • Enhanced BaseTool with meta property for MCP Apps metadata
  • Updated index.ts to use registerAppResource for UI resources
  • Added StaticMapUIResource to resource registry

Why URL instead of base64?

The devkit successfully uses this approach:

  1. No server-side fetching: Eliminates unnecessary API calls
  2. MCP Apps compatibility: URL can be fetched by client with proper CSP
  3. Better performance: Avoids encoding/decoding overhead
  4. Proven pattern: Working in mcp-devkit-server PR Bump mcp registry version to 2025-10-17 #62

Testing

  • ✅ All 597 tests passing
  • ✅ Updated tests to expect URL text content
  • ✅ Lint and format clean
  • ✅ Pre-commit hooks passing

Host Compatibility

Based on devkit testing:

  • VS Code Insiders - Full MCP Apps support with CSP
  • Claude Code - Full MCP Apps support
  • Goose - Full MCP Apps support with CSP
  • Claude Desktop - CSP not yet implemented (issue #387)

Related

🤖 Generated with Claude Code

mattpodwysocki and others added 7 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>
This PR implements MCP Apps support for static_map_image_tool, enabling
interactive map preview in compatible hosts (VS Code, Claude Code, Goose).

## Changes

- Add @modelcontextprotocol/ext-apps dependency and upgrade SDK to 1.25.3
- Add meta property to BaseTool for MCP Apps metadata (_meta.ui)
- Create StaticMapUIResource serving interactive HTML with MCP Apps SDK
- Refactor StaticMapImageTool to return URL instead of base64 image
- Update index.ts to register UI resources with registerAppResource
- Update all tests to expect URL text content instead of image data

## Benefits

- No server-side image fetching (URL-based approach)
- Interactive visualization in MCP Apps-capable hosts
- CSP configuration for api.mapbox.com domains
- Maintains backward compatibility with MCP-UI pattern
- Consistent with mcp-devkit-server implementation

## Testing

All 597 tests passing ✅

## Related

- Companion to mcp-devkit-server PR #62
- Resolves closed PR #107 properly

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@mattpodwysocki mattpodwysocki requested a review from a team as a code owner February 2, 2026 14:15
mattpodwysocki and others added 3 commits February 2, 2026 11:15
- Add click-to-zoom functionality (toggle fit-to-window vs full size)
- Add hover hint showing zoom instructions at bottom
- Improve layout with dark theme and centered image
- Suggest larger default window size (1200x900)
- Remove fullscreen button (doesn't work in embedded views)
- Add smooth hover effects and transitions

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Resolves merge conflicts in package.json and package-lock.json.
Keeps @modelcontextprotocol/ext-apps dependency from this branch
while incorporating updates from main.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add detailed entry for PR #109 describing:
- Interactive map preview in compatible MCP clients
- StaticMapUIResource implementation
- URL-based approach instead of base64 encoding
- MCP Apps metadata support in BaseTool
- Backward compatibility with MCP-UI

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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