We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/artemsvit/Figma-MCP-Pro'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
publish.shβ’1.63 KiB
#!/bin/bash
# NPM Publishing Script for Custom Figma MCP Server
set -e
echo "π Preparing to publish Custom Figma MCP Server to NPM..."
# Check if we're logged in to npm
if ! npm whoami > /dev/null 2>&1; then
echo "β You are not logged in to NPM. Please run 'npm login' first."
exit 1
fi
echo "β NPM login verified"
# Check if git working directory is clean
if [ -n "$(git status --porcelain)" ]; then
echo "β Git working directory is not clean. Please commit or stash your changes."
exit 1
fi
echo "β Git working directory is clean"
# Install dependencies
echo "π¦ Installing dependencies..."
npm ci
# Run tests
echo "π§ͺ Running tests..."
npm test
# Lint code
echo "π Linting code..."
npm run lint
# Type check
echo "π Type checking..."
npm run type-check
# Build the project
echo "π¨ Building project..."
npm run build
# Check if dist directory exists
if [ ! -d "dist" ]; then
echo "β Build failed - dist directory not found"
exit 1
fi
echo "β Build successful"
# Show what will be published
echo "π Files that will be published:"
npm pack --dry-run
# Confirm publication
echo ""
read -p "π€ Do you want to publish to NPM? (y/N): " -n 1 -r
echo ""
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "π€ Publishing to NPM..."
npm publish
echo ""
echo "π Successfully published to NPM!"
echo "π¦ Package: $(npm pkg get name | tr -d '"')"
echo "π·οΈ Version: $(npm pkg get version | tr -d '"')"
echo ""
echo "π Installation command:"
echo "npm install $(npm pkg get name | tr -d '"')"
echo ""
else
echo "β Publication cancelled"
exit 1
fi