Claude Code

View as Markdown

Drop the Dial skill into your Claude Code config so the agent learns how to drive the dial CLI on demand. Once installed, Claude Code can send messages, place calls, and wait for events without you re-explaining the surface.

Install

Two ways to give Claude Code access to Dial: drop in the CLI skill (Option 1), which teaches the agent to drive the dial CLI, or connect Dial’s MCP server (Option 2), which exposes Dial’s tools to the agent natively. Pick either — they work the same once installed.

First, get the dial CLI on your PATH:

$curl -fsSL https://getdial.ai/install | bash

Then drop the Claude Code-specific Dial skill into your config:

$dial onboard --code <code> --agent claude-code

onboard finishes verification first, then copies the Dial skill into Claude Code’s standard config directory. Re-run the command anytime (after a CLI upgrade, for example) to overwrite the skill in place — the verification step is a no-op once you’re onboarded.

What gets installed is a single markdown skill describing the dial CLI — its commands, flags, and conventions, mirroring the CLI reference. Claude Code loads the skill when a Dial-related task comes up; nothing else is touched.

Option 2 — MCP server

Connect Dial’s MCP server instead, and Claude Code calls Dial’s tools directly. The local transport runs npx -y @getdial/cli mcp over stdio and reuses your saved CLI key; the remote transport is an HTTP URL with browser-based OAuth.

$# Local (stdio) — reuses the saved CLI key, current project only (default scope)
$claude mcp add dial -- npx -y @getdial/cli mcp
$
$# Global — same command, available across all your projects
$claude mcp add --scope user dial -- npx -y @getdial/cli mcp
$
$# Remote (Streamable HTTP, OAuth in browser) — run /mcp afterwards to sign in
$claude mcp add --transport http dial https://getdial.ai/mcp

See the MCP page for the full tool list and the remote OAuth flow, and Claude Code’s MCP docs for scopes and config-file details.

Use it

Both install paths work the same way — just ask in plain language:

Send an SMS to +14155550123 with the body “running late, ETA 10 min”.

With the MCP server, Claude Code calls Dial’s tools directly (no CLI shell-out); with the skill, it picks the right dial command and runs it. Either way you describe the task and the agent handles the rest. See Using Dial from an agent for more examples.

Inbound event handling (Suggestion)

You can also wake Claude Code automatically when a Dial event arrives by wiring a CLI command target: for each inbound event, the listen daemon spawns a handler that delivers a fresh prompt to Claude Code.

First install the listen daemon:

$dial listen install

1. Write a handler

$#!/usr/bin/env bash
$# /usr/local/bin/handle-dial-event-claude
$event="$1"
$
$type=$(jq -r '.type' <<<"$event")
$from=$(jq -r '.from // ""' <<<"$event")
$body=$(jq -r '.body // ""' <<<"$event")
$
$prompt=$(cat <<EOF
>A Dial event just arrived. Decide what to do and act on it.
>
> type: $type
> from: $from
> body: $body
>
>raw event JSON:
>$event
>EOF
>)
$
$# Detach a fresh Claude Code session and return right away.
$nohup claude -p "$prompt" </dev/null >>~/.dial/claude-code.log 2>&1 &
$disown
$exit 0

2. Register

$chmod +x /usr/local/bin/handle-dial-event-claude
$dial local-target add cmd /usr/local/bin/handle-dial-event-claude

The nohup … & disown pattern keeps Claude Code running after the handler exits, so a multi-minute agent run never collides with the daemon’s per-attempt --timeout. See CLI command target for the full reference, delivery semantics, and the once-retry behavior.