forked from marfrit/lmcp
4ac9296f08a76c2ed9ebda5537a86b5c6df1d200
The result of the bullpen campaign, carried out by @deus as operator with
@coder on versions.lua (job 1158). Both conformance suites green, attested with
0 open points; the record is on branch kampagne/2026-07-28 in this repo.
What it does:
versions.lua M.SUPPORTED gains 2026-07-28, old version first so an existing
client keeps negotiating what it always did.
lmcp.lua requires envelope; routes on req._legacy, so initialize, ping
and logging/setLevel keep answering the old shape while the new
protocol gets the envelope path. resultType defaults to
"complete" on every result.
envelope.lua new -- header and body checks, returns the -32020 family.
104 of the 180 added lines in lmcp.lua are comments: the campaign also carried
the German-to-English translation, so the diff looks larger than the behaviour
change is.
NOT yet on master. lmcp runs on around ten hosts in this fleet; a green suite
says the spec is satisfiable, not that it is complete or true. This branch
exists so a second pair of eyes reads it before it reaches any of them.
The copy fix in versions.lua (err.data.supported handed out as a COPY, so a
caller cannot hijack the module table) predates this work -- it was the
uncommitted German state, archived on wip/lmcp-deutsch-2026-08-09.
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-socketon Arch/ALARM,lua-socketon 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.
Description
Languages
Lua
93.3%
Shell
6%
Batchfile
0.7%