observe
The default mode. It is for runtime facts such as Lua version, global names, registry shape, loaded scripts, and host-provided read-only tools.
Lua runtime experiment
An MCP-aware Lua runtime for applications that embed Lua.
Compile a host against liblua-mcp and its embedded Lua state can expose a local, opt-in MCP server for Codex, Claude, MetaMCP, and other MCP clients. The host does not need to implement MCP itself.
Many useful tools embed Lua. If every host has to grow its own MCP implementation, adoption is slow and fragmented. liblua-mcp moves the agent-facing surface into liblua itself: the embedded runtime owns a local socket, exposes bounded inspection by default, and allows explicit host-aware tools when the process opts in.
This is not a proposal for Nmap, HAProxy, mpv, or another host to speak MCP on stdout. Their normal output stays normal. MCP runs as a separate local control plane owned by the Lua runtime.
The primary model is intentional adoption: an application that already embeds Lua compiles against liblua-mcp. For ABI-compatible hosts, swapping a linked liblua can be useful as a lab proof, but that is a footnote, not the project promise.
Default: MCP disabled unless the host process enables it.
Transport: local Unix socket with restrictive permissions.
Bridge: stdio bridge for clients that expect stdio MCP.
Host code: no host-specific MCP implementation required.
The default mode. It is for runtime facts such as Lua version, global names, registry shape, loaded scripts, and host-provided read-only tools.
Explicitly enabled. Hosts or activator scripts can register semantic tools, for example listing NSE scripts, asking for host state, or calling a safe host wrapper.
Requires a loud opt-in gate. It exposes dangerous tools such as eval, setglobal, and call_function. Use it only in trusted local lab sessions.
Lua 5.4 proof branch. The activator script starts a local MCP listen mode and can expose NSE-oriented state without modifying Nmap source.
Nmap exampleLua 5.4 proof branch. A normal HAProxy Lua script can register HAProxy-oriented MCP tools while HAProxy keeps its own runtime model.
HAProxy exampleLua 5.1 proof branch. Useful for proving the idea outside scanner workflows and for testing older Lua ABI hosts.
Lua 5.1 branchliblua-mcp is an alpha research branch for trusted local testing, architecture review, and early feedback from Lua embedders, MCP implementers, and security-minded users. It is not production-ready and has not had a production security review.