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.13 kB
#!/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!"