scorpiox-server network

Linux x64 Linux ARM64 macOS ARM64 Windows x64

Description

A high-performance HTTP server written in C that dynamically executes Python CGI scripts, serves static files, and supports auto-deployment via Git polling.

scorpiox-server is the backbone of code.scorpiox.net and ScorpioX Code's web infrastructure. It clones a Git repository containing Python CGI scripts, maps URL routes to .py files, and executes them on every request — outputting HTML directly via stdout. The server watches the upstream repo on a configurable polling interval and automatically pulls new commits, enabling zero-downtime continuous deployment. It also serves static assets (CSS, JS, images) and supports MCP (Model Context Protocol) mode for AI agent integration.

⚙️ Flags & Options (6)

Flag Short Description Takes Value
--help -h Display help information and available options Yes
--repo -r Git repository URL to clone and serve (auto-deploys .py scripts) Yes
--branch -b Git branch to checkout (default: main) Yes
--poll Polling interval in seconds to check for upstream changes and auto-pull Yes
--mcp Enable MCP (Model Context Protocol) server mode for AI tool integration Yes
--name Set a custom server instance name for logging and identification Yes

💡 Usage Examples

Basic: Serve a Git repository on default port

$ scorpiox-server --repo https://git.example.com/my-org/my-site.git
[scorpiox-server] cloning https://git.example.com/my-org/my-site.git ...
[scorpiox-server] listening on :8080

Specify branch and custom server name

$ scorpiox-server --repo https://git.example.com/org/site.git --branch staging --name staging-web
[staging-web] checked out branch: staging
[staging-web] listening on :8080

Enable auto-polling for continuous deployment (every 30s)

$ scorpiox-server -r https://git.example.com/org/site.git --poll 30
[scorpiox-server] polling upstream every 30s
# Server automatically pulls new commits and restarts CGI scripts

MCP mode for AI agent tool serving

$ scorpiox-server --repo https://git.example.com/tools/mcp-tools.git --mcp true
[scorpiox-server] MCP mode enabled
[scorpiox-server] serving MCP tools from 3 .py scripts

Production deployment with all options

$ scorpiox-server \
  --repo https://git.example.com/org/production-site.git \
  --branch main \
  --poll 60 \
  --name prod-web
[prod-web] cloning https://git.example.com/org/production-site.git ...
[prod-web] checked out branch: main
[prod-web] polling upstream every 60s
[prod-web] listening on :8080

How CGI routing works

# URL path maps directly to .py files in the cloned repo:
# GET / → index.py
# GET /tools → tools.py
# GET /tools/sx → tools_sx.py
# GET /install → install.py
# GET /logo.png → served as static file
#
# Each .py file must print HTTP headers + HTML to stdout.

Display help

$ scorpiox-server --help

📦 Source & Build Info

Source File
scorpiox/scorpiox-server.c
Lines of Code
5,358
Dependencies
libsxutil, yyjson

🔗 Related Tools