#!/bin/bash
# Context-Pods Meta-MCP Server Status Check
# Checks the status of all server components
echo "๐ Context-Pods Meta-MCP Server Status Check"
echo "=============================================="
# Get script directory
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
cd "$PROJECT_ROOT"
# Check Node.js
echo ""
echo "๐ข Node.js Environment:"
if command -v node &> /dev/null; then
NODE_VERSION=$(node -v)
echo " โ Node.js version: $NODE_VERSION"
NODE_MAJOR=$(echo $NODE_VERSION | cut -d'v' -f2 | cut -d'.' -f1)
if [ "$NODE_MAJOR" -ge 18 ]; then
echo " โ Version requirement met (18+)"
else
echo " โ Version requirement NOT met (need 18+)"
fi
else
echo " โ Node.js not found"
fi
# Check npm
if command -v npm &> /dev/null; then
NPM_VERSION=$(npm -v)
echo " โ npm version: $NPM_VERSION"
else
echo " โ npm not found"
fi
# Check dependencies
echo ""
echo "๐ฆ Dependencies:"
if [ -d "node_modules" ]; then
echo " โ node_modules directory exists"
# Check specific dependencies
if [ -d "node_modules/@modelcontextprotocol" ]; then
echo " โ @modelcontextprotocol/sdk installed"
else
echo " โ @modelcontextprotocol/sdk missing"
fi
if [ -d "packages/core/node_modules" ] || [ -d "node_modules/@context-pods/core" ]; then
echo " โ @context-pods/core available"
else
echo " โ @context-pods/core missing"
fi
else
echo " โ node_modules directory missing - run 'npm install'"
fi
# Check build status
echo ""
echo "๐จ Build Status:"
if [ -f "packages/server/dist/index.js" ]; then
echo " โ Server package built"
# Check if build is recent
BUILD_TIME=$(stat -f "%m" packages/server/dist/index.js 2>/dev/null || stat -c "%Y" packages/server/dist/index.js 2>/dev/null)
CURRENT_TIME=$(date +%s)
TIME_DIFF=$((CURRENT_TIME - BUILD_TIME))
if [ "$TIME_DIFF" -lt 3600 ]; then
echo " โ Build is recent (less than 1 hour old)"
else
echo " โ ๏ธ Build is older than 1 hour - consider rebuilding"
fi
else
echo " โ Server package not built - run 'npm run build'"
fi
if [ -f "packages/core/dist/index.js" ]; then
echo " โ Core package built"
else
echo " โ Core package not built - run 'npm run build'"
fi
# Check TypeScript configuration
echo ""
echo "๐ TypeScript Configuration:"
if [ -f "tsconfig.json" ]; then
echo " โ Root tsconfig.json exists"
else
echo " โ Root tsconfig.json missing"
fi
if [ -f "packages/server/tsconfig.json" ]; then
echo " โ Server tsconfig.json exists"
else
echo " โ Server tsconfig.json missing"
fi
# Check templates
echo ""
echo "๐ Templates:"
TEMPLATE_COUNT=$(find templates -name "template.json" 2>/dev/null | wc -l)
echo " โ Found $TEMPLATE_COUNT template(s)"
if [ "$TEMPLATE_COUNT" -gt 0 ]; then
find templates -name "template.json" | while read template; do
TEMPLATE_DIR=$(dirname "$template")
TEMPLATE_NAME=$(basename "$TEMPLATE_DIR")
echo " โข $TEMPLATE_NAME"
done
fi
# Check CLI integration
echo ""
echo "โก CLI Integration:"
if [ -f "packages/cli/dist/index.js" ]; then
echo " โ CLI package built"
else
echo " โ ๏ธ CLI package not built (optional)"
fi
# Check server binary
echo ""
echo "๐ฏ Server Binary:"
if [ -f "packages/server/bin/server.js" ]; then
echo " โ Server binary exists"
if [ -x "packages/server/bin/server.js" ]; then
echo " โ Server binary is executable"
else
echo " โ Server binary is not executable"
fi
else
echo " โ Server binary missing"
fi
# Summary
echo ""
echo "๐ Summary:"
echo "============"
# Count checks
CHECKS_PASSED=0
CHECKS_TOTAL=0
# This is a simplified check - in a real implementation you'd track each check
if command -v node &> /dev/null && [ -d "node_modules" ] && [ -f "packages/server/dist/index.js" ]; then
echo "๐ข Status: READY"
echo " The Meta-MCP Server is ready to run!"
echo ""
echo "Next steps:"
echo " โข Run './scripts/start-server.sh' to start the server"
echo " โข Run './scripts/test-connection.js' to test connectivity"
echo " โข See docs/MCP_CLIENT_SETUP.md for client configuration"
else
echo "๐ด Status: NOT READY"
echo " Some components need attention before the server can run."
echo ""
echo "Recommended actions:"
if ! command -v node &> /dev/null; then
echo " โข Install Node.js 18 or higher"
fi
if [ ! -d "node_modules" ]; then
echo " โข Run 'npm install' to install dependencies"
fi
if [ ! -f "packages/server/dist/index.js" ]; then
echo " โข Run 'npm run build' to build the packages"
fi
fi
echo ""
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/conorluddy/ContextPods'
If you have feedback or need assistance with the MCP directory API, please join our Discord server