npm-publishing.md•6.89 kB
# Specification: NPM Publishing & Automation for Tempo Filler MCP Server
## Overview
Transform the Tempo Filler MCP Server into a professionally published NPM package with automated release workflows, enabling easy installation and distribution while maintaining high quality standards.
## Objectives
### Primary Goals
- **NPM Package Publication**: Publish as `@tranzact/tempo-filler-mcp-server` on public NPM registry
- **Automated Release Pipeline**: Implement GitHub Actions workflow for seamless publishing
- **Professional Package Standards**: Achieve production-ready package quality and metadata
- **User Experience**: Enable instant usage via `npx @tranzact/tempo-filler-mcp-server` without installation
### Success Criteria
- Package successfully executable via `npx @tranzact/tempo-filler-mcp-server`
- Zero-friction automated publishing triggered by GitHub releases
- Package follows NPM and MCP ecosystem best practices
- Clear documentation enables users to configure and run within 5 minutes
## Requirements
### 1. Package Configuration & Metadata
#### Must Have
- **Scoped Package Name**: `@tranzact/tempo-filler-mcp-server`
- **Public Access**: Publicly accessible via NPM registry
- **NPX Compatibility**: Executable via `npx @tranzact/tempo-filler-mcp-server`
- **Semantic Versioning**: Proper semver compliance with automated version management
- **Complete Package Metadata**: Description, keywords, author, license, repository links
- **TypeScript Support**: Include compiled JavaScript with TypeScript definition files
- **Executable Binary**: Properly configured binary entry point for npx execution
- **Engine Requirements**: Specify minimum Node.js version compatibility
- **File Optimization**: Only include necessary files in published package
- **Shebang Header**: Proper Node.js shebang for cross-platform execution
#### Should Have
- **NPM Provenance**: Package provenance for supply chain security
- **Keywords Optimization**: MCP, tempo, time-tracking, AI-related keywords for discoverability
- **Comprehensive Documentation**: Links to GitHub repository and issue tracker
#### Must Not Include
- Source TypeScript files (only compiled output)
- Development dependencies in production bundle
- Test files or development tooling
- Sensitive configuration or environment files
### 2. GitHub Actions Automation
#### Must Have
- **Release-Triggered Publishing**: Automatic NPM publish on GitHub release creation
- **Quality Gates**: Build, test, and lint validation before publishing
- **Security**: Secure token management using GitHub repository secrets
- **Cross-Platform Compatibility**: Ensure package works across major operating systems
- **Failure Handling**: Clear error reporting and workflow failure notifications
#### Should Have
- **Version Validation**: Verify version consistency between package.json and release tag
- **Pre-publish Checks**: Security audit and dependency vulnerability scanning
- **Multiple Node.js Versions**: Test compatibility across supported Node.js versions
- **Release Notes**: Automated changelog generation or release note validation
#### Nice to Have
- **Dry Run Capability**: Test publishing process without actual NPM publication
- **Rollback Mechanism**: Process for handling failed or problematic releases
### 3. Documentation & User Experience
#### Must Have
- **NPX Usage Instructions**: Clear `npx @tranzact/tempo-filler-mcp-server` usage examples in README
- **Configuration Guide**: How to configure MCP clients to use the npx command
- **Usage Examples**: Common MCP client configurations and command-line patterns
- **Troubleshooting Section**: Common issues and solutions for npx execution
#### Should Have
- **Alternative Installation Options**: Documentation for both npx usage and local installation
- **Version Compatibility**: Clear Node.js and dependency requirements
- **Performance Recommendations**: Best practices for production usage with npx
- **MCP Client Integration**: Specific examples for popular MCP clients (Claude Desktop, etc.)
### 4. Quality & Compliance Standards
#### Must Have
- **MCP Protocol Compliance**: Adherence to Model Context Protocol specifications
- **Security Standards**: No hardcoded secrets, proper input validation
- **Dependency Management**: Secure, up-to-date, and minimal dependency tree
- **Error Handling**: Graceful error handling and informative error messages
#### Should Have
- **Performance Optimization**: Efficient startup time and memory usage
- **Logging Standards**: Appropriate logging levels and structured output
- **Configuration Validation**: Validate user configuration at startup
## Quality Gates
### Pre-Publication Requirements
1. **Build Success**: TypeScript compilation without errors
2. **Test Coverage**: All tests passing with adequate coverage
3. **Code Quality**: Linting and formatting standards met
4. **Security**: No known vulnerabilities in dependencies
5. **Documentation**: README accurately reflects current functionality
### Post-Publication Validation
1. **NPX Execution Test**: Package runs successfully via `npx @tranzact/tempo-filler-mcp-server`
2. **Functionality Test**: Basic MCP server functionality works after npx execution
3. **Documentation Accuracy**: NPX usage instructions work as documented
4. **Cross-Platform Test**: NPX execution works on Windows, macOS, and Linux
## Scope Boundaries
### In Scope
- NPM package configuration and optimization for npx usage
- GitHub Actions workflow for automated publishing
- Documentation updates for npx-based usage patterns
- Quality assurance automation for executable packages
- Security best practices implementation
- Cross-platform npx execution compatibility
### Out of Scope
- Changes to core MCP server functionality
- New feature development
- UI/UX improvements beyond command-line execution experience
- Alternative package managers (Yarn, PNPM) specific optimizations
- Private registry publishing
- Multi-package monorepo setup
- Global npm installation patterns
## Success Metrics
### Technical Metrics
- Package execution success rate via npx > 99%
- Startup time via npx < 10 seconds on standard systems
- Zero critical security vulnerabilities
- Build and publish workflow completion < 5 minutes
### User Experience Metrics
- Complete setup time from npx execution to working MCP server < 2 minutes
- Clear error messages for common configuration issues
- Documentation completeness score based on user feedback
## Dependencies & Prerequisites
### Required Before Implementation
- NPM organization account for `@tranzact` scope
- GitHub repository secrets configured for NPM publishing
- Node.js version compatibility testing across target versions
### External Dependencies
- GitHub Actions service availability
- NPM registry service availability
- Existing MCP client applications for testing