Add explicit subpath exports for tools, resources, prompts, and utils #66
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 explicit, well-documented subpath exports to allow users to import specific Mapbox MCP Devkit components without the full server. This follows the same pattern established in the main mcp-server package.
Motivation
Users may want to:
Solution
Explicit subpath exports via tshy:
@mapbox/mcp-devkit-server/tools- 25 devkit tool classes and pre-configured instances@mapbox/mcp-devkit-server/resources- 8 resource classes and instances (including UI resources)@mapbox/mcp-devkit-server/prompts- 7 prompt classes and instances@mapbox/mcp-devkit-server/utils- HTTP pipeline utilitiesAll exports support both ESM and CommonJS automatically via tshy dual builds.
Usage Examples
Simple: Pre-configured instances
Advanced: Custom HTTP pipeline
Expert: Full customization
Changes
New Files
src/tools/index.ts(7.7KB) - Barrel export for all 25 devkit toolssrc/resources/index.ts(3.7KB) - Barrel export for all 8 resourcessrc/prompts/index.ts(2.9KB) - Barrel export for all 7 promptssrc/utils/index.ts(1.5KB) - Barrel export for HTTP utilitiesUpdated Files
package.json- Added tshy exports configurationBenefits
listStylesinstead oflistStylesTool)Compatibility
Testing
Related
Similar to the implementation in mapbox/mcp-server#111