At this stage, the code is known to work and has been thoroughly tested

This commit is contained in:
Jason Thistlethwaite
2026-04-27 22:24:04 +00:00
parent a11fa3b142
commit 16feb51b12
15 changed files with 2899 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -euo pipefail
HOST="${MCP_HOST:-0.0.0.0}"
PORT="${MCP_PORT:-8787}"
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
if [[ "${MCP_ALLOW_UNAUTHENTICATED:-}" != "1" && -z "${MCP_AUTH_TOKEN:-}" ]]; then
MCP_AUTH_TOKEN="$(php -r 'echo bin2hex(random_bytes(24));')"
export MCP_AUTH_TOKEN
echo "Generated MCP_AUTH_TOKEN for this session:"
echo "${MCP_AUTH_TOKEN}"
echo
fi
if [[ -z "${VOIPMS_API_USERNAME:-}" || -z "${VOIPMS_API_PASSWORD:-}" ]]; then
echo "Warning: VOIPMS_API_USERNAME or VOIPMS_API_PASSWORD is not set."
echo "Read-only protocol methods will work, but VoIP.ms tools will fail until credentials are present."
echo
fi
echo "Starting VoIP.ms test MCP server"
echo "URL: http://${HOST}:${PORT}/mcp"
echo "Health: http://${HOST}:${PORT}/health"
echo "Auth: Authorization: Bearer ${MCP_AUTH_TOKEN:-<disabled>}"
echo
exec php -S "${HOST}:${PORT}" -t "${ROOT}/mcp" "${ROOT}/mcp/http-server.php"