test0r 9e53b23b11 windows/build-msi.sh: cross-build the MSI on Linux via wixl + mingw-w64
Discovered building v1.1.0 that the MSI can be produced entirely on
Linux — no Windows VM, no manual WiX install, no GUI babysitting:

  apt install wixl unzip gcc-mingw-w64-x86-64 binutils-mingw-w64-x86-64 \
              mingw-w64-x86-64-dev curl

The new build-msi.sh script:
  1. Runs sync.sh to refresh pkg/{lmcp,server,json}.lua from root.
  2. Downloads Lua 5.4.2 Win64 binaries from LuaBinaries (Tools +
     Library zips — interpreter + headers + import lib).
  3. Cross-compiles LuaSocket 3.1.0 via x86_64-w64-mingw32-gcc
     (produces socket-3.0.0.dll + mime-1.0.3.dll for Win64).
  4. Stages pkg/lua/{lua.exe, lua54.dll, socket/, mime/, *.lua} per
     the WiX manifest layout.
  5. Invokes wixl on the lmcp.wxs manifest (with sed for the
     Windows backslash path separators → forward slashes).

Output: lmcp-<version>.msi. Version is read from lmcp.wxs
Version="…", so bump that before each release.

Cold build: ~30s. Warm cache: ~5s. The artifact contains all 17
files the WiX manifest expects, ProductVersion matches lmcp.wxs.

README updated to point at build-msi.sh as the recommended path;
the Windows-side candle/light recipe kept as an alternative.

Reproducibility note (deferred): the MSI is not yet bit-reproducible
across builds — file mtimes in the Lua binaries' zip propagate to
the cab inside the MSI. The debian/lmcp/build-deb.sh in marfrit-
packages uses SOURCE_DATE_EPOCH to fix this; same pattern would
apply here. Out of scope for the first cut.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 20:27:32 +00: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 296 KiB
Languages
Lua 93.1%
Shell 6.2%
Batchfile 0.7%