AntOS Library — mcp (reference)

The mcp library's design and native core — a Model Context Protocol client, usable with or without AI. The script-facing API is luau_mcp; the model-driven tool-use loop that consumes it is in the AI subsystem.

What it is

A standalone MCP client: connect to an MCP server, list its tools, and call them. It works with no model in the loop — which makes it handy for bringing up or debugging a server — and it is also the bridge the AI subsystem uses to give models tools.

Design notes

  • Independent of AI. Connecting and calling tools needs no model. mcp.tools() returns tool descriptions already shaped for ai.ask's overrides.tools, but nothing requires a model to be present.
  • The tool-use loop lives in ai, not here. mcp is just the client — connect, list, call. The loop that lets a model call tools and feeds results back is the AI subsystem.
  • Configured servers persist in DBFS. Named servers (added via mcp add / tested via mcp test) are stored in config, reachable by name with mcp.connect_named.

Native core — libantos_mcp

sys_mcp implements the MCP transport — handshake, tool listing, invocation — over the network; the binding marshals connections, tool lists, and call results to/from Lua. No Luau dependency.

Related

Important: The Ant64 family of home computers are at early design/prototype stage, everything you see here is subject to change.