Skip to main content
Glama

NervusDB MCP Server

Official
by nervusdb
test-mcp.shโ€ข3.76 kB
#!/usr/bin/env bash # Test Synapse-Architect MCP Server set -e GREEN='\033[0;32m' RED='\033[0;31m' YELLOW='\033[1;33m' NC='\033[0m' PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" BIN_PATH="$PROJECT_ROOT/bin/synapse-architect.js" echo -e "${GREEN}๐Ÿงช Testing Synapse-Architect MCP Server${NC}" echo "" # Test 1: File exists echo -e "${YELLOW}Test 1: Checking if binary exists...${NC}" if [ -f "$BIN_PATH" ]; then echo -e "${GREEN}โœ… Binary found: $BIN_PATH${NC}" else echo -e "${RED}โŒ Binary not found: $BIN_PATH${NC}" exit 1 fi # Test 2: File is executable echo -e "${YELLOW}Test 2: Checking executable permission...${NC}" if [ -x "$BIN_PATH" ]; then echo -e "${GREEN}โœ… File is executable${NC}" else echo -e "${YELLOW}โš ๏ธ File is not executable, fixing...${NC}" chmod +x "$BIN_PATH" echo -e "${GREEN}โœ… Permission fixed${NC}" fi # Test 3: Node.js is available echo -e "${YELLOW}Test 3: Checking Node.js...${NC}" if command -v node &> /dev/null; then NODE_VERSION=$(node --version) echo -e "${GREEN}โœ… Node.js found: $NODE_VERSION${NC}" else echo -e "${RED}โŒ Node.js not found in PATH${NC}" exit 1 fi # Test 4: Initialize handshake echo -e "${YELLOW}Test 4: Testing JSON-RPC initialization...${NC}" RESPONSE=$(echo '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}},"id":1}' | \ node "$BIN_PATH" 2>/dev/null | head -1) if echo "$RESPONSE" | jq -e '.result.serverInfo' &> /dev/null; then SERVER_NAME=$(echo "$RESPONSE" | jq -r '.result.serverInfo.name') SERVER_VERSION=$(echo "$RESPONSE" | jq -r '.result.serverInfo.version') echo -e "${GREEN}โœ… Server responded correctly${NC}" echo " Name: $SERVER_NAME" echo " Version: $SERVER_VERSION" else echo -e "${RED}โŒ Server response invalid${NC}" echo "Response: $RESPONSE" exit 1 fi # Test 5: Check stdout/stderr separation echo -e "${YELLOW}Test 5: Checking stdout/stderr separation...${NC}" TEMP_OUT=$(mktemp) TEMP_ERR=$(mktemp) echo '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}},"id":1}' | \ MCP_TRANSPORT=stdio node "$BIN_PATH" > "$TEMP_OUT" 2> "$TEMP_ERR" # Check stdout contains only JSON if head -1 "$TEMP_OUT" | jq empty 2>/dev/null; then echo -e "${GREEN}โœ… stdout contains valid JSON-RPC${NC}" else echo -e "${RED}โŒ stdout is polluted (should only contain JSON-RPC)${NC}" echo "First line of stdout:" head -1 "$TEMP_OUT" fi # Check stderr contains logs if grep -q "Logger initialized" "$TEMP_ERR" || grep -q "isStdioMode" "$TEMP_ERR"; then echo -e "${GREEN}โœ… stderr contains logs${NC}" else echo -e "${YELLOW}โš ๏ธ No logs in stderr (might be disabled)${NC}" fi rm -f "$TEMP_OUT" "$TEMP_ERR" # Test 6: Dependencies check echo -e "${YELLOW}Test 6: Checking dependencies...${NC}" if [ -d "$PROJECT_ROOT/node_modules/synapsedb" ]; then echo -e "${GREEN}โœ… synapsedb dependency found${NC}" else echo -e "${RED}โŒ synapsedb dependency not found${NC}" echo -e "${YELLOW} Run: cd $PROJECT_ROOT && pnpm install${NC}" fi # Summary echo "" echo -e "${GREEN}โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”${NC}" echo -e "${GREEN}โœ… All tests passed!${NC}" echo -e "${GREEN}โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”${NC}" echo "" echo "Next steps:" echo " 1. Run: bash $PROJECT_ROOT/scripts/configure-mcp.sh" echo " 2. Restart your MCP client (Cursor/Claude Desktop/etc.)" echo " 3. Check if 'synapse-architect' appears in the MCP servers list"

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/nervusdb/nervusdb-mcp'

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