Skip to content

Commit 14f8d59

Browse files
committed
Fix quick-start-containers.sh : add loki_token env var when launching the loki-mcp container
1 parent ea299e1 commit 14f8d59

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

quick-start-containers.sh

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -289,30 +289,24 @@ start_agent() {
289289

290290
build_loki_mcp() {
291291
print_status "Building Loki MCP container..."
292-
git clone https://github.com/grafana/loki-mcp.git
292+
rm -rf loki-mcp
293+
git clone https://github.com/sherine-k/loki-mcp.git
294+
# also make sure you checkout branch datasource which has the mcp tool grafana_loki_query
295+
cd loki-mcp
296+
git checkout datasource
297+
cd ..
293298
podman build -t loki-mcp:latest loki-mcp
294299
print_success "Loki MCP container built"
295300
}
296301

297302
start_loki_mcp() {
298303
print_status "Starting Loki MCP container..."
299-
podman run -d --name "$LOKI_MCP_CONTAINER" -e MCP_TRANSPORT=http=stream -p "$MCP_SERVER_PORT:8080" loki-mcp:latest
304+
podman run -d --name "$LOKI_MCP_CONTAINER" -e "LOKI_TOKEN=$LOKI_TOKEN" -e MCP_TRANSPORT=http=stream -p "$MCP_SERVER_PORT:8080" loki-mcp:latest
300305
print_success "Loki MCP container started"
301306
# Wait for MCP server to be ready
302307
print_status "Waiting for MCP server to be ready..."
303-
sleep 5
308+
sleep 2
304309

305-
# Check if MCP server is responding
306-
for i in {1..15}; do
307-
if curl -s -f "http://localhost:$MCP_SERVER_PORT/" >/dev/null 2>&1; then
308-
print_success "Loki MCP server is ready"
309-
break
310-
fi
311-
if [ $i -eq 15 ]; then
312-
print_warning "Loki MCP server may not be fully ready yet"
313-
fi
314-
sleep 2
315-
done
316310
}
317311

318312
# Function to verify deployment

0 commit comments

Comments
 (0)