File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -289,30 +289,24 @@ start_agent() {
289
289
290
290
build_loki_mcp () {
291
291
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 ..
293
298
podman build -t loki-mcp:latest loki-mcp
294
299
print_success " Loki MCP container built"
295
300
}
296
301
297
302
start_loki_mcp () {
298
303
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
300
305
print_success " Loki MCP container started"
301
306
# Wait for MCP server to be ready
302
307
print_status " Waiting for MCP server to be ready..."
303
- sleep 5
308
+ sleep 2
304
309
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
316
310
}
317
311
318
312
# Function to verify deployment
You can’t perform that action at this time.
0 commit comments