Add Python package MCP server example with bundling support #103
+256
−6
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.
Problem Statement
The existing MCPB examples only demonstrate how to create MCP bundles for individual Python modules, but don't show how to properly structure and bundle multi-module Python packages. This leaves a gap for developers wanting to build more complex MCP servers using proper Python package organization with multiple modules, dependencies, and structured code separation.
Solution
This contribution closes that gap by providing a complete Python package example based on the file manager server. The example demonstrates proper package structuring with module invocation instead of direct script execution, along with an adapted MCPB manifest that supports building distributable bundles for Python packages.
Key Improvements
The example showcases how to structure a Python package for MCP bundling with proper module organization, dependency management, and MCPB integration. The resulting bundle can be directly installed in Claude Desktop, providing a complete workflow from development to distribution.
Test Plan
python -m mcp_server_file_manager --debugpip install -e .npx @anthropic-ai/mcpb pack🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]