Hail MCP Server
io.github.hail-hq/hail-mcp
Give your AI agent a real phone number and email inbox — voice calls, SMS, and email via one MCP endpoint.
What is the Hail MCP server?
The Hail MCP server provides AI agents with phone, SMS, and email capabilities through a single remote endpoint. It handles voice calls with STT/TTS, SMS messaging, and email delivery, with pluggable LLM support and optional self-hosting via Docker Compose.
Hail enables AI agents to make outbound voice calls, send and receive SMS messages, and send emails without complex integrations. It abstracts away telephony infrastructure (Twilio, Telnyx, DIDWW), voice processing (Deepgram, Cartesia, ElevenLabs), and email delivery (AWS SES), letting agents focus on conversation logic. Use it to automate appointment confirmations, customer outreach, notifications, and two-way communication workflows.
How to install Hail
Copy-paste configuration for popular MCP clients.
Tools & capabilities
Tools this server exposes to the agent.
call— Make outbound voice calls with AI-driven conversation, STT/TTS, and turn detection across 39 languagessms— Send and receive SMS messages with recipient consent tracking and opt-out list managementemail— Send and receive emails with custom domain support, DKIM, and attachment handlingnumbers— Acquire and manage dedicated phone numbers with live carrier quotes and verificationcontacts— Manage organization contact directoryproviders— Configure pluggable LLM, STT, and TTS endpoints (OpenAI-compatible or bundled fallback)tail— Stream live events across calls, SMS, and emails for real-time monitoring
Use cases
- Automate appointment confirmations and rescheduling via voice calls
- Send bulk SMS notifications or alerts with two-way reply handling
- Conduct outbound customer surveys or support calls with AI-driven conversation
- Receive inbound emails and SMS on custom domains and phone numbers
- Monitor and log all communication events in real-time across channels
Hail MCP server FAQ
Hail is an MCP server that gives AI agents access to phone calls, SMS, and email. It handles the entire communication stack—voice processing, carrier integration, and delivery—so your agent can focus on conversation logic.
Hail is open source (AGPL-3.0) and self-hostable with Docker Compose. Hail Cloud (managed at hail.so) is a paid service; self-hosting requires external provider accounts (Twilio/Telnyx for voice/SMS, AWS SES for email, LiveKit Cloud for voice infrastructure).
Connect to the remote MCP endpoint at https://mcp.hail.so (Hail Cloud) or your self-hosted instance URL. Authenticate with an API key via OAuth (Hail Cloud) or environment variables (self-host). See the MCP setup guide at hail.so/docs/mcp.
No. Hail includes a fallback chain (OpenAI → Gemini → Anthropic) for voice calls. You can also bring your own OpenAI-compatible endpoint per call or organization-wide.
Voice: Twilio, Telnyx, DIDWW (outbound only). SMS: Twilio, Telnyx (inbound and outbound). Email: AWS SES. STT: Deepgram, Speechmatics. TTS: Cartesia, ElevenLabs. Voice infrastructure: LiveKit Cloud.
Yes. Hail runs on Docker Compose with bundled Postgres for local evaluation. Production self-hosting requires a managed Postgres, domain, HTTPS, and external accounts for LiveKit Cloud and communication providers. See docs/public/self-host/README.md.
README (reference)
Source of truth, from the repository.
Hail
Give your agent a real phone number and an email inbox — in minutes, not days.
Your agent needs to call a person to move an appointment. Hail connects to the telephone carrier and runs the voice pipeline — STT, TTS, turn detection. Your agent is the brain: point Hail at any OpenAI-compatible endpoint (bring your own LLM), or let Hail's fallback chain (OpenAI → Gemini → Anthropic) do the talking. SMS and email work the same way — one MCP endpoint, one API key, one invoice.
Self-hostable with Docker Compose; LiveKit Cloud and the communication providers remain external. Open source under AGPLv3.

