Skip to content

Conversation

@stephaneberle9
Copy link

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

  • Module can be executed with python -m mcp_server_file_manager --debug
  • All dependencies install correctly via pip install -e .
  • Server starts and displays debug output as expected
  • MCPB can build distributable bundle with npx @anthropic-ai/mcpb pack
  • Generated bundle includes Python package and dependencies

🤖 Generated with Claude Code

Co-Authored-By: Claude [email protected]

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