-
Install Node.js (version 18 or higher)
- Download from https://nodejs.org/
- Verify installation:
node --versionandnpm --version
-
Create npm account (if you don't have one)
- Go to https://www.npmjs.com/
- Sign up for an account
- Verify your email address
# Navigate to the project directory
cd "C:\Users\Administrator\Work\MCP_Youtube_Node_Summarizer"
# Install dependencies
npm install
# Install global dependencies for development
npm install -g tsx typescript# Compile TypeScript to JavaScript
npm run buildThis creates the dist/ folder with compiled JavaScript files.
# Test the MCP server
node test/test-server.jsYou should see output indicating the server starts correctly and tools are registered.
If you want to test with Claude locally before publishing:
- Create a test configuration file
test-config.json:
{
"mcpServers": {
"SummarAI": {
"command": "node",
"args": ["C:\\Users\\Administrator\\Work\\MCP_Youtube_Node_Summarizer\\dist\\index.js"],
"env": {
"API_KEY": "your-actual-api-key",
"YOUTUBE_VIDEO_SUMMARY_API_URL": "http://localhost:8000/api/youtube/summarize"
}
}
}
}# Edit package.json and update:
# - "author": "Your Name <your.email@example.com>"
# - "repository": "https://github.com/yourusername/summarai-mcp"
# - "homepage": "https://github.com/yourusername/summarai-mcp"
# - "bugs": "https://github.com/yourusername/summarai-mcp/issues"# Check what will be published
npm pack --dry-run# Login to your npm account
npm loginEnter your npm username, password, and email when prompted.
# Publish the package
npm publishIf the name summarai-mcp is taken, you might need to:
- Change the name in
package.jsonto something like@yourusername/summarai-mcp - Or choose a different unique name
# Check if your package is available
npm view summarai-mcp# Test installing your published package
npx summarai-mcp@1.0.0Now you can use your published package in Claude:
{
"mcpServers": {
"SummarAI": {
"command": "npx",
"args": ["-y", "summarai-mcp@1.0.0"],
"env": {
"API_KEY": "your-actual-api-key",
"YOUTUBE_VIDEO_SUMMARY_API_URL": "https://your-domain.com/api/youtube/summarize"
}
}
}
}-
Build fails: Check if TypeScript is installed globally:
npm install -g typescript -
Permission errors: On Windows, you might need to run Command Prompt as Administrator
-
Package name already exists: Change the name in package.json to something unique
-
npm login fails: Make sure you've verified your email address on npmjs.com
-
API key issues: Ensure your API key is valid and has the necessary permissions
To publish updates:
# Update version number
npm version patch # for bug fixes
npm version minor # for new features
npm version major # for breaking changes
# Rebuild and publish
npm run build
npm publish- Never commit your actual API keys to version control
- Use environment variables for sensitive configuration
- Consider using scoped packages (@yourname/package-name) for better namespace management
- Create a GitHub repository for your project
- Add proper documentation and examples
- Set up automated testing and CI/CD
- Consider adding more features like batch processing or different output formats