From b81b021b5b4d5f21ad4de746ba30a94787177f18 Mon Sep 17 00:00:00 2001 From: Markus Fritsche Date: Tue, 21 Apr 2026 20:12:43 +0000 Subject: [PATCH] v0.5.4: ship examples/lmcp.service template Companion to lmcp-hub.service. Gives a copy-and-edit starting point for per-host lmcp instances (foo-tools style). Handles the Arch-vs-Debian /usr/bin/lua vs /usr/bin/lua5.4 split via a comment pointing users to override ExecStart. Co-Authored-By: Claude Opus 4.7 (1M context) --- examples/lmcp.service | 22 ++++++++++++++++++++++ hub.lua | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 examples/lmcp.service diff --git a/examples/lmcp.service b/examples/lmcp.service new file mode 100644 index 0000000..0ea156c --- /dev/null +++ b/examples/lmcp.service @@ -0,0 +1,22 @@ +[Unit] +Description=lmcp MCP Server +After=network.target + +[Service] +Type=simple +User=root +# Arch ships the Lua 5.4 binary as /usr/bin/lua; Debian ships /usr/bin/lua5.4. +# Override ExecStart if your distro differs. +ExecStart=/usr/bin/lua /usr/share/lua/5.4/server.lua +# Distinct name per host: foo-tools appears in /mcp listings and logs. +Environment=LMCP_NAME=CHANGEME-tools +Environment=LMCP_PORT=8080 +# Bearer token. Generate with: openssl rand -hex 24 +# For untrusted networks, bind to LAN-only via firewall; the server itself +# listens on 0.0.0.0 by default. +Environment=LMCP_TOKEN=CHANGEME +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target diff --git a/hub.lua b/hub.lua index d4d3bce..2f839cf 100644 --- a/hub.lua +++ b/hub.lua @@ -468,7 +468,7 @@ math.randomseed(os.time()) local server = lmcp.new(os.getenv("LMCP_NAME") or "hub-tools", { port = tonumber(os.getenv("LMCP_PORT") or arg[1]) or 8090, - version = "0.5.3", + version = "0.5.4", conf = os.getenv("LMCP_HUB_CONF") or "/opt/herding/etc/lmcp-hub.conf", })