Skip to main content
Glama

Peekaboo MCP

by steipete
test-publish.shβ€’3.8 kB
#!/bin/bash # Test publishing script for Peekaboo MCP # This script tests the npm package in a local registry before public release set -e echo "πŸ§ͺ Testing npm package publishing..." echo "" # Save current registry ORIGINAL_REGISTRY=$(npm config get registry) echo "πŸ“¦ Original registry: $ORIGINAL_REGISTRY" # Check if Verdaccio is installed if ! command -v verdaccio &> /dev/null; then echo "❌ Verdaccio not found. Install it with: npm install -g verdaccio" exit 1 fi # Start Verdaccio in background if not already running if ! curl -s http://localhost:4873/ > /dev/null; then echo "πŸš€ Starting Verdaccio local registry..." verdaccio > /tmp/verdaccio.log 2>&1 & VERDACCIO_PID=$! sleep 3 else echo "βœ… Verdaccio already running" fi # Set to local registry echo "πŸ”„ Switching to local registry..." npm set registry http://localhost:4873/ # Create test auth token (Verdaccio accepts any auth on first use) echo "πŸ”‘ Setting up authentication..." TOKEN=$(echo -n "testuser:testpass" | base64) npm set //localhost:4873/:_authToken "$TOKEN" # Build the package echo "πŸ”¨ Building package..." npm run build:all # Publish to local registry echo "πŸ“€ Publishing to local registry..." npm publish --registry http://localhost:4873/ echo "" echo "βœ… Package published to local registry!" echo "" # Test installation in a temporary directory TEMP_DIR=$(mktemp -d) echo "πŸ“₯ Testing installation in: $TEMP_DIR" cd "$TEMP_DIR" # Initialize a test project npm init -y > /dev/null 2>&1 # Install the package echo "πŸ“¦ Installing @steipete/peekaboo-mcp from local registry..." npm install @steipete/peekaboo-mcp --registry http://localhost:4873/ # Check if binary exists if [ -f "node_modules/@steipete/peekaboo-mcp/peekaboo" ]; then echo "βœ… Binary found in package" # Test the binary echo "πŸ§ͺ Testing binary..." if node_modules/@steipete/peekaboo-mcp/peekaboo --version; then echo "βœ… Binary works!" else echo "❌ Binary failed to execute" fi else echo "❌ Binary not found in package!" fi # Test the MCP server echo "" echo "πŸ§ͺ Testing MCP server..." cat > test-mcp.js << 'EOF' const { spawn } = require('child_process'); const server = spawn('npx', ['@steipete/peekaboo-mcp'], { stdio: ['pipe', 'pipe', 'pipe'] }); const request = JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/list" }) + '\n'; server.stdin.write(request); server.stdout.on('data', (data) => { const lines = data.toString().split('\n').filter(l => l.trim()); for (const line of lines) { try { const response = JSON.parse(line); if (response.result && response.result.tools) { console.log('βœ… MCP server responded with tools:', response.result.tools.map(t => t.name).join(', ')); server.kill(); process.exit(0); } } catch (e) { // Ignore non-JSON lines } } }); setTimeout(() => { console.error('❌ Timeout waiting for MCP server response'); server.kill(); process.exit(1); }, 5000); EOF if node test-mcp.js; then echo "βœ… MCP server test passed!" else echo "❌ MCP server test failed" fi # Cleanup cd - > /dev/null rm -rf "$TEMP_DIR" # Restore original registry echo "" echo "πŸ”„ Restoring original registry..." npm set registry "$ORIGINAL_REGISTRY" npm config delete //localhost:4873/:_authToken # Kill Verdaccio if we started it if [ ! -z "$VERDACCIO_PID" ]; then echo "πŸ›‘ Stopping Verdaccio..." kill $VERDACCIO_PID 2>/dev/null || true fi echo "" echo "✨ Test publish complete!" echo "" echo "πŸ“‹ Next steps:" echo "1. If all tests passed, you can publish to npm with: npm publish" echo "2. Remember to tag appropriately if beta: npm publish --tag beta" echo "3. Create a GitHub release after publishing"

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/steipete/Peekaboo'

If you have feedback or need assistance with the MCP directory API, please join our Discord server