We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/boringstudio-org/mcp-gitea-proxy'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
run-google-search.sh•1.02 KiB
#!/bin/bash
# 1. Load keys
SCRIPT_DIR="$(dirname "$0")"
ENV_FILE="$SCRIPT_DIR/google.env"
if [ -f "$ENV_FILE" ]; then
set -a
source "$ENV_FILE"
set +a
echo "Variables from $ENV_FILE loaded." >&2
else
echo "Error: File $ENV_FILE not found." >&2
exit 1
fi
# 2. Variable mapping (package expects API_KEY and ENGINE_ID)
# Ensure your .env file has exactly these names or map them:
export API_KEY="${GOOGLE_API_KEY}"
export ENGINE_ID="${GOOGLE_SEARCH_ENGINE_ID}"
# 3. Check keys
if [ -z "$API_KEY" ] || [ -z "$ENGINE_ID" ]; then
echo "Error: API_KEY or ENGINE_ID not set in $ENV_FILE" >&2
exit 1
fi
# 4. Run via uvx (using stable Python package)
echo "Starting Google Search MCP server via uvx..." >&2
# Try to find uvx in PATH or fallback to standard location
if command -v uvx &> /dev/null; then
UVX_CMD="uvx"
elif [ -f "$HOME/.local/bin/uvx" ]; then
UVX_CMD="$HOME/.local/bin/uvx"
else
echo "Error: uvx not found. Please install uv or add it to PATH." >&2
exit 1
fi
exec "$UVX_CMD" mcp-google-cse