Blog
Field notes.
Every field guide, newest first. Practical, answered up front, with code you can copy.
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 Apple securityApp Sandbox on macOS: the entitlements an app actually needsWhat the macOS App Sandbox blocks, the entitlements for network, files and app groups, how to inspect an app’s entitlements, and the 104-byte socket path trap.3 min readRead Apple securityAsk for Touch ID before releasing a secret (LocalAuthentication and Keychain)Two ways to require Touch ID on a Mac: LocalAuthentication for a prompt, and Keychain access control so the system itself refuses without a fingerprint.3 min readRead ApprovalsAudit logs for AI agents: what to record, and whyWhat an AI agent audit log should capture (agent, tool, redacted inputs, result, approval and approver), where to keep it, and how long, without leaking secrets.3 min readRead MCPBuild an MCP server in Swift with the official Swift SDKA minimal MCP server in Swift using the official swift-sdk: package setup, one tool, the stdio transport, logging to stderr, and adding it to Claude Code.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 MCPDebug an MCP server on macOS: Inspector, logs and the PATH trapDebug MCP servers on a Mac: run them in the MCP Inspector, read Claude Desktop’s MCP logs, and fix the usual failures (PATH, stdout noise, JSON, permissions).3 min readRead ApprovalsGive an AI agent your inbox without letting it sendHow to let an AI agent read and draft email without send or delete: IMAP versus SMTP, drafts you review, and holding back attachments and remote images.3 min readRead Apple securityHow to store API keys securely on macOSKeep API keys out of .env files on your Mac: store them in the macOS Keychain, read them only when needed, and keep them away from AI agents.3 min readRead ApprovalsHow to supervise AI agents at work (and get certified)Supervising AI agents is a new job skill: reading proposals, spotting harmful actions, and saying no usefully. Learn it free and prove it with an exam.3 min readRead ApprovalsHuman-in-the-loop for AI agents: approve actions before they runHow to put a person in the loop for AI agent actions without approval fatigue: what to approve, what an approval card must show, expiry, and denying with a note.3 min readRead Apple securityKeychain Services in Swift: save, read, update and delete a secretWorking Swift code for the macOS and iOS Keychain: save, read, update and delete a generic password with SecItem, plus the accessibility setting to choose.3 min readRead ApprovalsLeast privilege for AI agents: scoping keys, files and actionsApply least privilege to AI agents in five dimensions (keys, files, actions, time and network) with concrete settings for Mac developers and business tools.3 min readRead ApprovalsLet an AI agent issue Stripe refunds safelyA developer’s pattern for agent-issued Stripe refunds: no secret key for the agent, a read-only restricted key, refunds as approved proposals, caps and idempotency.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 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 MCPMCP (Model Context Protocol) explained for Mac developersWhat the Model Context Protocol is: hosts, clients and servers; tools, resources and prompts; stdio and Streamable HTTP; and what that means on a Mac.3 min readRead MCPMCP security: where credentials leak and how to keep keys out of configThe four places MCP credentials leak on a Mac (config files, process environments, model context, logs) and how to design servers so agents never hold keys.3 min readRead MCPMCP transports on a Mac: stdio, Streamable HTTP and local socketsWhen to use stdio or Streamable HTTP for an MCP server on macOS, why localhost HTTP servers must check the Origin header, and where Unix sockets fit.3 min readRead Apple securityNotarize a Mac app with notarytool: sign, submit, staple, verifyStep-by-step notarization for a Developer ID Mac app and its DMG: hardened runtime, notarytool credentials, submit and wait, staple, and verify with spctl.3 min readRead MCPOne MCP server for Stripe, Shopify and 28 more: why fewer servers is saferEach MCP server is code running with one of your keys. Why consolidating Stripe, Shopify, GitHub and other tools behind one local server cuts the risk.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 MCPPrompt injection and tool poisoning in MCP: a practical defence checklistHow MCP agents get hijacked: poisoned tool descriptions, changed tools, shadowing, and instructions hidden in data. A practical checklist to limit the damage.3 min readRead ApprovalsPrompt injection through email: how agents get tricked, and how to stop itAnyone can email your AI agent instructions. How email prompt injection works (hidden text, fake urgency, forwarding tricks) and the controls that contain it.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 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 ApprovalsStripe restricted keys for AI agents: what to allow, what never to allowCreate a Stripe restricted key (rk_) for an AI agent: which resources to make readable, which writes never to grant, and testing in test mode first.3 min readRead Apple securityThe Secure Enclave on the Mac with CryptoKit: what it protects and what it can’tCreate Secure Enclave keys on Apple silicon and T2 Macs with CryptoKit, require Touch ID to use them, and see why an API key can’t simply live inside the enclave.3 min readRead Apple securityUse the macOS security command to keep secrets out of scriptsStore, update, read and delete Keychain secrets from the terminal with the macOS security command, and pass a key to one command instead of your whole shell.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 MCPWhere MCP config files live on macOS: Claude Desktop, Claude Code, Cursor, Codex, VS CodeThe exact MCP config file paths on a Mac for Claude Desktop, Claude Code, Cursor, OpenAI Codex and VS Code, the key each uses, and what not to put in them.3 min readRead Apple securityWhy .env files are a risk on a developer Mac (and what to use instead)How .env files leak keys on a Mac: other apps, AI coding agents, backups and Git. Deny-list them for agents, and move keys to the Keychain or a vault.3 min readRead