Open in
Use ThunderPhone as an MCP server
Build, test, validate, and operate ThunderPhone voice agents from Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code, or another Streamable HTTP MCP client.
ThunderPhone exposes a Streamable HTTP Model Context Protocol server at:
https://api.thunderphone.com/v1/mcpThis is the opposite direction from connecting a remote MCP server to a voice agent:
| Direction | Result |
|---|---|
| Remote MCP server → ThunderPhone agent | A voice agent can call the remote server's tools. |
| ThunderPhone → your MCP client | Your coding agent can build, test, and operate ThunderPhone. |
Authenticate
Use OAuth by default for directory clients: sign in, choose an organization, and approve the requested permissions. Disconnect it under Settings → Security → Apps you connected. Changing or resetting your password, or changing your account email, also revokes the connection, so reconnect the client afterwards.
For clients configured with an API key, create an sk_live_ key under Integrations → API keys and expose it to your MCP client as THUNDERPHONE_API_KEY. The key is bound to one organization; an id owned by another organization behaves as not found.
Organizations that handle PHI
If your organization's calls may contain protected health information (PHI),
because you have a BAA with ThunderPhone or your agents are designated as
processing PHI, the URL above never returns call content: transcripts,
recordings, grades, call lists, exports, campaign outcomes, call analytics and
insights, conversations and test scenarios built from real calls, and replay results. Those tools return an error with
code: "phi_content_unavailable". Building, testing and configuring agents
works as usual.
That URL is the one listed in public assistant directories, which may not carry PHI. If your organization has its own BAA with an assistant's provider covering the workspace you use:
- An organization admin opens Settings → All settings → Privacy & data → AI assistant access in ThunderPhone and confirms that coverage. (In the old view it is under Organization → General.)
- Connect the assistant as a custom connector with this URL instead:
https://api.thunderphone.com/v1/mcp/baaCall content is then available there, including calls that may contain PHI. Withdrawing the confirmation stops it on the assistant's next request. A call your organization handled as not containing PHI is available at either URL.
Plugins
A plugin adds this server, signed in with OAuth, plus skills: instructions that teach the assistant how to work with ThunderPhone, such as building a draft first, letting you hear it through a talk link, and asking before anything costs money or goes live. Directory plugins never ask for or read an API key.
- Claude. The ThunderPhone plugin in Claude's plugin directory. Its
skills cover a first agent (
get-started), building, changing and testing agents, getting a number, calling one person, knowledge, troubleshooting, and moving agents from Vapi, Retell, ElevenLabs or Bland. After you connect, ThunderPhone also gives you a first message to send and can open a new Claude chat with it typed in. It has no campaign skill, since Claude's tool set has no campaign tools (see What is different in Claude). - ChatGPT and Codex. The ThunderPhone plugin in their app directory: the same server and skills, plus one for campaigns.
- The skill pack on GitHub. Claude Code and Codex can also install the full pack from thunderphone/skills, which adds REST skills that use an API key:
# Claude Code
/plugin marketplace add thunderphone/skills
/plugin install thunderphone@thunderphone-skills
# Codex
codex plugin marketplace add thunderphone/skills
codex plugin add thunderphone@thunderphone-skillsCLI and stdio alternatives
The ThunderPhone CLI can write client configuration while preserving unrelated servers:
npx -y @thunderphone/mcp setup --client cursor --api-key-env THUNDERPHONE_API_KEY
npx thunderphone mcp setup --client claude-desktop --scope userAfter a global install of @thunderphone/mcp, use thunderphone-mcp setup with the
same options. Setup supports Claude Code, Codex, Cursor, VS Code, Gemini, Claude
Desktop and Windsurf. Direct HTTP is preferred; Desktop uses stdio.
For any stdio-capable client, configure command: "npx" with
args: ["-y", "@thunderphone/mcp"]. The wrapper uses THUNDERPHONE_API_KEY first,
then credentials from thunderphone login, refreshing expired tokens, then
OAuth through mcp-remote. Direct HTTP configurations do not read
the CLI credential store; use the stdio wrapper to reuse device login.
These are alternatives to the manual client configurations below.
Client configuration
Claude and ChatGPT sign in with OAuth; no API key is involved. If you do not have a ThunderPhone account yet, choose Create account on the sign-in page and you return to the approval screen after verifying your email.
Claude (web, desktop, and mobile)
- Open Customize → Connectors (Settings → Connectors in older versions). If ThunderPhone appears in the connector directory, select it. Otherwise choose Add custom connector, name it
ThunderPhone, and enterhttps://api.thunderphone.com/v1/mcp. - Select Connect, sign in to ThunderPhone, pick the organization, and approve the permissions. The approval page shows a first message to send Claude and copies it for you; a ThunderPhone tab then waits for the connection and offers Start your first chat, a new Claude chat with that message typed in.
- In a chat, enable ThunderPhone from the tools menu and ask for what you need, for example "List my agents".
Claude asks before it uses each tool for the first time. To skip most of those prompts, open Customize → Connectors → ThunderPhone and set Read-only tools to always allow. Those tools only look things up: agents, calls, transcripts, balances, docs. Leave Write/delete tools on approval if you want to see each change before it happens.
Custom connectors need a paid Claude plan. On Team and Enterprise plans an owner adds the connector under the organization's connector settings first, then each member connects their own ThunderPhone account.
What is different in Claude
Claude connected with OAuth (the connector, the Claude plugin, or Claude Code signed in with OAuth) gets a narrower tool set, following the Claude directory's policy. Claude Code configured with an API key gets the full set.
- Every call and text is confirmed one at a time.
place_callandsend_smsfirst return a preview (the agent, the from and to numbers, and for a text the message) plus aconfirmation_token; nothing is placed or sent until Claude repeats the request with the token after your yes. - No campaign management.
create_campaign,add_campaign_contactsandcampaign_actionare not available; create, load and start campaigns on the Campaigns page in ThunderPhone.list_campaigns,get_campaign_statsandcheck_campaignstill work. - No
test_integration. Test an API's request from its page in ThunderPhone (Integrations → APIs & MCP, then Test). preview_voiceplays a sample, never custom text. A voice with a ready-made sample plays that sample, free, with no balance needed. Any other voice speaks a fixed greeting in the language you pick.- Toll-free numbers. Claude also gets
search_toll_free_numbers(optionalstarts_with, like888, andcontains, letters or digits likeFLOWERS; read-only), which lists up to 10 U.S. and Canada toll-free numbers with their price.provision_phone_numberthen takestoll_freetrue and thenumberpicked. Its preview states the monthly price, the one-off fee, what incoming minutes cost (callers pay nothing) and that the number has no 911, shows no business name and can't text for now; nothing is bought until Claude repeats the request with theconfirmation_tokenafter your yes. See Toll-free numbers. list_voicesandlist_agentsreturn a summary;get_agenthas an agent's full configuration.list_voicescounts ElevenLabs voices instead of listing them unless you ask for them (category: "elevenlabs") or no other voice fits.
AI disclosure
Every phone call a ThunderPhone agent makes or answers, and every talk-link conversation, opens with a spoken AI disclosure. (A test call you start yourself in the browser skips it.) By default it says "This call is with an AI assistant and will be recorded and transcribed." Turning it off (consent_announcement_enabled false, or ai_live_processing_disclosure_override off) is refused unless an organization admin has first recorded a signed attestation in ThunderPhone, from any client, Claude included.
ChatGPT
- If ThunderPhone appears in the ChatGPT app directory, select it and connect.
- Otherwise open Settings → Apps & Connectors → Advanced settings, turn on Developer mode, and create a connector with the URL
https://api.thunderphone.com/v1/mcpand OAuth authentication. - Sign in to ThunderPhone, pick the organization, and approve the permissions. Add ThunderPhone to a chat from the tools menu.
Deleting an agent or phone number, discarding a draft, launching a campaign, and sending a test request that can write to an external system ask for a second confirmation in either app; see Confirming destructive actions.
Claude Code
claude mcp add --transport http thunderphone https://api.thunderphone.com/v1/mcp \
--header "Authorization: Bearer $THUNDERPHONE_API_KEY"Codex
Add this to ~/.codex/config.toml:
[mcp_servers.thunderphone]
url = "https://api.thunderphone.com/v1/mcp"
bearer_token_env_var = "THUNDERPHONE_API_KEY"Cursor
Create .cursor/mcp.json:
{
"mcpServers": {
"thunderphone": {
"url": "https://api.thunderphone.com/v1/mcp",
"headers": {
"Authorization": "Bearer ${env:THUNDERPHONE_API_KEY}"
}
}
}
}Claude Desktop
Add an mcp-remote bridge to the Claude Desktop configuration:
{
"mcpServers": {
"thunderphone": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://api.thunderphone.com/v1/mcp",
"--header",
"Authorization: Bearer ${THUNDERPHONE_API_KEY}"
],
"env": {
"THUNDERPHONE_API_KEY": "sk_live_YOUR_API_KEY"
}
}
}
}VS Code
Create .vscode/mcp.json and enter the key through VS Code's input prompt:
{
"inputs": [
{
"type": "promptString",
"id": "thunderphone-api-key",
"description": "ThunderPhone organization API key",
"password": true
}
],
"servers": {
"thunderphone": {
"type": "http",
"url": "https://api.thunderphone.com/v1/mcp",
"headers": {
"Authorization": "Bearer ${input:thunderphone-api-key}"
}
}
}
}Tools
Every tool carries MCP annotations. In the tables, R means read-only, D destructive, I idempotent, and O open-world/network interaction. A dash means no hint is set.
Connection
| Tool | Main arguments | Annotations | What it does |
|---|---|---|---|
get_connection_identity | — | R, I | Validates the credential and returns its organization and safe credential metadata. |
Agents
| Tool | Main arguments | Annotations | What it does |
|---|---|---|---|
list_agents | — | R, I | Lists agents. |
get_agent | agent_id | R, I | Gets one agent. |
create_agent | agent configuration | — | Creates an agent. Takes the same settings as update_agent, including steps, handoffs, intro_clip and intro_ring_count. |
update_agent | agent_id, changed fields, optional prompt_edits, expected_prompt_sha256 | D | Stages fields in the agent draft, replacing what the draft had. Runs without a confirmation step: the deployed agent is unchanged until deploy_agent, and discard_agent_draft reverts the draft. You can also set max_hold_seconds, system_tool_settings, and words. To change part of the prompt, send prompt_edits (see Editing a prompt in place). |
deploy_agent | agent_id, optional if_updated_at | D, I | Promotes the draft to production. |
discard_agent_draft | agent_id, optional if_updated_at, confirmation_token on the second request | D, I | Discards staged changes. Two-step, see Confirming destructive actions. |
duplicate_agent | agent_id, optional name | — | Copies an agent inside the organization. |
delete_agent | agent_id, confirmation_token on the second request | D, I | Permanently deletes an agent. Two-step. |
list_agent_versions | agent_id | R, I | Lists deployed configuration versions. |
list_prompt_revisions | agent_id, optional source, limit, offset | R, I | Lists every change to the agent's prompt text, drafts included, each with a diff against the revision it replaced. Available when the agent iteration toolkit is available to your connection (see below). |
review_prompt | agent_id, optional prompt, previous_prompt, quote_id, max_cost_cents | — | Reviews the draft prompt (or the text you send) against the prompt style guide. Each finding quotes the passage, names the guideline and offers a find and replace edit; the result also lists the behaviors the prompt asks for, with stable ids, whether a refactor is due and, for the agent's own prompt, whether its test conversations need a refresh. Changes nothing on the agent; the inventory is saved with its prompt revision. Paid, so it is not marked read-only: first quote it with dry_run, then run it again without dry_run, with the quote_id it returns and max_cost_cents. These paid runs now count against the same organization toolkit allowance as other toolkit runs. Available when the agent iteration toolkit is available to your connection (see below). |
refactor_prompt | agent_id, optional prompt, inventory, instructions, quote_id, max_cost_cents | — | Rewrites the prompt into the style guide's shape and maps every behavior as kept, merged, reworded or dropped. Returns the new text and a diff, and by default re-reads it to report behavior_changes (added, removed or changed) and behavior_preserved; apply it with update_agent. Paid: quote it with dry_run, then run it once with the quote_id it returns and max_cost_cents. Available when the agent iteration toolkit is available to your connection (see below). |
list_reusable_instructions | — | R, I | Lists reusable instructions: shared prompt rules attached to many agents with update_agent's reusable_instruction_ids. |
create_reusable_instruction | name, content | — | Creates an unattached reusable instruction. Admins only. |
Phone numbers and carriers
| Tool | Main arguments | Annotations | What it does |
|---|---|---|---|
list_phone_numbers | — | R, I | Lists organization numbers and routing. |
get_phone_number_limits | — | R, I | Gets managed-number usage and limits. |
provision_phone_number | optional area_code, city, state, idempotency_key | D, O | Buys a ThunderPhone-managed inbound number. In Claude, toll_free and number buy a toll-free number found with search_toll_free_numbers (see What is different in Claude). |
list_voip_connections | — | R, I | Lists connected customer carriers. |
search_voip_numbers | connection_id, country, type, optional area_code | R, I, O | Searches carrier inventory. |
import_voip_numbers | connection_id, numbers | D, O | Imports numbers already owned at the carrier. ThunderPhone then verifies each one with a short test call that the carrier bills, which switches it on: from about 3 minutes after the import, up to an hour for many numbers. Manual SIP numbers outside the US and Canada are the exception: verify them on Phone & web → Phone numbers. |
update_phone_number | phone_number_id, routing/label/webhook fields | D | Updates number routing, including agent assignment. |
delete_phone_number | phone_number_id, confirm, optional release_at_provider, confirmation_token on the second request | D, I, O | Releases a number. Two-step. |
get_voip_setup_session | optional session_id | R, I | Reads a guided carrier setup (status, checklist, the question it is waiting on), or lists open setups. A setup starts in ThunderPhone because it needs the carrier password. Admins only. |
answer_voip_setup_question | session_id, question_id, answer | O | Passes the user's answer to the setup. Passwords, test-call consent, the server address, the username and letting ThunderPhone sign in to the provider account are answered in the setup wizard only; for those it returns the wizard link and sends nothing. |
save_voip_setup | session_id, optional name and outbound_only, confirmation_token on the second request | D, I, O | Saves a connected draft connection so it can be used. With outbound_only, saves a setup whose calls out passed while calls in don't work yet, so the number can place calls now; calls in are finished later on the same number. Two-step. |
check_phone_number | phone_number or phone_number_id | R, I, O | Diagnoses one of the organization's own numbers from evidence: routing, connection, verification, recent carrier and test calls, and where the carrier sends it. |
SMS
| Tool | Main arguments | Annotations | What it does |
|---|---|---|---|
send_sms | from_number, to, body, idempotency_key | D, I, O | Sends one plain-text SMS through a connected Twilio or Telnyx number. |
Calls
| Tool | Main arguments | Annotations | What it does |
|---|---|---|---|
list_calls | optional filters, limit, offset | R, I | Lists calls with the REST call-history filters, including exclude_test_calls. |
get_call | call_id | R, I | Gets call status and metadata. |
get_call_transcript | call_id, optional live | R, I | Gets the call transcript. |
get_call_audio_url | call_id, optional download | R, I, O | Returns a signed audio URL; it never streams audio through MCP. |
get_call_grade | call_id | R, I | Gets the latest call grade. |
place_call | agent_id, from_number, to_number | D, O | Places one non-idempotent outbound call. |
export_calls | call filters, export_format | R, I | Exports up to the REST endpoint's cap as JSON or CSV. |
get_call_analytics | optional since_days, agent_id | R, I | Aggregates real calls by status, direction, outcome, grade and issue, with test calls counted apart. |
get_call_insights | call_ids (up to 10) | R, I | Gets the grade, outcome, summary and detected issues of several calls at once. |
Testing and validation
| Tool | Main arguments | Annotations | What it does |
|---|---|---|---|
list_test_scenarios | agent_id | R, I | Lists test scenarios. |
create_test_scenario | agent_id, title, scenario_prompt, optional conditions | — | Creates a scenario. |
generate_test_scenarios | agent_id, optional count, include_edge_cases, locale | O | Generates scenarios from the agent prompt. |
run_agent_tests | agent_id, channel, consent_to_charge, optional selection/matrix | D, O | Executes scenarios through web or telephony. |
get_test_run | agent_id, batch_id | R, I | Gets batch status and per-scenario results. |
test_my_agent | agent_id, consent_to_charge, optional scenario_ids, count, wait_seconds | D, O | Tests an agent in one call: runs its saved scenarios (generating some when it has none) and waits up to a minute for the verdicts, or returns the batch_id for get_test_run. Billed like run_agent_tests. |
test_in_text | agent_id, callers (1 to 3 descriptions), optional version, direction | O | Free text test: simulated callers talk to the agent's draft (or live version) in text through the real pipeline, and the transcripts come back in about a minute. Knowledge searches run on the agent's real documents; other tool results are simulated. |
run_simulation | agent_id, consent_to_charge, optional scenario_prompt, direction, language | D, O | Starts one simulated phone call between an AI caller and the agent's draft, so a person can listen to a change. Returns the run at in_progress. It is recorded when the agent records calls, and graded after it ends. Billed like a test call, from the free test budget first. |
get_simulation | simulation_id | R, I | Gets a simulated call's status and, once it ends, what it produced: a short-lived recording URL and the transcript when the agent records calls, and the grade once grading finishes (null before). |
list_validation_runs | agent_id | R, I | Lists recent draft validation runs. |
get_validation_status | agent_id | R, I | Gets the latest validation state and draft match. |
list_conversations | agent_id, optional split, source | R, I | Lists the conversations the agent is tested against. Needs the agent iteration toolkit. |
get_conversation | conversation_id | R, I | Gets one test conversation with its current turns. Needs the agent iteration toolkit. |
get_conversation_revisions | conversation_id, optional limit, offset | R, I | Lists every revision of a test conversation: how and why it changed (refreshed for a prompt change, restored from an earlier revision), the behaviors added, removed and changed, the examples moved or retired, and the row diff. Needs the agent iteration toolkit. |
generate_conversations | agent_id, optional count, style | O | Writes simulated test conversations against the agent's draft and turns their hardest moments into validation examples with answer keys. Quote with dry_run first; a real run needs its quote_id and max_cost_cents. Needs the agent iteration toolkit. |
import_conversations | agent_id, optional since_days, max_calls | O | Turns the agent's recent calls into test conversations (at most two per caller, recording-off calls skipped) and their hardest moments into examples. Quote with dry_run first; a real run needs its quote_id and max_cost_cents. Needs the agent iteration toolkit. |
refresh_conversations | agent_id, optional conversation_ids, from_prompt_revision_id | O | Brings the agent's test conversations up to its current prompt after behaviors were added, removed or changed: re-points, restores an earlier revision (real audio included) or rewrites the out-of-date turns, and retires examples whose caller turn is gone. Quote with dry_run first; a real run needs its quote_id and max_cost_cents. Needs the agent iteration toolkit. |
get_conversation_job | job_id | R, I | Gets a generate, import or refresh job: status, cost so far against its cap, and what it wrote or refreshed. Needs the agent iteration toolkit. |
run_replays | agent_id, optional overrides, split, engine, sample_size, sample_seed, max_cost_cents, quote_id, dry_run | D, O | Replays a sample of the agent's examples under its draft, or under overrides such as a candidate prompt, voice or tier, and judges each reply against the example's answer key. Exact replays run the turn's recorded audio as a live call would; pass rates are reported per engine. Replays of PHI calls run as PHI, and a configuration they cannot run (an ElevenLabs voice, an experimental product) is refused. dry_run returns an estimate, the sample_seed it drew and a quote_id; a real run sends the same request with that quote_id and sample_seed, and max_cost_cents, a hard cap: each request sets aside its upper bound before it is sent, and the run stops instead of sending one that does not fit, so leave the estimate's largest_reservation_cents of headroom per worker. An exact replay sets aside up to about $1.25 while it runs (two run at once) and is charged what it actually costs, usually a few cents, so set max_cost_cents with room. An exact replay runs under a budget sized for a normal turn plus one production-style re-run; a turn that needs more is recorded as an error, replay_budget_exhausted, counted apart as budget_exhausted, left out of the pass rate and, on the test split, spends no cohort. On the test split, a cohort with recorded caller audio under a configuration other than Bolt v2 is refused (test_needs_exact_replay) and stays unused: measure that configuration on the dev split. Needs the agent iteration toolkit. |
compare_configs | agent_id, configs (2 to 4, the first is the baseline), optional sample_size, sample_seed, max_cost_cents, quote_id, dry_run | O | Replays the same examples under each configuration and reports pass rate, examples fixed and broken against the baseline, latency to first audio, how often the caller waited on an acknowledgement, ticks or silence, and cost per turn, per engine. Quote it with dry_run like run_replays. Dev split only: on the test split it is refused (comparison_dev_only); compare on dev, then measure the pick with run_replays. Needs the agent iteration toolkit. |
get_replay_run | run_id, optional include_trace | R, I | Gets a replay run's totals, flips and per-example results, and its comparison group. Exact replays that needed more than their budget are counted apart (budget_exhausted), outside the pass rate. Needs the agent iteration toolkit. |
create_talk_link | agent_id, optional variant_id, language, expires_in_minutes | O | Creates a single-use link a person opens in a browser to talk to the agent's current draft, like the agent page's Test call button. The link expires after 30 minutes by default (at most 120); the conversation bills like a Talk test call. See Talk links. |
The tools marked as needing the agent iteration toolkit are part of it; the toolkit is enabled per organization while it is in beta, and without it they return feature_not_enabled with what to do next. Each of an agent's conversations is in its dev split or its test split. The test split is for measuring a change, not for tuning it, so the conversation tools return a test-split conversation as its id, split, source, status and counts only. A replay run on the test split replays one whole test cohort (sample_size and sample_seed are ignored), each example on the engine its data allows, set before the run from the example (exact for recorded caller audio, text for a text-only example; a configuration other than Bolt v2 has no exact path, so a cohort with recorded audio is refused for it with test_needs_exact_replay and stays unused; engine is omitted or auto, since exact or text is refused with test_engine_per_example, and nothing falls back to text), and returns totals only, per engine: pass rate, failures by severity and kind, latency and cost. Its first result that stores a replay spends the cohort, so the next test run, for any prompt, takes another, and with none left it is refused with no_test_cohort (importing calls or generating conversations fills new cohorts); a run that ends before storing one (Core cannot replay its audio examples exactly, exact_replay_unavailable, its replay capacity stays busy, core_busy, or every turn ran out of its budget, replay_budget_exhausted) leaves the cohort unused. On the dev split, an exact replay Core cannot run falls back to text and the run is marked degraded. Comparisons run on the dev split only. Every paid tool takes its dry run's quote_id, good for one run: it is used up once, durably, as the run starts, and a start that is refused or fails before then leaves it usable; a run that fails after it says so, and is repeated with a new dry run for a new quote_id. With OAuth, review_prompt and refactor_prompt need the agents:write scope, dry runs included, and the conversation and replay tools need testing:write to run. People see the whole test split in ThunderPhone. A call whose caller is in an agent's test split is held out, because it is part of the test set. In an organization with the toolkit, list_calls, get_call, get_call_transcript, get_call_audio_url, get_call_grade and export_calls return it as exactly {"call_id", "start_time", "held_out": true} (started_at in place of start_time in an export's rows), without its transcript, recording, history, grade or report; every other field of the call is absent, so read a withheld row by its held_out before anything else. The REST API does the same for API keys and OAuth tokens, and its views across many calls (report summaries, issue clusters, investigations, pipeline reports) leave held-out calls out of their counts, clusters and samples, and withhold any text a model wrote from them. A write on a held-out call (grading, promoting it to a test scenario, regenerating a turn) is refused with held_out_call. A test scenario someone promoted from a held-out call comes back from list_test_scenarios and in test runs as exactly {"id", "held_out": true}, and a simulation run from it, from get_test_run and the simulation tools, as exactly {"id", "scenario_id", "held_out": true}; its simulated calls are held out too, and test runs still run it. A dev conversation, example or replay result copied from a held-out caller's call (splits are per agent, so that caller may be in another agent's test split) reads like a test-split one. People see held-out calls in full in ThunderPhone, and an admin can let one API key see them in full (include_held_out_calls, off by default, set only in ThunderPhone), for an integration that needs every call; MCP never uses it. Webhooks are unchanged. Organizations without the toolkit see no held_out field and no change.
generate_conversations, import_conversations and refresh_conversations spend model credits. Call them with dry_run: true first: the answer is a cost quote, step by step, with a quote_id, and nothing runs. The quote counts every request the run can make at a typical size. A real run needs that quote_id (it expires after 15 minutes, and only works with the same arguments) and max_cost_cents, a hard cap: before each request the job sets aside the most that request can cost, and stops instead of sending one that does not fit, keeping what it wrote. Because of that set-aside, a run can stop with some of its cap unspent; the quote's largest_reservation_cents says how much headroom to leave. Simulated callers are invented from the agent's prompt; style: "adversarial" writes difficult callers who push on the prompt's weak spots, and those conversations always go to the dev split. target: "changed_behaviors" aims the callers at what changed in the last prompt edit. Each agent runs one of these jobs or one replay run at a time, so a refresh never changes the examples a replay is running on; a start while the other is running returns job_active, replay_run_active or conversation_job_active with what to wait for.
After a prompt edit that adds, removes or changes a behavior, review_prompt on the agent's draft reports how many test conversations were written for a prompt with other behaviors (conversations.refresh_suggested). refresh_conversations then brings them up to the draft, so the dev and test sets measure the new prompt on histories it could have produced. A refresh never loses anything: each conversation keeps every earlier revision, and when a removed rule comes back, the revision from when it existed is restored with its real caller audio. A refresh a coding agent starts leaves test-split conversations, and conversations copied from held-out calls, out of its selection, quote, progress and cost; naming one in conversation_ids returns 403 test_conversation. A person refreshes those from the dashboard, and to coding agents that job's results show them as ids and counts only. An active example whose history, reply or answer key a refresh rewrites goes back to pending_review, labeled refreshed_needs_review. A refresh's quote prices every conversation it reads as if it were rewritten, every model call at its output cap, and holds for the prompt and the conversations it was quoted on: when either changes before the run, quote again; when the prompt changes while it runs, the job stops as failed, keeping what it refreshed.
Knowledge
| Tool | Main arguments | Annotations | What it does |
|---|---|---|---|
list_knowledge_bases | — | R, I | Lists knowledge bases. |
create_knowledge_base | name, optional description | — | Creates a knowledge base. |
add_knowledge_document | knowledge_base_id, name, content | — | Adds text or Markdown. |
import_knowledge_url | url, optional name | O | Queues a public page for safe ingestion. |
search_knowledge | knowledge_base_id, query | R, I | Searches through production retrieval. |
Integrations, webhooks, and remote MCP servers
| Tool | Main arguments | Annotations | What it does |
|---|---|---|---|
list_integrations | — | R, I | Lists HTTP function integrations. |
create_integration | display_name, function spec, optional endpoint fields | — | Creates an HTTP tool. Add authentication headers in ThunderPhone. |
test_integration | url, optional method/body/timeout, integration_id with header_names, confirmation_token on the second request | D, O | Sends a bounded, SSRF-protected test request. Saved header values are filled in from the integration and only sent to its own host. POST (the default), PUT, PATCH and DELETE are two-step; GET runs immediately. |
list_webhook_endpoints | — | R, I | Lists signed webhook endpoints. |
list_webhook_deliveries | optional agent_id, optional endpoint_id | R, I | Lists recent payload-free webhook delivery outcomes. |
create_webhook_endpoint | label, url, optional events/status | O | Creates a signed webhook endpoint. |
copy_webhook_endpoint | endpoint_id, target_agent_id | I | Copies an agent's webhook, signing secret included, onto another agent on the server. Admins only. |
test_webhook_endpoint | endpoint_id | O | Sends a synthetic event through normal delivery. |
list_mcp_servers | — | R, I | Lists remote servers callable by voice agents. |
create_mcp_server | display_name, url | O | Registers and syncs a remote server. Servers that need authentication headers are added in ThunderPhone. |
sync_mcp_server_tools | server_id | D, O | Refreshes a remote server's tool catalog. |
Campaigns
| Tool | Main arguments | Annotations | What it does |
|---|---|---|---|
list_campaigns | — | R, I | Lists outbound campaigns. |
create_campaign | campaign fields | — | Creates a draft campaign. |
add_campaign_contacts | campaign_id, contacts | — | Adds up to 5,000 JSON contacts. |
campaign_action | campaign_id, action, optional consent_to_charge, confirmation_token on the second request | D, O | Runs start, pause, resume, or stop. start and resume are two-step; pause and stop run immediately. |
get_campaign_stats | campaign_id | R, I | Gets counters and recent outcomes. |
check_campaign | optional campaign_id, contact_phone_number, contact_status | R, I | Explains why a campaign is not calling: its calling window in its own time zone, contacts due now and what stops dialing. |
Organization settings and blocked callers
| Tool | Main arguments | Annotations | What it does |
|---|---|---|---|
get_org_settings | — | R, I | Reads the time zone, business hours, test numbers, call outcome labels, status names and which alerts are off, with updated_at. |
update_org_settings | changed settings, if_updated_at, confirmation_token when asked | D, I | Changes them (admins only). Lists and objects replace the stored value. Turning an alert off or adding a test number is two-step. The result has the old values for undo. |
get_account_limits | — | R, I | Gets platform limits with this organization's own values. |
list_blocked_callers | optional number, search | R, I | Lists blocked caller numbers. |
block_callers | numbers, optional note, confirmation_token on the second request | D, I | Refuses calls from these numbers before any agent answers. Two-step, admins only. |
unblock_callers | numbers, confirmation_token on the second request | D, I | Removes numbers from the blocklist. Two-step, admins only. |
get_org_settings, update_org_settings and get_account_limits need the org:read or org:write OAuth scope; a connection made before they existed is asked to approve it on first use.
Capabilities, help, and imports
| Tool | Main arguments | Annotations | What it does |
|---|---|---|---|
get_supported_languages | — | R, I | Lists the languages agents speak, with codes. |
get_agent_capabilities | — | R, I | Says what an agent can do on a call and which settings and integrations exist. |
escalate_to_human | summary | O | Asks the ThunderPhone team for help. They reply in ThunderPhone. For organizations that may handle PHI only a neutral note leaves ThunderPhone. |
request_feature | title, request, details | O | Files a feature request with the ThunderPhone team. At most three per organization a day. |
start_agent_import | platform | R, I | Returns the ThunderPhone link where you enter your Vapi, Retell, ElevenLabs or Bland key and pick agents. No tool takes the key. |
get_agent_import | optional import_id | R, I | Lists recent imports, or one import's status and mapped agents. |
commit_agent_import | import_id, optional item_ids | O | Creates the agents from a ready import, in the background. Admins only. |
Voices, billing, and docs
| Tool | Main arguments | Annotations | What it does |
|---|---|---|---|
list_voices | — | R, I | Lists voices and supported languages. |
preview_voice | voice, language, text | O | Generates a sample and returns a signed URL. |
list_voice_clones | — | R, I | Lists custom voice clones. |
get_billing_summary | — | R, I | Gets balance and authoritative tier prices; no payment mutations are exposed. |
search_docs | query, optional limit | R, I, O | Searches the public docs index. |
get_doc_page | path | R, I, O | Fetches one public Markdown docs page. |
Results about an agent, call, number, campaign or setting carry web_url, the matching page in the ThunderPhone app, so you can open it in ThunderPhone or keep going with Zeus there.
All product tools use the same REST code paths as the public API. REST validation, organization scoping, roles, billing admission, quotas, TCPA confirmation, provider safety, and audit behavior therefore apply unchanged.
Editing a prompt in place
update_agent can change part of the draft prompt without sending the whole text back. prompt_edits is an ordered list of find and replace pairs, the same format review_prompt and refactor_prompt return:
{
"agent_id": 123,
"expected_prompt_sha256": "9c1f…",
"prompt_edits": [
{
"find": "Ask for their name and their phone number, then tell them we will call back.",
"replace": "Tell them we will call back, then ask for their name. Once they answer, ask for their phone number."
}
]
}The server applies the edits in order to the agent's current draft prompt (the deployed prompt when there is no draft) and writes the result to the draft through the same path as a whole-prompt update_agent. Each find must appear exactly once in the prompt as it stands when that edit's turn comes. If one does not, nothing is written and the error names the edit:
| Code | Meaning | What to do |
|---|---|---|
prompt_edit_not_found | The find text is not in the current draft prompt. edit_index says which edit. | Read the agent again and copy the passage exactly. |
prompt_edit_ambiguous | The find text appears more than once. occurrences says how often. | Include more of the surrounding text. |
stale_prompt | expected_prompt_sha256 is not the SHA-256 of the current draft prompt: it changed after you read it. | Read the agent again, rewrite the change against the current text, and send its SHA-256. |
conflict | Another write landed between the server reading the draft and writing it. | Retry; the draft was not changed by this call. |
expected_prompt_sha256 is optional and also guards a whole-prompt write. Use the prompt_sha256 from review_prompt, or source_prompt_sha256 from refactor_prompt. Any call that changes the prompt returns prompt_sha256 for the new text, previous_prompt_sha256 when the server read the draft first, and a next_step suggesting review_prompt with previous_prompt set to the text before the change. The REST API takes only the whole prompt: PATCH /v1/agents/{agent_id} with prompt and if_updated_at.
Confirming destructive actions
Tools marked D change or remove something, or begin dialing real people. Those that cannot be undone take two requests. The first request changes nothing and returns:
{
"status": "confirmation_required",
"action": "Delete agent",
"target": { "id": 195, "name": "Front Desk Receptionist" },
"confirmation_token": "…",
"expires_in_seconds": 600,
"next_step": "…"
}The assistant shows the user what is affected and asks for a yes. It then repeats the request with the same arguments plus confirmation_token. A token is valid for 10 minutes, works once (even if that call fails), and covers one organization, one person, one tool and one exact set of arguments, so deleting three agents takes three confirmations. campaign_action with pause or stop skips this step so a running campaign can always be halted at once, and so does test_integration with GET. Some D tools run in one request because the D marks their effect, not a server-side confirmation: update_agent replaces what the draft had (discard_agent_draft reverts it), deploy_agent replaces the live configuration, update_phone_number reroutes live calls, sync_mcp_server_tools replaces a remote server's tool catalog, import_voip_numbers re-points numbers at your carrier, run_agent_tests and run_simulation can spend credit, send_sms and place_call reach a real person (place_call keeps its own consent confirmation; in Claude both are two-step), and provision_phone_number buys a number (a toll-free number always takes the two steps). test_my_agent spends test credit and needs consent_to_charge. run_replays spends money too; its dry_run quote and max_cost_cents cap stand in for the confirmation. Your MCP client may still ask you to approve them.
Some changes that can be undone still wait for a yes: block_callers, unblock_callers and save_voip_setup always, update_org_settings when it turns an alert off or adds a test number, and update_agent when its attention_reasons turn one of the agent's alerts off. Their next_step asks you to confirm the exact change rather than warning that it cannot be undone.
Starter prompts
prompts/list advertises twelve reusable workflows:
create_inbound_receptionistrun_agent_testsbuy_and_attach_numberreview_low_grade_callsadd_url_to_agent_knowledgeimprove_agent_from_callscheck_change_before_deploytest_my_agentdiagnose_phone_numberwhy_campaign_not_callingcall_reportimport_agents
Use prompts/get with the listed prompt name and its declared arguments to receive a ready-to-run user message.
Resources
resources/list exposes public, cached references:
| URI | Content |
|---|---|
thunderphone://docs/llms.txt | Public documentation index. |
thunderphone://docs/quickstart | Quickstart Markdown. |
thunderphone://pricing | Current public pricing Markdown. |
thunderphone://guides/prompt-style | The voice-agent prompt style guide that review_prompt checks against. Its guideline ids (P1, W2 and so on) are the ones findings cite. |
thunderphone://guides/working-with-thunderphone | How an assistant should work with these tools: small rounds on the draft, a check before every deploy, the user's yes for anything live or billed, and never asking for secrets. |
Read one with resources/read. Public fetches use a short timeout, a 2 MiB limit, and a ten-minute in-process cache.
Protocol and errors
The server supports protocol versions 2025-06-18 and 2025-03-26; it echoes a supported client version and otherwise selects 2025-06-18. It implements initialize, ping, tools, prompts, resources, and notifications. Notifications return 202 Accepted. This stateless server does not expose an SSE listener or session deletion, so GET and DELETE return 405 Method Not Allowed with Allow: POST.
Tool failures remain successful JSON-RPC responses with isError: true. Their text contains a short sentence followed by a JSON block:
{
"code": "insufficient_balance",
"detail": "There is not enough prepaid balance.",
"next_step": "Call get_billing_summary, add funds in Organization > Billing, then retry."
}The distinct outbound_tcpa_confirmation_required: prefix is retained for place_call. Unknown JSON-RPC methods return -32601 in an HTTP 200 response. JSON-RPC batches are not supported by MCP 2025-06-18 and return a clean -32600 invalid-request error.