Skip to main content
Glama
build.shโ€ข1.29 kB
#!/bin/bash # Build script for MCP Docs Server set -e echo "๐Ÿ”จ Building MCP Docs Server..." # Clean previous build echo "๐Ÿงน Cleaning previous build..." rm -rf build/ rm -rf dist/ # Install dependencies if needed if [ ! -d "node_modules" ]; then echo "๐Ÿ“ฆ Installing dependencies..." npm install fi # Build TypeScript echo "๐Ÿ“ Compiling TypeScript..." npm run build # Verify build if [ ! -f "build/index.js" ]; then echo "โŒ Build failed - index.js not found" exit 1 fi echo "โœ… Build verification passed" # Make build executable chmod +x build/index.js # Run quick test echo "๐Ÿงช Running quick test..." if node test-server.js; then echo "โœ… Server test passed" else echo "โš ๏ธ Server test had issues but build completed" fi # Check bundle size BUILD_SIZE=$(du -sh build/ | cut -f1) echo "๐Ÿ“Š Build size: $BUILD_SIZE" # Count files FILE_COUNT=$(find build/ -name "*.js" | wc -l | tr -d ' ') echo "๐Ÿ“ Generated files: $FILE_COUNT JavaScript files" echo "" echo "๐ŸŽ‰ Build completed successfully!" echo "" echo "๐Ÿ“‹ Next steps:" echo "- Test with: npx @modelcontextprotocol/inspector node build/index.js" echo "- Package with: npm pack" echo "- Install globally: npm install -g ." echo "- Deploy with: docker build -t mcp-docs-server ."

Latest Blog Posts

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/glassBead-tc/mcp-docs-server'

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