- to read your leads, conversations, calls, figures and balance, and what needs attention;
- if you allow it, to write to leads, call them and update them, and to mark leads and alerts as handled.
Connection
- Transport: Streamable HTTP, without sessions. Every tool call says which subaccount it acts on, so nothing depends on an earlier call.
- Sign-in: OAuth 2.1 with the person’s NewLead account, as a public client with no secret.
- A client registers itself with dynamic client registration (RFC 7591), or with a client ID metadata document.
- It must use PKCE with
S256and sendresource=https://mcp.newlead.ai/mcp(RFC 8707). - Redirect URIs must be
https, orhttpon a loopback address, written exactly as the URL resolves: no credentials (user@host), fragment, backslash, whitespace or..segments. The same goes for the URL of a client ID metadata document.
- Discovery: a request without a valid token returns
401with aWWW-Authenticateheader pointing tohttps://mcp.newlead.ai/.well-known/oauth-protected-resource/mcp, which names the authorization server. Its metadata is athttps://mcp.newlead.ai/.well-known/oauth-authorization-server. - Tokens: an access token lasts one hour and a refresh token 30 days. Each refresh returns a new refresh token; reusing an old one more than a minute after it was replaced ends the connection.
- What a connection reaches: every subaccount the person can open in the dashboard, with their role there. A subaccount, agent or lead they can’t see returns
resource_not_found, the same as one that does not exist. A paused subaccount can be read but not changed, except thatresolve_alertstill closes its alerts, as in the dashboard.
Permissions
- A connection without
mcp:actdoesn’t list the tools that act. Calling one returns a JSON-RPC error (-32602, tool not found), not a tool result. To use them, connect again and leave Act ticked. - Acting also needs a role that can do the same in the dashboard. See Roles.
- To change the permissions, revoke the connection in Settings › Connected apps and connect again. If the client asks only to read, Act doesn’t appear.
- With
mcp:admin(Administer) it can also create and set up text and voice agents: see the tools marked Administer in Tools. It can’t delete agents or leads, connect WhatsApp, Lead Ads, Instagram, email, a calendar or a phone number, manage billing or top up a wallet. Those stay in the dashboard:get_connect_linkreturns the link to the right panel.
Roles
A tool that acts checks the person’s role in the subaccount, with the same rule as the dashboard:
A role that can’t use a tool gets
role_forbidden. So does a role that calls get_metrics, get_balance, list_attention or list_alerts for something it doesn’t see in the dashboard. Team and roles describes each role.
get_agent returns an agent’s lead fields, qualification questions and templates only to the roles that set up agents in the dashboard. Every role except Subaccount Manager and Subaccount User sees them; the rest get the agent alone, with a note that says why. list_agents returns the same to every role, without any agent’s setup.
Tools
Every tool takes a requiredsubaccount_id, except whoami and list_subaccounts. In get_balance it is optional.
The tools carry hints that help the assistant decide when to ask before running one:
- the tools that only read are marked
readOnlyHint; set_do_not_contact,undo_attended,resolve_alertandset_agent_activeare markeddestructiveHint;send_message,send_template,send_media,place_callandset_template_rolesare markeddestructiveHintandopenWorldHint, because they reach a person outside NewLead: assigning the first-contact template sends it by WhatsApp to up to 100 of the agent’s email leads that were waiting for a first message, as the dashboard does;create_templateandset_platform_skillare markedopenWorldHint, because they send templates to Meta for review: a new template, or the WhatsApp notification templates when WhatsApp notifications are switched on.
create_lead needs a text agent and a phone number, and updates the lead if that agent already has one with that phone.
On WhatsApp, outside the 24-hour window send_message goes out as the agent’s reopening template. On Instagram, or if the agent has no approved reopening template, it fails with messaging_window_closed.
To send or call a phone number with no lead, create the lead first with create_lead. That way every message goes through the person’s opt-out and the agent’s rules.
Results
- Each successful result carries its object in
structuredContent: the same as the API’s, or one that only the MCP server has, such assubaccount,agency_balance,attention_lead,attended_markandalert. Itscontenthas two text blocks: a short summary, and the same object as JSON for clients that don’t readstructuredContent. - Lists take
limit(1 to 50, 20 by default) andcursor, and returnnext_cursor. The exception islist_agents, which returns every agent at once. - A failed call returns a result with
isError: trueandstructuredContent.error, with the code, type and message of the API error, such aslead_do_not_contactormessaging_window_closed. Two codes belong to the MCP server and aren’t in the API catalog, bothpermission_error:insufficient_scopeandrole_forbidden. Messages name tools and arguments, such assend_messageoridempotency_key, not API routes or headers. Itscontentis one text block,code: message, followed byRetry after N s.when the error carriesretry_after_sec. There is norequest_idand no HTTP status. - Arguments that don’t match a tool’s schema never reach the tool: a malformed id, a
limitabove 50, a phone that isn’t E.164 or, in the tools that act, an argument the tool doesn’t have. That result hasisError: trueand only a text message, with nostructuredContentand no code. Calling a tool that doesn’t exist returns a JSON-RPC error (-32602), not a result. - The tools that send or call accept an optional
idempotency_key, which works likeIdempotency-Key: the same key with the same arguments returns the first result instead of sending again. A key is valid for 24 hours, per person, client and subaccount. The same key with other arguments returnsidempotency_key_reused. Always pass one. - The role is checked before the key, and
place_callalso checks first whether the AI is paused for the lead or the lead opted out. So a retry can returnrole_forbidden,lead_ai_pausedorlead_do_not_contactinstead of the stored result. - If the key can’t be checked, nothing is sent or called and the result is
provider_unavailable: retry with the same key. The API does this only for calls, and processes messages without the protection. - What a person handles from the MCP server is handled in the dashboard too. A message, template or file that
send_message,send_templateorsend_mediasends counts as Already contacted when the lead required contact or had never written, the same as a message written by hand in the dashboard: the lead leaves the queues, its team notices and lead alerts close, and its history says it was handled from an AI assistant. As with a message written by hand, the conversation shows the message and no separate line. A send that fails or returnssend_outcome_unknowndoesn’t count, and neither does a send through the API, where an integration sends and not a person. See Attention and alerts. - If a send or a call returns
send_outcome_unknown, don’t send or call again. It may have gone through: checklist_messages, orlist_callsfor a call. The same key keeps returning that result. - The links to attachments (
list_messages) and recordings (list_calls,get_call) are signed and valid for one hour. Anyone who has the link can open the file until it expires, so treat it like the conversation itself.
Metrics and balance
get_metrics returns the same object as GET /v1/metrics:
- the leads that came in during the period and how far each one got, as in Analysis;
- the median time to the agent’s first contact;
- new leads by channel, billable conversations, calls and call minutes.
from and to, it covers the last 7.
The figures are not live. The leads and the median are cached for 5 minutes. The other counts are rebuilt every 5 minutes and can be cached for 1 more.
A Subaccount User can’t read metrics, as in the dashboard: get_metrics returns role_forbidden.
With subaccount_id, get_balance returns the same object as GET /v1/balance. When the agency pays the subaccount’s usage, mode is manual and wallet is null. The agency roles and the client’s Subaccount Owner and Subaccount Admin can read it. A Subaccount Manager or Subaccount User gets role_forbidden.
Without subaccount_id, it returns the wallet of your agency, which only the Owner and Agency Admins can see. Anyone else gets role_forbidden. wallet is null when the agency doesn’t pay from a prepaid wallet.
Attention and alerts
list_attention returns the leads of the dashboard’s three queues, each with its queue and reason:
no_contact: it never got a first message, with the reason, such asno_phoneordelivery_rejected(with Meta’s reason infailure);waiting: the agent asked for a person, with its notice indetail, or the lead wrote again after opting out (dnc_return);no_reply: it got the first message and never replied, with the follow-ups sent indetail.
no_contact and no_reply look at the leads that came in during period, last_30d by default as in the dashboard. waiting has no period. Each queue lists all its leads, newest first, where the dashboard shows only the first ones of each group. A Subaccount User can’t see the queues, as in the dashboard, and gets role_forbidden.
Sending a lead a message takes it off the queues, except a dnc_return lead, who opted out, and a no_phone lead, who has no number to write to. Those leave only with mark_attended.
mark_attended does what Already contacted does in the dashboard: the lead leaves the queues, its open team notices close, its lead alerts (first_contact_failed and lead_dnc_return) are resolved and it no longer requires contact. It returns an attended_mark; undo_attended with its id as mark_id leaves everything as it was, unless someone marked the lead again since. The lead’s history in the dashboard shows who marked it and that it was from an AI assistant.
list_alerts returns the open alerts at the top of the subaccount’s dashboard, newest first, such as a WhatsApp to reconnect or a calendar that lost access. Each one says which action fixes it and whether it closes_by_itself once fixed. The alerts of a single lead aren’t there: they’re in list_attention and close with mark_attended. resolve_alert marks one as resolved, and it can’t be reopened.
The agency roles see the alerts of the subaccount, and its Subaccount Owner and Subaccount Admin see those of its agents. A Subaccount Manager or Subaccount User gets role_forbidden. If alerts aren’t enabled for the account, both tools return feature_disabled. Resolving an alert sends nothing to anyone, so resolve_alert also works in a paused subaccount or with an inactive subscription, as in the dashboard.
Limits
- 60 tool calls per minute per connection (one person with one app), not per token. Over it,
rate_limit_exceeded. Unlike the API, the MCP server sends noRateLimit-*headers. place_callplaces at most 5 calls per minute per connection. Over it,rate_limit_exceededtoo.test_text_agentsends at most 10 test messages per minute per connection, because each reply spends from the wallet. Over it,rate_limit_exceededtoo.- Files sent with
send_mediacome from a publichttpsURL, up to 25 MB, and follow the API’s limits.
Revoke a connection
Each person sees their connections in Settings › Connected apps, with the app, its permissions and when it was last used, and can use Revoke access there. The connection stops working at once. Removing someone from an organization revokes their connections only when they have no other organization left. If they still have one, their connections keep working there and stop seeing the organization that removed them at once. Changing or resetting a password revokes all of that person’s connections too, so they have to connect each app again. It also closes their dashboard sessions, except the one where they changed it from their profile. If closing the sessions fails on our side, the password changes anyway and some sessions may stay open; changing it again closes them.Add it from the command line
In Claude Code:Test it with MCP Inspector
1
Start the Inspector
Run
npx @modelcontextprotocol/inspector. It opens in your browser.2
Connect
Choose Streamable HTTP, paste
https://mcp.newlead.ai/mcp and select Connect. Sign in to NewLead and allow access.3
Try a tool
Open Tools, select List Tools, and run
whoami.