Skip to main content
HEVN CLI ships a built-in Model Context Protocol server. It exposes every CLI command as an MCP tool, so any MCP-speaking coding agent can act on your HEVN account directly — checking balances, creating invoices, sending transfers — without bespoke per-agent integrations or pasted instructions. hevn mcp install registers that server in every agent it detects on your machine, in one command.

Supported agents

Install

Authenticate once, then install:
Restart the agent and ask it something like “what’s my HEVN balance?”. A read runs immediately; a transfer or delete is flagged so the agent asks you to confirm first. Check what was detected and installed:

How it works

  • One adapter, many agents. Every supported agent speaks MCP, so a single server reaches all of them. The installer knows where each agent stores its config (mcpServers JSON for most, a [mcp_servers.hevn] table for Codex) and writes the entry in place, preserving everything else.
  • The agent learns hevn automatically. The packaged agent guide (hevn agent-skill) is served as the MCP server’s instructions, and each tool carries the command’s schema and help. You don’t configure prompts per agent.
  • Reuses the CLI verbatim. A tool call shells out to hevn with --json --non-interactive, so authentication, dry-run previews, idempotency, and the structured {ok, …} envelope behave exactly as they do on the command line.
  • Danger levels drive confirmation. Each command’s danger level becomes an MCP annotation: reads are marked read-only, while mutate, destructive, and money commands are flagged so the host prompts for approval. Transfers remain bounded by your on-chain spend permission regardless of the agent.

Authentication

By default no API key is written into agent configs. hevn mcp serve reads the credential saved by hevn login, just like every other CLI command, so your key stays in one place. If a tool call comes back with AUTH_REQUIRED or AUTH_INVALID (no key yet, or an expired one), the agent can sign you in itself: it calls the login tool, which opens your browser to HEVN and saves the new credential locally — the server runs on your machine, so the browser flow works just like hevn login. Pass api_key to that tool to save an existing hvn_ key instead of opening a browser. There is also a logout tool to clear the saved credential. Use --with-key to embed the current HEVN_API_KEY in each config when you need a self-contained setup (for example, a different machine or user):
--with-key writes your API key into each agent’s config file in plaintext. Prefer the default (hevn login) on shared machines.

Targeting and removal

Manual configuration

hevn mcp install is just a convenience over the standard MCP server config. To wire an agent up by hand, add an stdio server that runs hevn mcp serve:
For Codex (TOML):
Use an absolute path to hevn (for example /opt/homebrew/bin/hevn) if your agent launches with a minimal PATH. hevn mcp install resolves this for you.