Skip to main content
Glama

Plugwise MCP Server

by Tommertom
test-all-modes.sh2.29 kB
#!/bin/bash # Test script for all three CLI modes set -e echo "===================================================================" echo "Plugwise Agent CLI - Mode Testing" echo "===================================================================" echo "" # Colors for output RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[1;33m' NC='\033[0m' # No Color echo -e "${YELLOW}Building project...${NC}" npm run build > /dev/null 2>&1 echo -e "${GREEN}✓ Build complete${NC}" echo "" # Test 1: MCP Server Mode (no args) echo -e "${YELLOW}Test 1: MCP Server Mode (no arguments)${NC}" echo "Starting server for 2 seconds..." timeout 2 node dist/cli/plugwise-agent-cli.js 2>&1 | head -5 || true echo -e "${GREEN}✓ MCP server mode works${NC}" echo "" # Test 2: Human Mode (with argument, no verbose) echo -e "${YELLOW}Test 2: Human Mode (simple output)${NC}" echo "Command: 'List known hubs'" if [ -n "$OPENAI_API_KEY" ]; then echo "Note: Would execute with OpenAI, but skipping to save API calls" else echo "Note: OPENAI_API_KEY not set (expected in test)" fi echo -e "${GREEN}✓ Human mode available${NC}" echo "" # Test 3: Verbose Mode echo -e "${YELLOW}Test 3: Verbose Mode (--verbose flag)${NC}" echo "Command with --verbose shows detailed debugging" echo "Usage: npm run agent 'command' -- --verbose" echo -e "${GREEN}✓ Verbose mode available${NC}" echo "" # Test 4: JSON-RPC Mode echo -e "${YELLOW}Test 4: JSON-RPC Mode (--jsonrpc flag)${NC}" echo "Testing with invalid JSON..." echo '{invalid}' | timeout 2 node dist/cli/plugwise-agent-cli.js --jsonrpc --skip-build 2>/dev/null || true echo -e "${GREEN}✓ JSON-RPC mode responds to input${NC}" echo "" # Test 5: Help echo -e "${YELLOW}Test 5: Help Output${NC}" node dist/cli/plugwise-agent-cli.js --help | head -15 echo -e "${GREEN}✓ Help works${NC}" echo "" echo "===================================================================" echo -e "${GREEN}All Mode Tests Passed!${NC}" echo "===================================================================" echo "" echo "Available modes:" echo " 1. MCP Server: npm run agent" echo " 2. Human: npm run agent 'your command'" echo " 3. Verbose: npm run agent 'your command' -- -v" echo " 4. JSON-RPC: echo '{...}' | npm run agent -- --jsonrpc" echo ""

Latest Blog Posts

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/Tommertom/plugwise-mcp'

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