Developers Sign in

MCP: DoneTalk as an AI's tools

DoneTalk is also an MCP (Model Context Protocol) server. An AI connected with the company's API key gets the API's own operations as tools: look up and add contacts, read and answer conversations, build and send campaigns, see the schedule.

There is nothing new to learn or to allow: each tool is an operation of the API, called with the same key. What the key may not do, the AI may not do either.

The address

https://api.donetalk.com/v1/c/YOUR-COMPANY/mcp
  • YOUR-COMPANY is the company's identifier, the same as in the other calls of the API. It shows in Settings › API, with the address ready to copy.
  • The key goes in the Authorization: Bearer <key> header. Create a key for the AI alone, with the scopes of what it should do (Keys and scopes).
  • The transport is Streamable HTTP: one POST per message, a JSON answer, no session.

Connecting

It is the same everywhere: the address above and the Authorization header with the key. Keep the key in an environment variable (DONETALK_KEY), not in the file.

Claude Code, from the terminal:

claude mcp add --transport http donetalk https://api.donetalk.com/v1/c/YOUR-COMPANY/mcp \
  --header "Authorization: Bearer $DONETALK_KEY"

or in the project's .mcp.json file (the type field is required):

{
  "mcpServers": {
    "donetalk": {
      "type": "http",
      "url": "https://api.donetalk.com/v1/c/YOUR-COMPANY/mcp",
      "headers": { "Authorization": "Bearer ${DONETALK_KEY}" }
    }
  }
}

Cursor, in .cursor/mcp.json (the project's) or ~/.cursor/mcp.json:

{
  "mcpServers": {
    "donetalk": {
      "url": "https://api.donetalk.com/v1/c/YOUR-COMPANY/mcp",
      "headers": { "Authorization": "Bearer ${env:DONETALK_KEY}" }
    }
  }
}

Claude (claude.ai and Claude Desktop): add a custom connector with the address and, in the request headers, Authorization with the value Bearer <key>. Claude connects from Anthropic's servers, not from your computer: a key limited to IP addresses does not work for it.

Other clients: any that takes an HTTP address and headers of your own connects the same way (in VS Code, a server of type http).

In an agent of your own, with MCP's official library:

import { Client, StreamableHTTPClientTransport } from "@modelcontextprotocol/client";

const transport = new StreamableHTTPClientTransport(
  new URL("https://api.donetalk.com/v1/c/YOUR-COMPANY/mcp"),
  { requestInit: { headers: { Authorization: `Bearer ${process.env.DONETALK_KEY}` } } },
);
const client = new Client({ name: "my-agent", version: "1.0.0" });
await client.connect(transport);
const { tools } = await client.listTools();
const me = await client.callTool({ name: "account_me", arguments: {} });

A client that only signs in by OAuth, with no place for a header, does not connect yet.

Try it now, with no account

The company demo takes the public test key, which only simulates (Test mode):

curl https://api.donetalk.com/v1/c/demo/mcp?lang=en \
  -H "Authorization: Bearer dt_test_demo_zRZ6twAhj4u9dZT0hEBrNFzr" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl","version":"1"}}}'
curl https://api.donetalk.com/v1/c/demo/mcp?lang=en \
  -H "Authorization: Bearer dt_test_demo_zRZ6twAhj4u9dZT0hEBrNFzr" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"account_me","arguments":{}}}'

The tools

A tool's name is the operation's with _ in place of the dot: campaigns.list becomes campaigns_list. The list the AI receives holds only the tools the key reaches; for it to see fewer, give the key fewer scopes.

The arguments follow the API's call:

  • the path's ids go by name (id, tagId, key);
  • the filters and the page go in query;
  • the request's content goes in body.
{ "name": "campaigns_get", "arguments": { "id": "01a3e4f5-…" } }
{ "name": "contacts_list", "arguments": { "query": { "q": "Ana", "limit": 20 } } }
{
  "name": "contacts_create",
  "arguments": { "body": { "displayName": "Ana Souza", "phone": "+5548999990001" } }
}

The answer is the API's, as text (JSON) and as structured data. An error of the API comes back as the tool's error, with the same code and message (Errors and limits), for the AI to read and correct.

Account

ToolWhat it doesScope
account_meWho the key is

Campaigns

ToolWhat it doesScope
campaigns_listList campaignscampaigns:read
campaigns_createCreate a campaigncampaigns:write
campaigns_getGet a campaigncampaigns:read
campaigns_updateEdit a campaigncampaigns:write
campaigns_deleteDelete a campaigncampaigns:write
campaigns_waitingWho replied and waits for an answercampaigns:read
campaigns_waiting_applyHand who waits to who answers nowcampaigns:send
campaigns_archiveArchive a campaigncampaigns:write
campaigns_unarchiveUnarchive a campaigncampaigns:write
campaigns_duplicateDuplicatecampaigns:write
campaigns_headerSet the header image or documentcampaigns:write
campaigns_audiencePreviewAudience previewcampaigns:read
campaigns_messagePreviewMessage previewcampaigns:read
campaigns_reviewReview: cost, checks and approvalcampaigns:read
campaigns_testSend a testcampaigns:write
campaigns_submitStart or schedulecampaigns:send
campaigns_pausePausecampaigns:send
campaigns_resumeResumecampaigns:send
campaigns_cancelCancelcampaigns:send
campaigns_retryRetry the failurescampaigns:send
campaigns_recipientsRecipients, one by onecampaigns:read
campaigns_insightsFailures, buttons and clickscampaigns:read

