PUBLISHING.md•4.1 kB
# NPM Publishing Guide for 3GPP Charging MCP Server
## 🚀 Publishing to NPM
### Prerequisites
1. **NPM Account**: Create account at https://www.npmjs.com/
2. **NPM Login**: Log in to NPM registry
```bash
npm login
```
3. **Package Name Availability**: Verify the name is available
```bash
npm view 3gpp-mcp-charging
# Should return "npm ERR! 404 Not found" if available
```
### Publishing Steps
#### Step 1: Final Preparation
```bash
# Ensure everything is built and ready
npm run prepublishOnly
# Verify package contents
npm pack --dry-run
```
#### Step 2: Publish to NPM
```bash
# For first-time publishing
npm publish
# For subsequent versions
npm version patch # or minor/major
npm publish
```
#### Step 3: Verify Publication
```bash
# Check if package is available
npm view 3gpp-mcp-charging
# Test installation
npx 3gpp-mcp-charging@latest info
```
## 🔧 Version Management
### Semantic Versioning
- **Patch** (2.0.1): Bug fixes, small improvements
- **Minor** (2.1.0): New features, backwards compatible
- **Major** (3.0.0): Breaking changes
```bash
# Update version and publish
npm version patch && npm publish
npm version minor && npm publish
npm version major && npm publish
```
## 📦 Package Information
- **Package Name**: `3gpp-mcp-charging`
- **Current Version**: `2.0.0`
- **Package Size**: ~64KB compressed, ~303KB unpacked
- **Main Command**: `npx 3gpp-mcp-charging@latest init`
## 🧪 Testing After Publishing
### Test Installation Commands
```bash
# Basic installation
npx 3gpp-mcp-charging@latest init
# Client-specific installations
npx 3gpp-mcp-charging@latest init --client claude
npx 3gpp-mcp-charging@latest init --client vscode
npx 3gpp-mcp-charging@latest init --client cursor
# System information
npx 3gpp-mcp-charging@latest info
```
### Test Scenarios
1. **Fresh System**: Test on clean environment
2. **Multiple Clients**: Test with different AI clients
3. **Different Platforms**: Test on Windows, macOS, Linux
4. **Error Handling**: Test with invalid arguments
## 📝 Post-Publishing Updates
### Update Documentation
After successful publishing, update:
1. **README.md**: Remove "(after NPM publishing)" notes
2. **CLAUDE.md**: Update status to "published"
3. **GitHub README**: Update installation instructions
### Example README updates:
```bash
# Change from:
# After NPM publishing:
npx 3gpp-mcp-charging@latest init
# Local development:
npm run install:cli
# To:
npx 3gpp-mcp-charging@latest init
```
## 🔄 Maintenance and Updates
### Regular Updates
- **Knowledge Base**: Add new charging specifications
- **Dependencies**: Keep CLI dependencies updated
- **Platform Support**: Test new AI client versions
- **Documentation**: Keep examples current
### Release Process
1. Update version in package.json
2. Update CHANGELOG.md
3. Test locally with `npm run install:cli`
4. Publish with `npm publish`
5. Test published version
6. Update documentation
7. Create GitHub release
## 🛠️ Troubleshooting Publishing Issues
### Common Issues
**Authentication Error**
```bash
npm login
# Re-enter credentials
```
**Package Name Taken**
```bash
# Choose different name in package.json
"name": "3gpp-mcp-charging-server"
```
**Version Conflict**
```bash
npm version patch # Increment version
npm publish
```
**Permission Error**
```bash
# Check if you're owner/collaborator
npm owner ls 3gpp-mcp-charging
```
## 🎯 Success Criteria
The package is successfully published when:
- ✅ `npm view 3gpp-mcp-charging` shows package info
- ✅ `npx 3gpp-mcp-charging@latest init` works
- ✅ CLI auto-detects AI clients
- ✅ Installation generates correct configs
- ✅ MCP server starts and functions
- ✅ Test queries return charging guidance
## 📊 Monitoring
After publishing, monitor:
- **Download Statistics**: https://www.npmjs.com/package/3gpp-mcp-charging
- **GitHub Issues**: User feedback and bug reports
- **Usage Analytics**: Popular features and queries
- **Performance**: Response times and resource usage
---
**Ready to publish?** Run `npm publish` and transform the world of 3GPP charging expertise! 🚀