-
Notifications
You must be signed in to change notification settings - Fork 31
Add MCP Apps support for static_map_image_tool #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mattpodwysocki
wants to merge
10
commits into
main
Choose a base branch
from
add-mcp-apps-static-map
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>
- 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
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.
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
@modelcontextprotocol/ext-apps@^1.0.1@modelcontextprotocol/sdkfrom 1.25.2 to 1.25.3Tool Enhancement
StaticMapImageToolto return URL directly instead of fetching and base64-encodingmetaproperty withresourceUriand CSP configurationcreateUIResource()MCP Apps Support
StaticMapUIResourceserving interactive HTMLapi.mapbox.comdomainsRESOURCE_MIME_TYPE("text/html;profile=mcp-app")Infrastructure
BaseToolwithmetaproperty for MCP Apps metadataindex.tsto useregisterAppResourcefor UI resourcesStaticMapUIResourceto resource registryWhy URL instead of base64?
The devkit successfully uses this approach:
Testing
Host Compatibility
Based on devkit testing:
Related
🤖 Generated with Claude Code