Skip to main content
Glama
build_local.shβ€’2.41 kB
#!/bin/bash # Local build script for MCP Proto Server set -e echo "πŸ”¨ Building MCP Proto Server..." echo "" # Check if Python is available if ! command -v python &> /dev/null && ! command -v python3 &> /dev/null; then echo "❌ Error: Python is not installed" exit 1 fi PYTHON_CMD=$(command -v python3 2>/dev/null || command -v python) echo "βœ“ Using Python: $PYTHON_CMD" # Check Python version PYTHON_VERSION=$($PYTHON_CMD --version 2>&1 | awk '{print $2}') echo "βœ“ Python version: $PYTHON_VERSION" # Install dependencies echo "" echo "πŸ“¦ Installing dependencies..." $PYTHON_CMD -m pip install -q --upgrade pip $PYTHON_CMD -m pip install -q -r requirements.txt # Check if PyInstaller is installed if ! $PYTHON_CMD -c "import PyInstaller" &> /dev/null; then echo "πŸ“¦ Installing PyInstaller..." $PYTHON_CMD -m pip install -q pyinstaller fi # Clean previous builds echo "" echo "🧹 Cleaning previous builds..." rm -rf build/ dist/ # Build with PyInstaller echo "" echo "πŸ”¨ Building executable..." $PYTHON_CMD -m PyInstaller mcp_proto_server.spec # Test the build echo "" echo "βœ… Build complete!" echo "" echo "Testing executable..." if [ -f "dist/mcp-proto-server" ]; then chmod +x dist/mcp-proto-server echo "" ./dist/mcp-proto-server --help echo "" echo "βœ“ Executable works!" echo "" # Create distributable archive echo "πŸ“¦ Creating distributable archive..." cd dist # Detect platform if [[ "$OSTYPE" == "darwin"* ]]; then ARCH=$(uname -m) if [[ "$ARCH" == "x86_64" ]]; then PLATFORM="macos-amd64" else PLATFORM="macos-arm64" fi cp ../install-macos.sh install.sh else PLATFORM="linux-amd64" cp ../install-linux.sh install.sh fi chmod +x install.sh tar -czf "mcp-proto-server-${PLATFORM}.tar.gz" mcp-proto-server install.sh cd .. echo "" echo "βœ“ Distributable archive created!" echo "" echo "πŸ“ Binary location: $(pwd)/dist/mcp-proto-server" echo "πŸ“¦ Archive location: $(pwd)/dist/mcp-proto-server-${PLATFORM}.tar.gz" echo "" echo "To install using the script:" echo " cd dist && ./install.sh" echo "" echo "To test with examples:" echo " ./dist/mcp-proto-server --root examples/" else echo "❌ Build failed - executable not found" exit 1 fi

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/umuterturk/mcp-proto'

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