We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ashenud/mcp-mysql-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
publish.shโข1.47 kB
#!/bin/bash
# Publish script for MySQL MCP Server
echo "๐ Publishing MySQL MCP Server..."
# 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 user is logged in to npm
if ! npm whoami > /dev/null 2>&1; then
echo "โ Error: Not logged in to npm. Please run 'npm login' first."
exit 1
fi
# Build the project
echo "๐ฆ Building project..."
npm run build
if [ $? -ne 0 ]; then
echo "โ Error: Build failed. Please fix the errors and try again."
exit 1
fi
# Run tests (if any)
echo "๐งช Running tests..."
npm test
if [ $? -ne 0 ]; then
echo "โ Error: Tests failed. Please fix the errors and try again."
exit 1
fi
# Check if version needs to be updated
echo "๐ Current version: $(npm pkg get version | tr -d '\"')"
read -p "Do you want to update the version? (y/n): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
read -p "Enter new version (patch/minor/major or specific version): " version
npm version $version
fi
# Publish to npm
echo "๐ค Publishing to npm..."
npm publish --access public
if [ $? -eq 0 ]; then
echo "โ Successfully published MySQL MCP Server!"
echo "๐ฆ Package: @ashenud/mcp-mysql-server"
echo "๐ Install with: npm install -g @ashenud/mcp-mysql-server"
else
echo "โ Error: Failed to publish. Please check the errors above."
exit 1
fi