ai-caller-mcp
Integrates with ElevenLabs voice agents to place outbound calls in the user's cloned voice and retrieve call transcripts and recent call history.
Places outbound calls through the user's Twilio account using a verified mobile caller ID, with ElevenLabs handling the voice agent.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
ai-caller
Let ChatGPT or Claude phone people in your own cloned voice, from your own mobile number.
You tell your assistant "call Alex and ask when he's free for a climb on Saturday". It calls a tool on this server, and an ElevenLabs voice agent speaking in your cloned voice rings Alex. Alex's phone shows your mobile number. When the call ends, the assistant reads the transcript and tells you what was agreed.
ChatGPT / Claude ──MCP──▶ mcp_server.py (Cloud Run) ──API──▶ ElevenLabs agent (your voice)
│ native Twilio integration
▼
Twilio, From = your verified mobile ──▶ the person's phoneNo server of ours sits in the audio path: ElevenLabs places the call through your Twilio account. The MCP server only starts calls, reads transcripts and keeps a small phone book.
It was built and tested in New Zealand, so phone numbers are checked as NZ numbers
(callerid_test.normalise_nz). To call elsewhere, change that function and the +64 check in
phonebook.py.
Use it responsibly. The agent is told never to claim to be human when sincerely asked. Check the rules on automated calls, AI disclosure and recording where you live. Only call people who would be fine getting a call from you.
What's in the repo
File | What it does |
| Phase 0: proves Twilio calls show your number (verify the caller ID, place a test call, log what the phone showed). |
| Phase 1: CLI for ElevenLabs (list voices and numbers, import your Twilio number, create or update the agent, place a call). |
| Phase 2: the remote MCP server (FastMCP), with Google sign-in for ChatGPT and Claude. Tools: |
| Named contacts, so you can say "call Alex". |
| Reads credentials from environment variables or the OS keyring. Nothing secret lives in the repo. |
| The agent's system prompt. Each call's brief is passed in as |
| Cloud Run service, Firestore, Secret Manager and Artifact Registry on Google Cloud. |
| Puts your ElevenLabs key and Google OAuth secret into Secret Manager at a hidden prompt. |
| Offline tests (fake Twilio and ElevenLabs): |
Related MCP server: elevenlabs-call-mcp
What you need
A paid Twilio account. Trial accounts call only verified numbers and show a Twilio number, which defeats the point. Verified caller IDs live in the US1 region, so the call is routed through the US.
An ElevenLabs account on a plan with Agents and Instant Voice Cloning.
For ChatGPT or Claude: a Google Cloud project with billing (Cloud Run scales to zero; at one person's use the bill is about cents), plus
gcloudandterraform.Python 3.12 or newer.
git clone https://github.com/<you>/ai-caller && cd ai-caller
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements-dev.txt
pytest tests # offline, no credentials neededCredentials are read by credentials.py: an environment variable (TWILIO_ACCOUNT_SID,
TWILIO_AUTH_TOKEN, ELEVENLABS_API_KEY), or the OS keyring:
python credentials.py set twilio/account_sid # hidden prompt
python credentials.py set twilio/auth_token
python credentials.py set elevenlabs/api_keySet your name once. The agent uses it ("Hi, it's Alex's AI assistant"):
export AI_CALLER_OWNER_NAME=AlexPhase 0: does a call show your number?
Mobile numbers usually can't be ported to a programmable carrier. Twilio's verified outgoing
caller ID is the route: you prove you own the number, then Twilio may send it as From. Whether
the other side's phone shows it depends on the carriers, so test before building anything on top.
Twilio Console → Voice → Settings → Geo permissions: allow your country.
Run:
python callerid_test.py account # Trial or Full?
python callerid_test.py verify 021XXXXXXX # Twilio calls you; type the code it prints
python callerid_test.py call --to 027YYYYYYY --network spark
python callerid_test.py result CA... shown # or hidden / other-number / blocked / not-answered
python callerid_test.py log--dry-run (before the command) prints requests without sending them. Results go to
data/callerid_tests.jsonl (gitignored). In NZ, a call to a 020 mobile showed the owner's number.
Phase 1: a voice agent in your voice
ElevenLabs → Voices → Instant Voice Clone: record or upload 1–2 minutes of clean speech.
Import your verified number into ElevenLabs and create the agent:
python voice_agent.py voices # your clone's voice_id
python voice_agent.py import-number +6421XXXXXXX # uses the Twilio SID + token
python voice_agent.py numbers # note the phnum_... id
python voice_agent.py create-agent --voice-id <voice_id> \
--name "MCP caller (my voice)" \
--prompt-file prompts/mcp_base.txt \
--first-message "{{opening_line}}" \
--tts-model eleven_v4_turbo
python voice_agent.py agents # note the agent_... idcreate-agent sets up what was learned the hard way:
Model: Claude Haiku 5.5 with no reasoning. In a text-only test it started replying in 0.3–0.5 s, against 0.4–1.5 s for Sonnet 5.5. DeepSeek was fastest but once went silent on a real call.
Backup models: GPT-5.4 mini, then Gemini 3.5 Flash, from other providers. They take over if the main model hasn't started answering after 2 s (ElevenLabs' default is 4 s).
Turn-taking:
eager, so the agent replies as soon as the caller seems done. It may occasionally jump into a mid-sentence pause.Built-in tools:
end_callandplay_keypad_touch_tone(DTMF). New ElevenLabs agents have every tool off, and an agent that can't press keys gets stuck on a voicemail's "press 1 to send".TTS model: English agents accept only
eleven_turbo_v2,eleven_flash_v2andeleven_v4_turbo. v4 turbo sounded most like the owner.
An existing agent can be brought up to date with python voice_agent.py update-agent --agent-id agent_... --prompt-file prompts/mcp_base.txt.
A first call to yourself, with no server involved (the built-in test prompt):
python voice_agent.py create-agent --voice-id <voice_id> # test agent, remembered in data/agent.json
python voice_agent.py call --to 021XXXXXXXPhase 2: the MCP server for ChatGPT and Claude
Run it locally (no sign-in)
export AI_CALLER_NO_AUTH=1 AI_CALLER_AGENT_ID=agent_... AI_CALLER_PHONE_NUMBER_ID=phnum_...
python mcp_server.py # http://127.0.0.1:8765/mcpTry it with the MCP Inspector (npx @modelcontextprotocol/inspector) or any local MCP client. In
this mode the phone book lives in memory.
Deploy to Google Cloud
Infrastructure. Copy
terraform/terraform.tfvars.exampletoterraform/terraform.tfvars(gitignored), fill it in, then:cd terraform && terraform init && terraform applyThis creates the Cloud Run service
ai-caller-mcp(running a placeholder image), its service account, the Firestore databaseai-caller, Secret Manager secrets (two generated keys plus placeholders for the two you supply), an Artifact Registry repository and public invoker access. The app's own OAuth rejects everyone else. Note the outputsai_caller_mcp_url,ai_caller_google_redirect_uriandimage.Google sign-in. In Google Cloud Console → Google Auth Platform:
Branding and Audience: External; add your Gmail address as a test user, or publish the app. The
openid+emailscopes need no verification, and apps left in "Testing" may have their refresh tokens expired.Clients → Create → Web application. Authorized JavaScript origin: the service URL. Authorized redirect URI:
ai_caller_google_redirect_uri, exactly.
Put the client ID into
ai_caller_google_oauth_client_idinterraform.tfvarsand runterraform applyagain.Secrets. Paste the ElevenLabs key and the Google client secret at hidden prompts:
PROJECT=my-gcp-project REGION=australia-southeast1 scripts/push_secrets.shBuild and deploy the image:
IMAGE=$(terraform -chdir=terraform output -raw image) gcloud builds submit --tag "$IMAGE" . gcloud run deploy ai-caller-mcp --image "$IMAGE" --region australia-southeast1 curl "$(terraform -chdir=terraform output -raw ai_caller_mcp_url | sed 's#/mcp$##')/api/healthz"Use
/api/healthz, not/healthz: Google's front end answers the bare/healthzpath on*.run.appitself, with a 404.Connect.
ChatGPT: Plugins → + → Add custom MCP server. URL:
ai_caller_mcp_url(ends in/mcp). Auth: OAuth. Sign in with Google.Claude: Settings → Connectors → Add custom connector, same URL.
ChatGPT asks you to confirm every
place_call, because the tool is marked destructive.
How the server behaves
Sign-in: OAuth 2.1 served by the app itself (FastMCP
GoogleProvider). It has to be an OAuth proxy, because Google offers no dynamic client registration. Tokens work only for verified Google accounts listed inAI_CALLER_ALLOWED_EMAILS; everyone else gets 401. Only ChatGPT, Claude and localhost callback URLs are accepted.State: OAuth registrations and the phone book are Fernet-encrypted in Firestore. Without this, every cold start would force ChatGPT to reconnect.
Stateless HTTP: Cloud Run scales to zero, and a new instance knows no MCP session ids. With sessions on, ChatGPT's reconnect got 404 "session not found" and the connector showed as disconnected, so the server runs with
stateless_http=True.Firestore keys: ChatGPT identifies itself with a URL as
client_id. Firestore treats/in a document id as a path separator, so the store's key sanitizer is switched on.One instance:
max_instance_count = 1, because the OAuth proxy's refresh-token replay protection is per process.
Writing a good brief
The assistant writes the brief, and the brief is the whole job description for the call. Good briefs:
say who is being called and why, in the second person ("You are calling Alex to…");
give the facts the caller may use (dates, places, a booking reference) and say what it must not promise;
include any numbers to key in on a phone menu. The agent presses keys itself, but only enters codes given in the brief;
keep the call in one language, unless the person on the other end prefers another.
Costs
You pay Twilio per minute (an outbound call to a mobile, from the US1 region), ElevenLabs credits per minute of agent conversation, and the LLM usage ElevenLabs bills through. Cloud Run, Firestore and Secret Manager cost cents at personal use.
License
MIT, see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Run EchoCall AI phone and chat agents from ChatGPT or Claude: calls, agents, knowledge and numbers.
Give any AI agent a phone: make and answer calls, get through phone menus, and send texts.
Let AI agents place real phone calls from your verified number, with transcripts and recordings.
Lets Claude, Cursor or any MCP client build voice agents and place real phone calls.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to make real phone calls on your behalf using VoIP, handling conversations automatically through OpenAI's Real-Time Voice API. Simply tell Claude what you want to accomplish and it will call and manage the entire conversation for you.25MIT
- FlicenseNot gradedqualityDmaintenanceEnables Poke to place real outbound phone calls using ElevenLabs Conversational AI and Twilio, with tools to manage calls and receive summaries.1-
- AlicenseNot gradedqualityCmaintenanceEnables Claude to make and manage real phone calls through Twilio, allowing it to think, search, and respond in real-time conversations.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to place phone calls and send SMS via Twilio with plan-then-confirm safety, dry-run mode, number allowlists, calling-hour guards, and an audit log.2MIT