Your MCP YouTube Node Summarizer has been successfully converted into an npm module that can be installed and run via npx.
- Created separate modules:
cli.ts,server.ts, andindex.ts - Moved from ES modules to CommonJS for better npm compatibility
- Added proper TypeScript configuration
- Updated
package.jsonwith:- Binary entry point configuration
- Proper keywords for discoverability
- Repository and homepage URLs (to be updated)
- Dependencies moved to production
- Files array for package inclusion
- Added command-line argument parsing
- Help and version commands
- Default MCP server mode
- User-friendly error messages
- TypeScript compilation to
dist/folder - Source maps and declaration files
- Pre-publish build automation
- Comprehensive test script
- Package validation
- Dry-run publishing test
# Run directly with npx
npx summarai-mcp --help
npx summarai-mcp --version
npx summarai-mcp --mcp # Run as MCP server# Install globally
npm install -g summarai-mcp
# Run commands
summarai-mcp --help
summarai-mcp --mcp# Install locally
npm install summarai-mcp
# Run with npx
npx summarai-mcp --mcpAdd this to your Claude Desktop configuration:
{
"mcpServers": {
"SummarAI": {
"command": "npx",
"args": ["-y", "summarai-mcp", "--mcp"],
"env": {
"API_KEY": "your-api-key-here",
"YOUTUBE_VIDEO_SUMMARY_API_URL": "https://your-api-domain.com/api/youtube/summarize"
}
}
}
}-
Update Repository URLs in
package.json:"repository": { "type": "git", "url": "git+https://github.com/yourusername/summarai-mcp.git" }
-
Login to npm:
npm login
-
Verify Package Name Availability:
npm view summarai-mcp
If the package exists, choose a different name.
# Publish to npm
npm publish
# Test the published package
npx summarai-mcp@latest --helpMCP_Youtube_Node_Summarizer/
├── src/
│ ├── cli.ts # Command-line interface
│ ├── server.ts # MCP server implementation
│ └── index.ts # Main entry point
├── dist/ # Compiled JavaScript files
├── scripts/
│ └── test-package.js # Package testing script
├── package.json # NPM package configuration
├── tsconfig.json # TypeScript configuration
├── README.md # Updated documentation
├── PUBLISHING.md # Publishing guide
└── .npmignore # Files to exclude from npm
- ✅ NPX compatibility
- ✅ Global installation support
- ✅ Command-line help and version
- ✅ Proper error handling
- ✅ TypeScript compilation
- ✅ Package validation
- ✅ Publishing preparation
- ✅ Documentation updates
Run the comprehensive test suite:
npm run test:package- Create a GitHub repository for your project
- Update the repository URLs in
package.json - Run
npm loginto authenticate with npm - Run
npm publishto publish your package - Test installation with
npx summarai-mcp --help
Your MCP YouTube Node Summarizer is now ready to be shared with the world! 🌍