#!/bin/bash
set -e
# Docker entrypoint script for MCP Presidio
# This script provides flexible startup options for the container
# Default: Run the MCP server with stdio transport
if [ "$#" -eq 0 ]; then
exec python -m mcp_presidio.server
fi
# If the first argument is a Python module or script, run it
if [ "$1" = "python" ] || [ "$1" = "python3" ]; then
exec "$@"
fi
# If the first argument is a shell command, execute it
if [ "$1" = "bash" ] || [ "$1" = "sh" ]; then
exec "$@"
fi
# For any other arguments, pass them to the MCP server
# Note: The MCP server currently doesn't accept command-line arguments,
# so this may result in an error if invalid arguments are provided
exec python -m mcp_presidio.server "$@"