noether (claude) 6fa98dd655 shell: kill process group on timeout/cancel (no orphans) + shell_bg job registry + kill_job/list_jobs
Root cause of the shell->shell_bg thrash: run() backgrounded POSIX commands
with a bare & and never captured the pid, so on timeout it returned an error
while the children kept running. Now: setsid (own process group), capture the
leader pid, SIGTERM+SIGKILL the whole group on timeout/cancel, and a message
telling the model it was killed + to use shell_bg. Plus shell_bg registers jobs
to /tmp/lmcp-bg-jobs.tsv and new kill_job/list_jobs let a runaway job be reaped
without a reboot.
2026-07-12 14:28:52 +02:00
2026-04-14 19:58:40 +00:00

lmcp — Lua MCP server

Lightweight Model Context Protocol (MCP) server in pure Lua.

Runtime dependencies

  • Lua 5.1+
  • luasocket — needed for the TCP listener. Packaged as lua-socket on Arch/ALARM, lua-socket on Debian.

Files

File Role
lmcp.lua library: protocol handling, tool registration
server.lua HTTP server loop
json.lua vendored JSON encoder/decoder
example_server.lua sample server with a couple of tools

Install

Packaged as lmcp in the marfrit overlay repo:

# Arch / ALARM
sudo pacman -S lmcp

# Debian
sudo apt install lmcp

Files land under /usr/share/lua/5.4/ (Lua LUA_PATH). The example server installs as /usr/bin/lmcp-example.

S
Description
Lightweight MCP server in pure Lua. 2MB RSS. Zero deps beyond luasocket.
Readme 366 KiB
v1.2.3 Latest
2026-06-05 15:57:24 +00:00
Languages
Lua 93.2%
Shell 5.4%
Python 0.8%
Batchfile 0.6%