A Cloudflare Worker that acts as an MCP server for Poke, enabling AI-powered outbound phone calls via ElevenLabs Conversational AI.
The agent introduces itself as your personal assistant, makes calls on your behalf, and can transfer callers to you when needed.
- A Cloudflare account
- An ElevenLabs account with Conversational AI access
- A Twilio phone number linked to your ElevenLabs account
- Node.js installed locally
git clone https://github.com/ilyesm/poke-calls.git
cd poke-calls
npm installCopy .dev.vars.example to .dev.vars and fill in your values:
cp .dev.vars.example .dev.vars| Variable | Description |
|---|---|
ELEVENLABS_API_KEY |
Your ElevenLabs API key (from Profile > API Keys) |
ELEVENLABS_AGENT_ID |
Your ElevenLabs Conversational AI agent ID |
ELEVENLABS_PHONE_NUMBER_ID |
The Twilio phone number ID linked in ElevenLabs |
TRANSFER_NUMBER |
Your phone number in E.164 format (e.g. +15551234567) — calls transfer here when the caller asks for a human |
USER_NAME |
Your name — the agent introduces itself as "[name]'s assistant" |
MCP_AUTH_TOKEN |
A shared secret to authenticate Poke. Generate one with openssl rand -hex 32 |
In your ElevenLabs Conversational AI agent, add these two tools:
end_call— Ends the calltransfer_to_human(ortransfer_to_number) — Transfers the call to a phone number
The worker overrides the agent's system prompt and greeting at call time, so the agent's default prompt in ElevenLabs doesn't matter much.
npm run deployThen set all secrets for production:
wrangler secret put ELEVENLABS_API_KEY
wrangler secret put ELEVENLABS_AGENT_ID
wrangler secret put ELEVENLABS_PHONE_NUMBER_ID
wrangler secret put TRANSFER_NUMBER
wrangler secret put USER_NAME
wrangler secret put MCP_AUTH_TOKENYour worker will be live at https://poke-calls.<your-subdomain>.workers.dev.
Add a custom MCP integration in Poke:
- URL:
https://poke-calls.<your-subdomain>.workers.dev/mcp - Auth token: The same
MCP_AUTH_TOKENyou set above
Initiates an AI voice call.
| Parameter | Required | Description |
|---|---|---|
to_number |
Yes | Phone number in E.164 format |
contact_name |
Yes | Name of the person being called |
objective |
Yes | What the call should achieve |
context |
No | Background on this contact or situation |
language |
No | Call language (defaults to English) |
first_message |
No | Custom greeting to open the call with |
Retrieves the result of a completed call.
| Parameter | Required | Description |
|---|---|---|
conversation_id |
Yes | The ID returned by make_outbound_call |
Returns one of: SUCCESS, FAILURE, TRANSFER, or PENDING.
npm run dev| Route | Method | Description |
|---|---|---|
/mcp or / |
POST |
MCP JSON-RPC endpoint |
/health |
GET |
Health check |