Segments

ToolWhat it doesScope
segments_listList segmentscontacts:read, campaigns:write
segments_createCreate a segmentcontacts:write
segments_updateEdit a segmentcontacts:write
segments_deleteDelete a segmentcontacts:write
segments_countCount who matchescontacts:read, campaigns:write
contacts_searchSearch contacts by conditionscontacts:read

Contacts

ToolWhat it doesScope
contacts_listList contactscontacts:read
contacts_createCreate a contactcontacts:write
contacts_importCreate or update contacts (up to 1,000)contacts:write
contacts_getGet a contactcontacts:read
contacts_updateEdit a contactcontacts:write
contacts_consentRecord consentcontacts:write
contacts_activeMessagesGet active messagescontacts:read
contacts_setActiveMessagesPause or opt out of active messagescontacts:write
contacts_tagAddAdd a tagcontacts:write
contacts_tagRemoveRemove a tagcontacts:write
contacts_cardsContext cardscontacts:read
contacts_cardPutShow a card to the attendantcontacts:write
contacts_cardDeleteRemove a cardcontacts:write
contacts_eraseErase the contact's data (LGPD)contacts:delete

Contact fields

ToolWhat it doesScope
fields_listList the contact fieldsfields:read, contacts:read
fields_createCreate a fieldfields:write
fields_updateEdit a fieldfields:write
fields_layoutOrder the fields and groupsfields:write
fields_duplicatesPossible duplicatesfields:write
fields_mergeMerge two fieldsfields:write
fields_undoMergeUndo a mergefields:write
fieldGroups_createCreate a field groupfields:write
fieldGroups_updateRename or hide a groupfields:write
fieldGroups_deleteDelete a groupfields:write

Templates

ToolWhat it doesScope
templates_listList templatestemplates:read, campaigns:write, messages:send_template
templates_createCreate a templatetemplates:write
templates_getGet a templatetemplates:read, templates:write
templates_updateEdit a templatetemplates:write
templates_deleteDelete a templatetemplates:write
templates_authenticationAccess-code templates: allowed?templates:read, templates:write
templates_buttonActionsWhat each button doestemplates:write
templates_submitSend to Meta for reviewtemplates:write

Messages

ToolWhat it doesScope
messages_sendTemplateSend a template to a phonemessages:send_template
messages_getA message's status and replyconversations:read, messages:send_template, messages:send_text
messages_listA phone's messagesconversations:read

Conversations

ToolWhat it doesScope
conversations_listList conversationsconversations:read
conversations_startOpen a conversation with a templatemessages:send_template
conversations_exportExport the conversationconversations:export
conversations_getGet a conversationconversations:read
conversations_sendSend a message in the conversationmessages:send_template, messages:send_text
conversations_closeClose with an outcomeconversations:write
conversations_reopenReopenconversations:write

Numbers, teams and tags

ToolWhat it doesScope
channels_listWhatsApp numbersworkspace:read, campaigns:write, messages:send_template, templates:read
teams_listTeamsworkspace:read, campaigns:write
tags_listTagsworkspace:read, contacts:read
outcomes_listOutcomesworkspace:read, conversations:read, conversations:write

Scheduling

ToolWhat it doesScope
appointments_typesAppointment typesappointments:read
appointments_slotsFree timesappointments:read
appointments_listAppointmentsappointments:read
appointments_bookBookappointments:write
appointments_getGet an appointmentappointments:read
appointments_rescheduleRescheduleappointments:write
appointments_cancelCancelappointments:write

Webhooks

ToolWhat it doesScope
webhooks_listList webhookswebhooks:manage
webhooks_createCreate a webhookwebhooks:manage
webhooks_updateEdit a webhookwebhooks:manage
webhooks_deleteDelete a webhookwebhooks:manage
webhooks_testSend a test eventwebhooks:manage
webhooks_deliveriesRecent deliverieswebhooks:manage

Sending a file (POST /uploads) stays in the API alone: a file does not fit in a tool's arguments. For the same reason, a conversation's export (conversations_export) always answers the text; the PDF and the zip stay in the API.

Limits and care

  • Rate limit: the key's, 600 per minute. A tool's call counts once. A request is 1 MB at most.
  • Repeating a creation creates again. The API's Idempotency-Key does not pass through a tool. Each tool says whether repeating it is safe (idempotentHint).
  • Test key: the AI really works against the real rules and nothing is stored or sent. It is the right way to develop and to demonstrate.
  • Live key: sending a message and starting a campaign reaches real people. Give the AI's key only the scopes it needs; if the company uses campaign approval, it applies to the AI too.
  • Marketing needs consent. WhatsApp's opt-in rules are the same, whoever asks.
  • Language of the descriptions: Portuguese. Add ?lang=en or ?lang=es to the address for English or Spanish.

Protocol versions

The server serves both generations of MCP at the same address and keeps nothing between one request and the next:

  • revision 2026-07-28, with no handshake: each request says its version, and server/discover describes the server;
  • revisions 2025-11-25, 2025-06-18, 2025-03-26 and 2024-11-05, which open with initialize.

GET and DELETE answer 405: there is no event stream and no session to end.

This page as Markdown