#!/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
MCP directory API
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