[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