We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/vivek100/supaMCPBuilder'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
publish.shβ’3.06 KiB
#!/bin/bash
# SupaMCPBuilder Publishing Script
echo "π SupaMCPBuilder Publishing Script"
echo "====================================="
# Check if we're in the right directory
if [ ! -f "package.json" ]; then
echo "β Error: package.json not found. Please run this script from the project root."
exit 1
fi
# Check if git is initialized
if [ ! -d ".git" ]; then
echo "β Error: Git repository not initialized."
exit 1
fi
# Build the project
echo "π¦ Building project..."
npm run build
if [ $? -ne 0 ]; then
echo "β Build failed!"
exit 1
fi
# Check if there are uncommitted changes
if [ -n "$(git status --porcelain)" ]; then
echo "β οΈ You have uncommitted changes:"
git status --short
read -p "Do you want to commit these changes? (y/N): " commit
if [ "$commit" = "y" ] || [ "$commit" = "Y" ]; then
read -p "Enter commit message: " message
git add .
git commit -m "$message"
else
echo "β Please commit your changes before publishing."
exit 1
fi
fi
# Check if GitHub repository exists
echo "π Checking GitHub repository..."
if ! git remote get-url origin >/dev/null 2>&1; then
echo "β No GitHub remote found. Please create the repository first:"
echo " 1. Go to https://github.com/new"
echo " 2. Create repository 'supaMCPBuilder'"
echo " 3. Run: git remote add origin https://github.com/vivek100/supaMCPBuilder.git"
exit 1
fi
# Push to GitHub
echo "π€ Pushing to GitHub..."
git push origin main
if [ $? -ne 0 ]; then
echo "β Failed to push to GitHub!"
exit 1
fi
# Test package locally
echo "π§ͺ Testing package locally..."
npm pack
if [ $? -ne 0 ]; then
echo "β npm pack failed!"
exit 1
fi
# Check if logged into npm
echo "π Checking npm login..."
npmUser=$(npm whoami 2>/dev/null)
if [ -z "$npmUser" ]; then
echo "β Not logged into npm. Please run 'npm login' first."
exit 1
fi
echo "β Logged in as: $npmUser"
# Final confirmation
echo ""
echo "π Pre-publish checklist:"
echo " β Project built successfully"
echo " β All changes committed"
echo " β Pushed to GitHub"
echo " β Package tested locally"
echo " β Logged into npm as $npmUser"
echo ""
read -p "Ready to publish to npm? This action cannot be undone! (y/N): " publish
if [ "$publish" = "y" ] || [ "$publish" = "Y" ]; then
echo "π Publishing to npm..."
npm publish
if [ $? -eq 0 ]; then
echo ""
echo "π Successfully published supamcpbuilder to npm!"
echo ""
echo "π Next steps:"
echo " β’ Test installation: npm install -g supamcpbuilder"
echo " β’ Test with npx: npx supamcpbuilder --help"
echo " β’ Update your MCP config to use: npx supamcpbuilder"
echo ""
echo "π Package URL: https://www.npmjs.com/package/supamcpbuilder"
else
echo "β Publishing failed!"
exit 1
fi
else
echo "π¦ Publish cancelled. The package is ready when you are!"
echo " Run 'npm publish' manually when ready."
fi
# Clean up
rm -f *.tgz
echo "β¨ Done!"