From 0b8566871a2a21e2fb38755939ee9ecbb37d0537 Mon Sep 17 00:00:00 2001 From: MaximEdogawa Date: Sat, 18 Apr 2026 19:32:48 +0200 Subject: [PATCH] feat: update smoke test script for Brave Search MCP - Added environment variable configuration for Brave Search MCP to ensure it starts with a valid API key, preventing initialization failures. - Adjusted the Docker run command to include the new environment variable setup, enhancing the script's robustness for smoke testing. --- .github/scripts/tools-publish/smoke-test-mcp.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/scripts/tools-publish/smoke-test-mcp.sh b/.github/scripts/tools-publish/smoke-test-mcp.sh index dc70ad0..1de7101 100755 --- a/.github/scripts/tools-publish/smoke-test-mcp.sh +++ b/.github/scripts/tools-publish/smoke-test-mcp.sh @@ -16,8 +16,14 @@ if [[ "${TOOL_SLUG:-}" == "file-manager" ]]; then extra=(/tmp) fi +# Brave Search MCP refuses to start with an empty key; init handshake does not call the API. +docker_run_env=() +if [[ "${TOOL_SLUG:-}" == "brave-search" ]]; then + docker_run_env=(-e "BRAVE_API_KEY=${SMOKE_BRAVE_API_KEY:-smoke-ci-placeholder}") +fi + RESP=$(echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"smoke","version":"0.0.1"}}}' \ - | timeout 15 docker run --rm -i --network=none "$IMAGE_WITH_DIGEST" "${extra[@]}" \ + | timeout 15 docker run --rm -i --network=none "${docker_run_env[@]}" "$IMAGE_WITH_DIGEST" "${extra[@]}" \ | head -1) echo "$RESP" | jq -e '.result.serverInfo' > /dev/null \ || { echo "::error::MCP init failed: $RESP"; exit 1; }