We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mashhurs/logstash-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
start_logstash_mcp.shβ’1.14 KiB
#!/bin/bash
echo "π Starting Logstash MCP Server"
echo "==============================="
# Check if Python dependencies are installed
echo "π¦ Checking dependencies..."
python3 -c "import mcp, aiohttp" 2>/dev/null
if [ $? -ne 0 ]; then
echo "β Missing dependencies. Installing..."
pip3 install -r requirements.txt
fi
# Set default environment variables if not set
export LOGSTASH_API_BASE="${LOGSTASH_API_BASE:-http://localhost:9600}"
echo "π§ Configuration:"
echo " API Base: $LOGSTASH_API_BASE"
echo ""
# Test connectivity to Logstash (optional)
echo "π Testing Logstash connectivity..."
curl -s "$LOGSTASH_API_BASE/_node" >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo "β Logstash is reachable"
else
echo "β οΈ Warning: Cannot reach Logstash at $LOGSTASH_API_BASE"
echo " The MCP server will still start, but tools may fail until Logstash is available"
fi
echo ""
echo "π― Starting MCP Server..."
echo " The server will display usage instructions on startup"
echo " Press Ctrl+C to stop"
echo " Server will communicate via stdin/stdout for MCP protocol"
echo ""
# Start the MCP server
python3 logstash_mcp_server.py