Self-host quick start
Prerequisites: Git, Docker Engine, and Docker Compose v2. For a public production deployment you also need a domain, HTTPS, and a managed Postgres; start with the VM deployment guide.
The commands below run a local evaluation stack with bundled Postgres. Voice calls additionally require LiveKit Cloud, a carrier (Twilio, Telnyx or DIDWW), Deepgram, Cartesia, and at least one LLM provider. Email is optional and requires AWS SES.
git clone https://github.com/hail-hq/hail
cd hail
cp .env.example .env
# Generate a shared self-host key, then put it in .env as HAIL_API_KEY.
printf 'hk_%s\n' "$(openssl rand -base64 32 | tr -d '/+=' | head -c 40)"
# Edit .env and add the providers required for the channels you will use.
docker compose -f docker-compose.yml -f docker-compose.local.yml \
run --rm api alembic upgrade head
docker compose -f docker-compose.yml -f docker-compose.local.yml up -d
docker compose -f docker-compose.yml -f docker-compose.local.yml ps
curl --fail http://localhost:8080/healthz
Self-host authentication uses the HAIL_API_KEY value from .env; it does not
need an API-key row in Postgres. Export the same key and API URL in the shell
where you use the CLI or SDK (Compose does not export .env into your shell):
export HAIL_API_URL=http://localhost:8080
export HAIL_API_KEY='<same value as .env>'
Next, follow LiveKit Cloud and Twilio (optionally Telnyx and DIDWW), then bind a phone number to the self-host organization using the first-run setup. To enable email, follow AWS SES.
Authentication differs by deployment:
- Hail Cloud (managed, at hail.so): run
hail login. The device flow writes a key to~/.hail/credentials.json. - Self-host: do not run
hail login; setHAIL_API_URLandHAIL_API_KEYas shown above, or pass--api-urland--api-key.
Full setup guides: self-hosting · Webhooks · MCP · operations
Install the CLI
On macOS or Linux with Homebrew:
brew install hail-hq/tap/hail
hail version
Homebrew adds the hail-hq/tap tap automatically. To update later:
brew upgrade hail-hq/tap/hail
Alternatively, download the archive for your operating system and architecture from GitHub Releases. Release binaries are available for macOS and Linux on Intel and ARM64. See the CLI reference for authentication and commands.
Make your first call
CLI:
hail login # Hail Cloud only (device flow)
hail auth logout # remove local credentials
hail auth token # print bare API key for scripting
hail call +14155550100 --prompt "be brief" --recipient-consent
hail call list
hail call status <id> # one call's state
hail call tail <id> # follow events for one call
hail sms +15551234567 --body "Hello!" --recipient-consent
hail sms list
hail sms status <id>
hail sms suppressions list # opt-out list
hail sms sender-id get # custom sender ID
hail numbers acquire # dedicated phone number (voice + SMS), cheapest live offer
hail numbers list
hail contacts list # org contact directory
hail email send --to a@b.com --subject hi --body "hello" --recipient-consent
hail email list
hail email get <id>
hail email tail <id> # follow events for one email
hail email raw <id> # RFC 5322 source
hail email attachment <id> <att-id> --output file.pdf
hail email domain register --kind hail_mail
hail email domain register --kind custom --domain acme.com # send + receive on your own domain
hail email domain list
printf '%s' "$YOUR_API_KEY" | hail providers set llm \
--provider openai-compatible \
--base-url https://api.your-agent.dev/v1 \
--model your-model \
--key - # standing BYO brain (also: tts, stt)
hail tail # cross-channel event stream
hail tail call:<id> # narrow by resource type
hail mcp endpoint # Streamable HTTP URL for the MCP server
hail completion zsh # source <(hail completion zsh)
hail version
Python (pip install hail-sdk):
import asyncio
from hail import Client
async def main():
async with Client() as client: # reads $HAIL_API_KEY
call = await client.calls.create(
to="+15551234567",
recipient_consent=True,
system_prompt="You are calling to confirm a reschedule.",
)
async for event in client.events.tail(id=f"call:{call.id}"):
print(event.kind, event.payload)
asyncio.run(main())
HTTP (OpenAPI spec, API reference):
curl -X POST http://localhost:8080/v1/calls \
-H "Authorization: Bearer $HAIL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"to":"+15551234567","recipient_consent":true,"system_prompt":"..."}'
MCP (Claude.ai, Claude Code, ChatGPT, Cursor, …): local clients can use
http://localhost:8081. Web-based clients require a publicly reachable HTTPS
endpoint. See the MCP setup guide.
Bring your own LLM
Hail always runs the telephony and the voice pipeline. The brain is pluggable, at two levels:
- Per call — pass an
llmblock toPOST /calls; different brains for different calls. - Standing — save an endpoint once (
hail providers set llm …); every call your org places uses it.
Any OpenAI chat-completions-compatible endpoint works. A complete runnable example lives in docs/public/byo-llm.md. TTS and STT are pluggable the same way (hail providers set tts|stt …).
Tenets
- Clear comms. Explicit OpenAPI contracts. No hidden behavior.
- Simple code. Boring is best. No abstraction before it has two uses.
- Brief docs. Each page fits on one screen. Setup takes 10 minutes from a fresh clone.
- Self-hostable. Docker Compose runs Hail's API, voicebot, MCP server, and Postgres; LiveKit Cloud and channel providers remain external.
- Pluggable brain. BYO LLM endpoint, or Hail's bundled fallback. The voice pipeline and transport are always Hail's.
- Agent-first docs. AI agents are first-class readers. Runnable examples first; links to canonical sources, not paraphrase.
Milestones
A checked box is a released feature. Per-artifact changelogs (GitHub Releases for the CLI, PyPI notes for the SDK) record which version shipped it.
Phone calls
- Outbound
- Twilio
- Telnyx
- DIDWW
- Inbound
- Twilio
SMS
- Outbound
- Twilio
- Telnyx
- Inbound
- Twilio
- Telnyx
Numbers
- Live quotes across carriers (inventory, price, verification effort)
- Carrier verification for regulated countries (Twilio, Telnyx)
- Outbound
- AWS SES
- Custom sender domains (own DNS, automatic DKIM + MAIL FROM)
- Inbound
- AWS SES
- Custom domains (receive on verified domains)
Voice pipeline
- Languages
- 39 call languages with automatic STT routing and per-language turn detection — see docs/languages.md
- STT
- Deepgram
- Speechmatics
- Whisper
- AssemblyAI
- TTS
- Cartesia
- ElevenLabs
- Deepgram Aura
- VAD
- Silero
- Turn detection
- LiveKit turn-detector
- LLM — system-prompt mode
- Fallback: OpenAI → Gemini → Anthropic, fast models
- LLM — BYO-endpoint mode
- OpenAI chat-completions-compatible (docs)
- Recording
- S3 upload
- Diarization
Distribution
- API
- OpenAPI spec + hosted reference
- CLI
-
hailbinary via GitHub Releases
-
- MCP server
- Remote Streamable HTTP endpoint included with each Hail deployment
PyPI stdio package— deliberately not shipped; see MCP setup
- Python SDK
-
hail-sdkon PyPI, imports ashail
-
Infrastructure
- Docker Compose scaffold
- Self-hosted LiveKit SFU
- docker compose integration
Architecture
The path of an outbound call:
AI agent ──► Hail API ──dispatch──► Voicebot ──► LiveKit Cloud ──SIP──► carrier (Twilio · Telnyx · DIDWW) ──► 📞
Full diagram and service breakdown: docs/public/architecture.md. All docs are published at hail.so/docs and live as plain markdown in docs/public/.
Contributing
See docs/public/contributing.md. Short version: fork, branch, conventional commits, pull request. Provider adapters go in core/hailhq/core/providers/; new env vars update .env.example in the same commit.
License
Code: AGPL-3.0-or-later — run a modified Hail as a service, release your source.
Pricing dataset (costs/): CC-BY-4.0 — use the JSON with attribution.
Related MCP servers
Virtual bar for AI agents: enter venues, order drinks, chat, pay in x402 USDC. No real alcohol.

HPSILab Quant Finance
HPSILab Quant finance MCP for US stocks, ETFs, options, Monte Carlo, backtesting, and risk analysis.

io.github.hakimelek/monarchmoney
Monarch Money API client with 30 MCP tools for accounts, transactions, budgets, and cashflow.

Lambë
Shape-aware query language for structured data — JSON, YAML, TOML, HCL, CSV, Markdown.

Run Python
Run Python code from natural language prompts, with optional PyPI package install.