swiftapplications

MCP on macOS: config files, servers in Swift and keeping credentials safe

The Model Context Protocol is how agents reach tools and data. On a Mac that means config files, local servers and, too often, API keys in plain text. These guides cover how MCP works, where everything lives, and how to run it safely.

8 guides, each answered first, with code you can copy.

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 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 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 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 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 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 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 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

The safe way to do this

MoltenRock Connect

One local MCP server for 30 business platforms

Connect holds every key; your agents read Stripe, Shopify and 28 more over MCP and never see one. On Stripe they can only propose, and you approve with Touch ID.

Get MoltenRock Connect

More field guides