For coding agents
Give your coding agent a local model.
Paste one prompt into Claude Code or Codex. The agent installs Loci, downloads a model that fits this Mac, and starts sending summaries, extraction and bulk triage to it instead of the cloud.
Your agent gets a model, not your assistant. Loci's own tools, your files, mail and memories stay in the Loci window.
Apple silicon Mac, macOS 14 or later, the direct build from Homebrew or this page. The App Store build has no agent API. Windows later.
Set up Loci as a local model provider on this Mac by following https://askloci.ai/agents/SKILL.md. Install it with Homebrew (brew install --cask askloci/tap/loci), use the disk image from https://askloci.ai/api/mac-download if Homebrew is missing, download the recommended model, register Loci's MCP server with this tool, and install the skill so you can use Loci in future sessions. Then run loci_status and tell me which local models are ready.
Works in Claude Code, Codex, Cursor, Gemini CLI, Copilot CLI and any agent that speaks MCP over HTTP.
What your agent gets
loci_statusInstalled models and whether each is warm, loading or cold, measured tokens per second on this Mac, what fits in memory, what can be installed. The agent routes itself.
loci_generateOne answer from a named model. Pass a JSON schema and get validated JSON back.
loci_mapOne instruction over up to 200 items in a single call. Summarize forty files, triage two hundred log lines, filter search results before reading them.
loci_pullandloci_warmDownload and load models from the agent instead of the app's model picker.
OpenAI-compatible endpoint
Loci listens on 127.0.0.1, port 5624 when it is free, and answers chat completions with streaming. Any client that can send plain-text chat completions to an OpenAI-style endpoint can use it. The exact URL and a local token are in:
~/Library/Application Support/LociRust/agent-api.json
Works with
Use mcp_url and token from ~/Library/Application Support/LociRust/agent-api.json.
- Claude Code
claude mcp add --transport http --scope user loci "<mcp_url>" --header "Authorization: Bearer <token>"
- Codex
Add to
~/.codex/config.toml[mcp_servers.loci] url = "<mcp_url>" http_headers = { Authorization = "Bearer <token>" }- Cursor
Add to
~/.cursor/mcp.json{ "mcpServers": { "loci": { "url": "<mcp_url>", "headers": { "Authorization": "Bearer <token>" } } } }- Gemini CLI
gemini mcp add --transport http --scope user --header "Authorization: Bearer <token>" loci "<mcp_url>"
- Copilot CLI
copilot mcp add --transport http --header "Authorization: Bearer <token>" loci "<mcp_url>"
- Anything else
- MCP over HTTP or the OpenAI chat API.
Prefer to install it yourself?
brew install --cask askloci/tap/loci
Apple silicon, macOS 14 or later, 8 GB of memory. Intel Macs: the App Store build, without the agent API.
Everything stays on the Mac.
The API listens only on 127.0.0.1, every request that does anything needs a token only your account can read, and nothing the agent sends is uploaded or logged. Turn it off any time in Settings → Advanced → Agent Access.
Common questions
Does anything leave my Mac?
No. Prompts, files and answers the agent sends to Loci stay on this Mac.
Which model will the agent use?
loci_status lists what fits your memory and how fast it runs here; the agent picks, or you tell it.
What if Homebrew is missing?
The prompt falls back to the disk image, the same signed build.
Do I have to do anything in Loci?
Finish its setup page once after the first launch; it downloads the first model. After that the agent pulls models itself.
How do I turn it off?
Turn off the switch in Settings → Advanced → Agent Access.
Get Loci
Private AI that keeps working.
Download Loci once, then chat without an account, chat upload, or signal.