AI agents on the Mac: Claude Code, Codex, Cursor and local models, safely
Coding agents and local models now run on your own Mac, with your files, your network and your keys. These guides cover setting them up, what they can reach, and how to give them access without giving them everything.
8 guides, each answered first, with code you can copy.
AI agentsSet up Claude Code on a Mac without leaking your keysInstall Claude Code on macOS, keep your API key in the Keychain with apiKeyHelper, block .env files with deny rules, and add MCP servers without plain-text keys.3 min readRead AI agentsOpenAI Codex CLI on a Mac: config, sandbox and secretsConfigure the OpenAI Codex CLI on macOS: config.toml, the sandbox and approval modes, and MCP servers, without leaving API keys in plain text.3 min readRead AI agentsCursor on macOS: MCP servers and where the keys goWhere Cursor keeps MCP config on a Mac (global and per project), the mcp.json format, and a wrapper-script pattern that keeps API keys out of the file.3 min readRead AI agentsRun a local LLM on a Mac: Ollama, LM Studio and MLX comparedOllama, LM Studio or MLX for local models on Apple silicon: how each installs, what it serves, how much memory a model needs, and keeping the local server private.3 min readRead AI agentsLocal AI agents on macOS (OpenClaw, Hermes): API keys without plain-text configWhere local agents like OpenClaw and Hermes usually keep API keys, why that’s risky on a Mac, and how a vault gives them keys per request instead.3 min readRead AI agentsWhat an AI agent can reach on your Mac: files, Keychain, network and macOS permissionsHow macOS privacy permissions (TCC) apply to AI agents, why agents inherit your terminal’s access, what the Keychain still guards, and how to reset grants.3 min readRead AI agentsLet an AI agent show its work: dashboards and views on your MacText output is hard to review. Have your agent push metrics, charts, lists and approval summaries to a local view on your Mac instead, with a JSON example.3 min readRead AI agentsA checklist for running AI agents safely on your MacTwelve practical checks for running AI agents on macOS: folders, permissions, keys, MCP, approvals, audit logs and network, from a developer’s point of view.3 min readRead
The safe way to do this
MoltenRock
The encrypted vault for your API keys and AI agents
Your keys sealed by your Mac’s Secure Enclave, handed only to the local agents you approve, never written to a .env file. Free for Mac.
Get MoltenRock, free