Make your first call
Create a key, list the tools, then run a search against the connector with curl.
By the end you will have listed the connector's tools and run one search. The connector speaks MCP over streamable HTTP, which is JSON-RPC in a POST.
Before you start
- An Adapt Leads account and a key. See Keys, sign-in and permissions. The default key is enough for this page.
curl. Put the key in a variable so it does not end up in your shell history:export ADL_KEY=adl_your_key.
Steps
-
Check the address answers. A request with no key gets a clear refusal:
curl -i -X POST https://mcp.adaptleads.co.uk/ \ -H 'Content-Type: application/json' \ -H 'Accept: application/json, text/event-stream' \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'You should see
HTTP/2 401and this body:{"error":"unauthorized","detail":"Provide an AdaptLeads access token as a bearer token. Create one in the web app under Settings."} -
List the tools your key can see. Add the header
Authorization: Bearer $ADL_KEYto the same call:curl -X POST https://mcp.adaptleads.co.uk/ \ -H "Authorization: Bearer $ADL_KEY" \ -H 'Content-Type: application/json' \ -H 'Accept: application/json, text/event-stream' \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'The connector is stateless, so there is no session to open first. Replies can arrive as a server-sent event (
event: messagethendata: {...}), so read the line that startsdata:. The list holds every tool the connector has, not only those your key may call. See MCP connector tools. -
Run a search:
curl -X POST https://mcp.adaptleads.co.uk/ \ -H "Authorization: Bearer $ADL_KEY" \ -H 'Content-Type: application/json' \ -H 'Accept: application/json, text/event-stream' \ -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"search_leads","arguments":{"sector":"accountants","area":"Sheffield","has_website":true,"page_size":2}}}' -
Read the answer. The tool result is a text block holding JSON. Inside it, a sample trimmed to the useful fields:
{ "total": 412, "page": 1, "page_size": 2, "results": [ { "lead_id": "mkt_sample0001", "name": "Marsh and Keel Accountants", "locality": "Sheffield", "postcode_out": "S1", "website_domain": "marshandkeel.example", "availability": {"has_phone": true, "has_email": true, "has_website": true, "has_socials": false}, "revealed": false } ], "widened": null, "did_you_mean": [] }Names, towns and the outward postcode are shown. Emails and phone numbers are not. Ask for one record with
lead_detailand pass itslead_id.
What happens next
- Every call counts against your minute and day ceilings, and every row counts against your daily and monthly row ceilings. See Rate limits, credits and allowances.
- A tool the key lacks permission for returns
{"error":"forbidden", ...}as its result. See Errors and what they mean. - To use the same key in a client, see Connect Cursor and other clients with a key.
If something goes wrong
401after you added the key: check there is no stray quote or space, and that the key has not been revoked or expired.403with "no longer has access": the account is not on the approved sign-in list.406or an empty reply: theAcceptheader must list bothapplication/jsonandtext/event-stream.{"error":"sector_not_recognised", ...}: the word is not one of the book's categories. Callresolve_sectorfor the closest ones. This is not a statement that no such businesses exist.