# š¦ MCPB Packaging Documentation
**Complete guide to packaging and distributing MCP servers with MCPB**
---
## š **Documentation Index**
### **1. MCPB Building Guide** ā **PRIMARY REFERENCE**
š [MCPB_BUILDING_GUIDE.md](MCPB_BUILDING_GUIDE.md)
**Complete 1,900+ line comprehensive guide**
**What it covers**:
- ā
MCPB vs DXT migration (complete transition guide)
- ā
Manifest configuration (detailed examples)
- ā
Build process (step-by-step)
- ā
GitHub Actions CI/CD (automated workflows)
- ā
Troubleshooting (common issues and solutions)
- ā
User configuration (3 types of user prompts)
- ā
Package signing (security)
- ā
Registry publishing (distribution)
- ā
Production patterns (real-world examples)
**Read Time**: 2-3 hours
**Difficulty**: Intermediate to Advanced
**Priority**: **CRITICAL** for distribution
---
### **2. MCPB Implementation Summary**
š [MCPB_IMPLEMENTATION_SUMMARY.md](MCPB_IMPLEMENTATION_SUMMARY.md)
**Our implementation status and results**
**What it covers**:
- ā
Implementation overview
- ā
Package details (0.19 MB)
- ā
Configuration files (mcpb.json, manifest.json)
- ā
Build process
- ā
GitHub Actions workflow
- ā
Tool inventory (26 tools)
- ā
Next steps
**Read Time**: 15 minutes
**Status**: ā
**COMPLETED** implementation
**Package**: dist/notepadpp-mcp.mcpb (ready!)
---
## šÆ **What is MCPB?**
**MCPB** (MCP Bundle) - Anthropic's official packaging format for MCP servers
**Key Benefits**:
- šÆ **One-click installation** - Drag & drop to Claude Desktop
- š **Security** - Cryptographically signed packages
- āļø **User configuration** - Interactive setup prompts
- š¦ **Bundled dependencies** - Everything included
- š **Automated distribution** - GitHub Actions integration
---
## š¦ **Our MCPB Package**
### **Package Details**
| Property | Value |
|----------|-------|
| **Name** | notepadpp-mcp.mcpb |
| **Version** | 1.2.0 |
| **Size** | 0.19 MB |
| **Tools** | 26 |
| **Status** | ā
Production Ready |
| **Location** | `dist/notepadpp-mcp.mcpb` |
### **User Configuration**
When users install our MCPB package, they're prompted for:
1. **Notepad++ Executable Path** (file picker)
- Default: `C:\Program Files\Notepad++\notepad++.exe`
- Auto-detection if left empty
2. **Auto-start Notepad++** (boolean)
- Default: `true`
- Automatically starts Notepad++ if not running
3. **Operation Timeout** (string)
- Default: `30` seconds
- Timeout for Notepad++ operations
---
## šļø **Build Process**
### **Quick Build**
```powershell
# Build MCPB package (development)
.\scripts\build-mcpb-package.ps1 -NoSign
# Output: dist/notepadpp-mcp.mcpb (0.19 MB)
```
### **Build Script Features**
ā
Prerequisites check (MCPB CLI, Python)
ā
Manifest validation
ā
Output management
ā
Package verification
ā
Signing support (optional)
ā
Color-coded progress
---
## š **Distribution Methods**
### **Method 1: Direct Distribution**
1. Build MCPB package
2. Share `.mcpb` file
3. User drags to Claude Desktop
4. User configures settings
5. Done!
**Use Case**: Direct sharing, beta testing
---
### **Method 2: GitHub Releases**
1. Tag version: `git tag v1.2.0`
2. Push tag: `git push origin v1.2.0`
3. GitHub Actions builds automatically
4. Release created with `.mcpb` file
5. Users download from releases
**Use Case**: Public distribution, version management
**Status**: ā
Configured and ready!
---
### **Method 3: MCPB Registry** (Future)
1. Build package
2. Sign with key
3. Publish to registry
4. Available in Claude Desktop marketplace
**Use Case**: Official distribution channel
**Status**: š
Planned (registry not yet available)
---
## š **Configuration Files**
### **mcpb.json** (Build Configuration)
**Purpose**: Controls how MCPB CLI builds your package
**Location**: Project root
**Format**: JSON
**Key Sections**:
```json
{
"name": "notepadpp-mcp",
"version": "1.2.0",
"mcp": {
"version": "2.12.0",
"capabilities": { "tools": true }
},
"dependencies": {
"python": ">=3.10.0",
"fastmcp": ">=2.12.0"
}
}
```
---
### **manifest.json** (Runtime Configuration)
**Purpose**: Tells Claude Desktop how to run your server
**Location**: Project root
**Format**: JSON
**Key Sections**:
```json
{
"manifest_version": "0.2",
"name": "notepadpp-mcp",
"version": "1.2.0",
"server": {
"type": "python",
"entry_point": "src/notepadpp_mcp/tools/server.py",
"mcp_config": {
"command": "python",
"args": ["-m", "notepadpp_mcp.tools.server"],
"env": {
"PYTHONPATH": "${PWD}",
"NOTEPADPP_PATH": "${user_config.notepadpp_path}"
}
}
},
"user_config": {
"notepadpp_path": { "type": "file", "title": "..." }
},
"tools": [ /* 26 tools listed */ ]
}
```
---
## š **Troubleshooting**
### **Build Failures**
**Common Issues**:
- MCPB CLI not installed ā `npm install -g @anthropic-ai/mcpb`
- Manifest validation fails ā Check JSON syntax
- Python path issues ā Verify `PYTHONPATH` in manifest
**Solution**: See [MCPB Building Guide](MCPB_BUILDING_GUIDE.md) - Troubleshooting section
---
### **Installation Failures**
**Common Issues**:
- Package won't install in Claude Desktop
- Configuration prompts don't appear
- Server fails to start
**Solution**: See [MCPB Building Guide](MCPB_BUILDING_GUIDE.md) - Path bugs section
---
### **FastMCP Issues**
**Common Issues**:
- Version < 2.12.0 (incompatible)
- Tool registration errors
- stdio protocol violations
**Solution**: See [FastMCP Troubleshooting](TROUBLESHOOTING_FASTMCP_2.12.md)
---
## š ļø **Build Scripts**
### **PowerShell Build Script**
**Location**: `scripts/build-mcpb-package.ps1`
**Features**:
- Automated validation
- Package building
- Integrity verification
- Optional signing
- Detailed output
**Usage**:
```powershell
# Standard build
.\scripts\build-mcpb-package.ps1 -NoSign
# With signing (when configured)
.\scripts\build-mcpb-package.ps1
# Custom output
.\scripts\build-mcpb-package.ps1 -OutputDir "E:\builds"
```
---
### **GitHub Actions Workflow**
**Location**: `.github/workflows/build-mcpb.yml`
**Triggers**:
- Tag push (`v*`)
- Manual dispatch
**Steps**:
1. Setup Python & Node.js
2. Install MCPB CLI
3. Validate manifest
4. Build MCPB package
5. Upload artifact
6. Create GitHub release
7. Publish to PyPI
**Status**: ā
Configured and tested
---
## š **Package Contents**
### **What's Inside the MCPB Package**
```
notepadpp-mcp.mcpb (0.19 MB)
āāā manifest.json # Runtime configuration
āāā requirements.txt # Python dependencies
āāā src/ # Source code
ā āāā notepadpp_mcp/
ā āāā __init__.py
ā āāā tools/
ā ā āāā server.py # Main server (2,424 lines)
ā āāā docs/ # Documentation
ā āāā tests/ # Test suite
āāā lib/ # Bundled dependencies
āāā fastmcp/ # FastMCP framework
āāā pywin32/ # Windows API
āāā psutil/ # System utilities
āāā requests/ # HTTP library
```
---
## šÆ **Best Practices**
### **Before Building**
- [ ] Validate manifest: `mcpb validate manifest.json`
- [ ] Test locally
- [ ] Update version numbers
- [ ] Update CHANGELOG
- [ ] All tests passing
### **During Build**
- [ ] Use build script (consistency)
- [ ] Verify package size (<1 MB ideal)
- [ ] Check for errors
- [ ] Validate output
### **After Building**
- [ ] Test installation in Claude Desktop
- [ ] Verify user configuration prompts
- [ ] Test all 26 tools
- [ ] Check logs for errors
---
## š **Related Documentation**
### **In This Repository**
- [Development Docs](../development/README.md) - Development practices
- [MCP Technical](../mcp-technical/README.md) - MCP specifics
- [Repository Protection](../repository-protection/README.md) - Safety
- [Documentation Index](../DOCUMENTATION_INDEX.md) - All docs
### **External Resources**
- [MCPB Official Docs](https://anthropic.com) - Official MCPB documentation
- [FastMCP](https://github.com/jlowin/fastmcp) - Framework docs
- [MCP Specification](https://modelcontextprotocol.io) - Protocol spec
---
## š **Success Metrics**
**Our MCPB implementation**:
- ā
Package builds successfully (0.19 MB)
- ā
Manifest validates without errors
- ā
All 26 tools registered
- ā
User configuration working
- ā
GitHub Actions automated
- ā
PyPI publishing ready
- ā
Production-ready distribution
**Achievement**: Professional packaging matching industry standards!
---
## š **Getting Help**
### **MCPB Issues**
- **MCPB Guide**: [MCPB_BUILDING_GUIDE.md](MCPB_BUILDING_GUIDE.md)
- **GitHub**: Create issue with `packaging` label
- **Community**: Ask in MCP forums
### **FastMCP Issues**
- **Troubleshooting**: [TROUBLESHOOTING_FASTMCP_2.12.md](TROUBLESHOOTING_FASTMCP_2.12.md)
- **GitHub**: FastMCP repository issues
- **Documentation**: FastMCP official docs
---
*MCPB Packaging Documentation*
*Location: `docs/mcpb-packaging/`*
*Files: 3 (2,500+ lines total!)*
*Focus: Professional distribution*
*Status: Production ready*
**Package your MCP server professionally!** š¦āØ