Skip to main content
Glama

Databricks MCP Server

by moma1992
test_remote_mcp_proxy.shโ€ข3.01 kB
#!/bin/bash # Test remote MCP server using the MCP proxy client echo "๐Ÿงช Testing Remote MCP Server with Proxy" echo "=======================================\n" # Read configuration from .env.local if [ ! -f ".env.local" ]; then echo "โŒ ERROR: .env.local file not found" echo " Please run ./setup.sh to configure the environment" exit 1 fi # Source the environment file source .env.local if [ -z "$DATABRICKS_HOST" ]; then echo "โŒ ERROR: DATABRICKS_HOST not set in .env.local" exit 1 fi if [ -z "$DATABRICKS_APP_NAME" ]; then echo "โŒ ERROR: DATABRICKS_APP_NAME not set in .env.local" exit 1 fi if [ -z "$DATABRICKS_TOKEN" ]; then echo "โŒ ERROR: DATABRICKS_TOKEN not set in .env.local" exit 1 fi echo "Getting app URL from Databricks Apps API..." # Get the app URL dynamically using the Databricks CLI with environment variables export DATABRICKS_HOST export DATABRICKS_TOKEN APP_INFO=$(uvx databricks apps list 2>/dev/null | grep "^${DATABRICKS_APP_NAME}" || true) if [ -z "$APP_INFO" ]; then echo "โŒ ERROR: App '${DATABRICKS_APP_NAME}' not found in Databricks Apps" echo " Please deploy the app first with: ./deploy.sh" exit 1 fi # Extract the URL from the app info (second column in tabular output) REMOTE_URL=$(echo "$APP_INFO" | awk '{print $2}') if [ -z "$REMOTE_URL" ]; then echo "โŒ ERROR: Could not extract app URL from: $APP_INFO" exit 1 fi echo "โœ… Found app URL: $REMOTE_URL" # Run the MCP proxy test echo "Testing MCP proxy connection..." echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list", "params": {}}' | \ timeout 30 uv run python dba_mcp_proxy/mcp_client.py \ --databricks-host "${DATABRICKS_HOST}" \ --databricks-app-url "${REMOTE_URL}" 2>&1 | \ { # Read stderr (connection info) and stdout (response) separately stderr_line="" while IFS= read -r line; do if [[ "$line" == *"Connected to MCP server"* ]]; then stderr_line="$line" elif [[ "$line" == "{"* ]]; then echo "Connection: $stderr_line" echo "" # Parse the JSON response response="$line" if echo "$response" | jq -e '.result.tools' > /dev/null 2>&1; then tool_count=$(echo "$response" | jq '.result.tools | length') echo "โœ… Found $tool_count tools:" echo "$response" | jq -r '.result.tools[] | " - \(.name): \(.description[:60])..."' elif echo "$response" | jq -e '.error' > /dev/null 2>&1; then error_msg=$(echo "$response" | jq -r '.error.message') echo "โŒ Error: $error_msg" else echo "Response: $response" fi break fi done # If we didn't get a JSON response if [ -z "$response" ]; then echo "โŒ No response received" fi } if [ $? -eq 124 ]; then echo "โŒ Test timed out - OAuth authentication may have failed" echo " Please run: uvx databricks auth login --host ${DATABRICKS_HOST}" fi echo "" echo "โœ… Remote MCP proxy tests complete"

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/moma1992/mcp-databricks-app'

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