Local Lattice Server
Give a coding agent the Lattice running on your computer
lattice-ctl mcp is an MCP server over stdio that connects a coding agent to
the Lattice already running on the same computer. The agent can check whether
local models are ready, list them, run tasks, and read status, all on your
machine. No account or API key is involved.
The server forwards to the running Lattice; it never starts a second copy. When Lattice is not running, the first tool call starts it.
Prerequisites#
Lattice installed on this computer. If it is not, run lattice-ctl setup, or
see installation.
Register the server#
claude mcp add lattice -- lattice-ctl mcpVerify with
claude mcp list.
The agent starts lattice-ctl mcp itself when a session begins. If
lattice-ctl is not on the agent's PATH, use its full path as the command.
Tools#
Every tool carries a title and read-only and destructive hints, so clients can run read-only tools without asking. No tool deletes anything.
| Tool | What it does | Read-only |
|---|---|---|
get_readiness | Reports whether Lattice runs, its local API answers, and a model is ready | Yes |
list_local_models | Lists the local models and the local API base URL | Yes |
submit_task | Queues a task for an agent | No |
get_task_status | Gets a task's state and result | Yes |
list_tasks | Lists queued, running, and finished tasks | Yes |
get_queue_status | Gets task counts and average wait and run times | Yes |
list_agents | Lists running agents | Yes |
get_health | Gets Lattice health by component | Yes |
get_metrics | Gets resource, agent, and queue metrics | Yes |
get_daemon_status | Gets state, version, uptime, and active agents and tasks | Yes |
ping_daemon | Checks that Lattice responds | Yes |
list_workspaces | Lists workspaces | Yes |
get_current_workspace | Gets the default workspace | Yes |
switch_workspace | Sets the default workspace | No |
get_readiness never starts Lattice; the other tools start it when it is not
running. To send model calls to the local models, point an OpenAI client at the
local OpenAI-compatible API.
Errors#
Tool failures come back as MCP error results with a structured code the agent can act on:
{
"error": {
"code": "daemon_unavailable",
"message": "Lattice is not reachable on this computer (...). Run `lattice-ctl setup` to install and start it."
}
}
daemon_unavailable means Lattice is not installed or could not start. Other
codes come from Lattice itself, such as not_found for an unknown task id.
Local vs Remote#
| Feature | Local (lattice-ctl mcp) | Remote |
|---|---|---|
| Transport | stdio | Streamable HTTP |
| Authentication | None | API key or OAuth |
| Reaches | The Lattice on this computer | Your Lovelace account |
| Runs where | Coding agents on your computer | Every MCP client |
| Deployment | Your machine | mcp.uselovelace.com |
Using Both#
You can register both servers. See Client Setup for the remote server's configuration.
Troubleshooting#
"lattice-ctl: command not found": install Lattice from the
installation guide, or register the full path to
lattice-ctl.
Tools return daemon_unavailable: run lattice-ctl setup, then
lattice-ctl ping to confirm Lattice responds.
get_readiness reports no_local_model: run lattice-ctl setup to
download the default local model.