HeavenDocs

CLI, SSH and MCP

Agents use the same commands as tools, through Heaven's MCP server.

Overview

Each command the API serves is an MCP tool with the same fields. A tool is named after its command, with _ for spaces: create, pool_view, snapshot_create. A tool call runs exactly as its endpoint does, with the same permissions, limits and errors, and returns the endpoint's JSON.

ServerForSigns in with
https://heaven.dev/mcpHosted clients, such as Claude.aiOAuth in the browser, or an API key header
heaven mcpClients on your own computer, such as Claude CodeThe heaven program's sign-in or HEAVEN_API_KEY, or else your SSH key

Hosted clients

Add a custom connector with this address. The client sends you to Heaven to sign in and approve it. Then it acts as you, with every tool.

Server URL
https://heaven.dev/mcp

Each approval is listed with your API keys under the client's name, and api-key remove disconnects it. Its access token lasts an hour. It refreshes for up to 30 days after its last use, and for at most a year in all. A refresh token works once, and sending it again ends the sign-in. Each approval counts as one of the 1,000 API keys you can hold.

With an API key instead

A client that takes a fixed header can use an API key. It sees only the tools whose commands the key names, plus feedback and command_view.

Header
Authorization: Bearer heaven1.…

The hosted server doesn't accept tokens signed with an SSH key. Use heaven mcp for those.

Local clients

Install the heaven program, sign in once, and add it to your agents. It uses the program's sign-in, or HEAVEN_API_KEY when it's set. With neither, it uses your computer's SSH key.

Terminal
curl -fsSL https://heaven.dev/install | sh
heaven login
heaven mcp install

heaven mcp install adds a server named heaven to each agent it finds on your computer: Claude Code, Codex, Gemini CLI, Claude Desktop, Cursor and VS Code. To choose agents, name them, as in heaven mcp install claude codex. Running it again replaces that server and changes nothing else. An agent that's already running picks it up when it next starts. For any other agent, add a stdio server whose command is heaven mcp. You don't run heaven mcp yourself; the agent starts it.

Through heaven mcp, file tools also take a local path of any size. A sign-in that expired or was revoked returns denied, with a message to run heaven login.

How tools behave