PUBLISHING_GUIDE.md•5.82 kB
# 📦 Publishing Guide for Cyber Sentinel MCP
This guide provides detailed instructions for publishing Cyber Sentinel MCP to various platforms and marketplaces.
## 🎯 Publishing Targets
1. **PyPI** - Python Package Index
2. **MCP Marketplace** - Cline's MCP Server Marketplace
3. **GitHub Releases** - GitHub release pages
4. **Docker Hub** - Container registry
## 📋 Pre-Publishing Checklist
### 1. Code Quality & Testing
```bash
# Run comprehensive checks
python scripts/check_release_ready.py
# Manual verification
python -m pytest tests/ -v --cov=cyber_sentinel
black --check src/ tests/
isort --check-only src/ tests/
mypy src/
```
### 2. Documentation Updates
- [ ] Update version in `pyproject.toml`
- [ ] Update `CHANGELOG.md` with new version
- [ ] Verify README.md is current
- [ ] Check all links work
- [ ] Update API documentation if needed
### 3. Security Review
- [ ] No hardcoded secrets or API keys
- [ ] All dependencies are up-to-date
- [ ] Security scan passes: `bandit -r src/`
- [ ] Environment variables properly documented
## 🐍 Publishing to PyPI
### Prerequisites
```bash
# Install publishing tools
pip install build twine
# Configure PyPI credentials (one-time setup)
# Option 1: Use API token (recommended)
# Create ~/.pypirc with your API token
# Option 2: Use username/password
twine configure
```
### Automated Release (Recommended)
```bash
# Use the release script
python scripts/release.py 0.1.1
# For test PyPI first
python scripts/release.py 0.1.1 --test
```
### Manual Release Steps
```bash
# 1. Clean previous builds
rm -rf dist/ build/ *.egg-info/
# 2. Build package
python -m build
# 3. Check package
twine check dist/*
# 4. Upload to Test PyPI (optional)
twine upload --repository testpypi dist/*
# 5. Test installation from Test PyPI
pip install --index-url https://test.pypi.org/simple/ cyber-sentinel-mcp
# 6. Upload to PyPI
twine upload dist/*
```
## 🏪 Publishing to MCP Marketplace
### 1. Fork the MCP Marketplace Repository
```bash
# Fork https://github.com/cline/mcp-marketplace
git clone https://github.com/YOUR_USERNAME/mcp-marketplace.git
cd mcp-marketplace
```
### 2. Add Your Server
Create a new file: `servers/cyber-sentinel-mcp.json`
```json
{
"name": "cyber-sentinel-mcp",
"displayName": "Cyber Sentinel",
"description": "Comprehensive threat intelligence aggregation MCP server",
"author": {
"name": "Zeng Junxiang",
"email": "jx888jx888@gmail.com",
"url": "https://github.com/jx888-max"
},
"repository": {
"type": "git",
"url": "https://github.com/jx888-max/cyber-sentinel-mcp.git"
},
"license": "MIT",
"version": "0.1.0",
"categories": ["security", "analysis", "intelligence"],
"keywords": ["threat-intelligence", "cybersecurity", "osint", "security-analysis"],
"installation": {
"type": "pip",
"package": "cyber-sentinel-mcp",
"command": "python -m cyber_sentinel.server"
},
"configuration": {
"required": ["VIRUSTOTAL_API_KEY", "ABUSEIPDB_API_KEY"],
"optional": ["SHODAN_API_KEY", "URLHAUS_API_KEY"]
},
"capabilities": [
"Multi-source threat intelligence aggregation",
"IP, domain, hash, and URL analysis",
"Code security analysis",
"Dependency vulnerability scanning",
"Docker and Kubernetes security analysis"
]
}
```
### 3. Submit Pull Request
```bash
# Create feature branch
git checkout -b add-cyber-sentinel-mcp
# Add your server file
git add servers/cyber-sentinel-mcp.json
git commit -m "Add Cyber Sentinel MCP server"
# Push and create PR
git push origin add-cyber-sentinel-mcp
```
## 🏷️ GitHub Releases
### Automated with Release Script
The release script automatically creates GitHub releases:
```bash
python scripts/release.py 0.1.1
```
### Manual GitHub Release
1. Go to https://github.com/jx888-max/cyber-sentinel-mcp/releases
2. Click "Create a new release"
3. Tag: `v0.1.1`
4. Title: `Cyber Sentinel MCP v0.1.1`
5. Description: Copy from CHANGELOG.md
6. Attach built packages from `dist/`
## 🐳 Docker Hub Publishing
### Build and Push
```bash
# Build image
docker build -t jx888max/cyber-sentinel-mcp:0.1.1 .
docker build -t jx888max/cyber-sentinel-mcp:latest .
# Login to Docker Hub
docker login
# Push images
docker push jx888max/cyber-sentinel-mcp:0.1.1
docker push jx888max/cyber-sentinel-mcp:latest
```
### Automated with GitHub Actions
Create `.github/workflows/docker.yml` for automated Docker builds.
## 🔄 Post-Publishing Tasks
### 1. Verify Installations
```bash
# Test PyPI installation
pip install cyber-sentinel-mcp
# Test Docker image
docker run jx888max/cyber-sentinel-mcp:latest
# Test MCP integration
# Configure in Claude Desktop and test
```
### 2. Update Documentation
- [ ] Update installation instructions
- [ ] Add version badges to README
- [ ] Update examples if needed
- [ ] Announce on social media/forums
### 3. Monitor and Support
- [ ] Monitor GitHub issues
- [ ] Respond to user questions
- [ ] Track download statistics
- [ ] Plan next release
## 🚨 Troubleshooting
### Common Issues
**PyPI Upload Fails**
- Check package name availability
- Verify credentials
- Ensure version number is incremented
**MCP Marketplace PR Rejected**
- Follow submission guidelines
- Ensure JSON format is valid
- Provide complete metadata
**Docker Build Fails**
- Check Dockerfile syntax
- Verify base image availability
- Test locally first
### Getting Help
- GitHub Issues: https://github.com/jx888-max/cyber-sentinel-mcp/issues
- Email: jx888jx888@gmail.com
- MCP Community: https://github.com/modelcontextprotocol/servers
## 📊 Success Metrics
Track these metrics after publishing:
- PyPI download counts
- GitHub stars and forks
- MCP Marketplace adoption
- User feedback and issues
- Community contributions
---
**Happy Publishing! 🚀**