Skip to main content

Connect an AI assistant

loch mcp starts an MCP server (stdio transport). It uses the endpoints and API keys of your loch configuration.

Before you start: install loch, then run loch config, loch use and loch login. Use the full path of the binary (which loch): desktop apps often do not see your PATH.

claude mcp add --scope user loch /usr/local/bin/loch mcp

Check with claude mcp list.

Try it​

Ask your assistant: "List my loch endpoints, then the stacks on the first one."

Good to know​

  • The assistant can do only what your API key allows. Use a key with limited scopes for daily work.
  • Passwords are never returned to the assistant. To reset one, run loch services reset-password yourself.
  • Deleting a database and publishing ports are CLI-only. So are deploying functions, their secrets and credentials: an assistant only invokes the functions marked --mcp-invocable.
  • loch ai:howto prints these instructions in the terminal.

Full list of tools: MCP tools.