Skip to main content
Glama
portel-dev

NCP - Natural Context Provider

by portel-dev
test-env-vars.sh1.44 kB
#!/bin/bash # Test environment variable support echo "Testing NCP Environment Variables..." echo "" # Test 1: NCP_PROFILE echo "Test 1: NCP_PROFILE environment variable" NCP_PROFILE=work NCP_DEBUG=true node dist/index-mcp.js & PID=$! sleep 1 if ps -p $PID > /dev/null; then echo "✓ Server started with NCP_PROFILE=work" kill $PID 2>/dev/null else echo "✗ Server failed to start" fi # Test 2: NCP_WORKING_DIR echo "" echo "Test 2: NCP_WORKING_DIR environment variable" NCP_WORKING_DIR=/tmp NCP_DEBUG=true node dist/index-mcp.js & PID=$! sleep 1 if ps -p $PID > /dev/null; then echo "✓ Server started with NCP_WORKING_DIR=/tmp" kill $PID 2>/dev/null else echo "✗ Server failed to start" fi # Test 3: Command-line args still work echo "" echo "Test 3: Command-line args (backward compatibility)" node dist/index-mcp.js --profile work & PID=$! sleep 1 if ps -p $PID > /dev/null; then echo "✓ Server started with --profile work" kill $PID 2>/dev/null else echo "✗ Server failed to start" fi # Test 4: ENV VAR priority over args echo "" echo "Test 4: ENV VAR takes priority over command-line args" NCP_PROFILE=personal node dist/index-mcp.js --profile work & PID=$! sleep 1 if ps -p $PID > /dev/null; then echo "✓ Server started (NCP_PROFILE=personal should override --profile work)" kill $PID 2>/dev/null else echo "✗ Server failed to start" fi echo "" echo "✅ All environment variable tests passed!"

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/portel-dev/ncp'

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