Skip to content

MCP server

Every amabledata installation includes a remote MCP server (Model Context Protocol), so an AI assistant can work on a workspace for you: find contacts, log notes and tasks, move deals, check orders and refunds, send an email, look at analytics, run a report, and anything else the REST API can do.

  • It covers the whole API. Besides 48 dedicated tools for the everyday flows, three generic tools (search_operations, describe_operation, call_operation) reach every operation of the public REST API: 459 operations across CRM, commerce, checkouts, email, automations, forms, bookings, landing pages, e-sign, analytics, reports, webhooks and domains.
  • It runs inside your installation. There is nothing to install or host: the endpoint lives on the same host as your dashboard and calls the API internally.
  • It acts as an API key. The assistant can do exactly what the key allows, no more. Give it a key with only some scopes and the server adapts: tools the key cannot use are not even listed.
https://<your dashboard host>/api/mcp/t/<workspace>

For example, if you open the dashboard at https://crm.example.com/t/acme/contacts, the MCP endpoint is https://crm.example.com/api/mcp/t/acme.

  • Transport: MCP Streamable HTTP, stateless, JSON responses. Clients send JSON-RPC messages with POST; GET (server-sent events) is not offered and answers 405.
  • Protocol versions: 2025-06-18, 2025-03-26 and 2024-11-05. An unknown version gets the newest one.
  • Authentication: Authorization: Bearer amb_live_…, a workspace API key. Browser cookies are ignored. OAuth sign-in for MCP is not available: configure the key as a header.
  • One workspace per endpoint. The key only works on the workspace it was created in; to work on two workspaces, add two servers.

Each tool call becomes a normal REST request to /api/v2/t/<workspace>/…, with your key. That means:

  • the same permission checks (403 forbidden with the missing permissions),
  • the same rate limit (600 requests per minute per key),
  • the same validation (422 validation_failed with details),
  • the same side effects: domain events, automations, outgoing webhooks, analytics sync,
  • the same audit trail: changes are logged with the actor type api_key.

Errors come back to the assistant as tool errors with a short hint (for example which scope is missing, or how many seconds to wait after a 429), so it can explain the problem or fix its arguments.

An API key has a list of scopes, and at every request it works only as far as its creator’s current role allows (see API keys). The MCP server reads these effective permissions on every request and adapts:

Where With a partial key
tools/list Only the dedicated tools the key can use are listed. A read-only key sees search_contacts, not create_contact.
whoami Shows the workspace, the key’s creator and role, and the exact list of effective permissions.
search_operations Returns only operations the key can call, and says how many were hidden. With include_unavailable: true it lists them too, marked available: false with the missing permissions.
describe_operation Shows the permission an operation needs and whether this key has it.
call_operation Always enforced by the REST API: an operation outside the scopes answers 403 forbidden with missing.

Changing the scopes means creating a new key: the new tool list appears the next time the client reloads the server.

Tool What it does
whoami Workspace, credential, role, effective permissions, number of available operations and the dedicated tools this key can use.
search_operations Keyword search over every operation (query, optional module, include_unavailable, limit). Without arguments it lists the modules with their operation counts.
describe_operation The full contract of one operation: permission, path and query parameters, JSON body schema, response schema and the arguments call_operation expects.
call_operation Runs any operation by id, with path_params, query, body, an optional idempotency_key and, for uploads, body_base64 (plus content_type when the operation accepts several).

Operation ids look like <module>.<method>_<path>, for example crm.get_contacts_id for GET /contacts/{id} or crm.post_orders_id_refunds for POST /orders/{id}/refunds. They stay the same across updates as long as the endpoint keeps its path.

A typical exchange: the assistant calls search_operations with "query": "broadcast schedule", gets email.post_broadcasts_id_schedule, reads its body with describe_operation, then runs it with call_operation.

Each dedicated tool maps to one REST endpoint and takes a flat list of arguments: path parameters, query parameters and the body fields side by side, with the same names, types and limits as the API reference. The endpoint behind each tool is written at the end of its description (for example REST: GET /contacts). Tools marked destructive delete, cancel or move money: well-behaved clients ask you to confirm before running them.

Tool What it does Permission
search_contacts Search contacts contacts:read
get_contact Get a contact contacts:read
create_contact Create a contact contacts:write
update_contact Update a contact contacts:write
get_contact_timeline Contact activity timeline contacts:read
tag_contact Apply tags to a contact contacts:write
untag_contact Remove a tag from a contact (destructive) contacts:write
list_tags List tags contacts:read
search_companies Search companies contacts:read
global_search Search contacts, companies and notes contacts:read
add_note Add a note contacts:write
Tool What it does Permission
list_tasks List tasks tasks:read
create_task Create a task tasks:write
complete_task Complete a task tasks:write
list_pipelines List pipelines and stages opportunities:read
list_opportunities List opportunities (deals) opportunities:read
create_opportunity Create an opportunity opportunities:write
update_opportunity Move stage, change value or status opportunities:write
Tool What it does Permission
list_orders List orders orders:read
get_order Get an order orders:read
create_order Create an order orders:write
record_payment Record a payment on an order orders:write
refund_order Refund an order, fully or partially (stripe: true also refunds the card) (destructive) orders:refund
list_products List products and plans products:read
list_subscriptions List subscriptions subscriptions:read
cancel_subscription Cancel a subscription (destructive) subscriptions:write
get_checkout Get a checkout with its sales stats checkouts:read
Tool What it does Permission
send_email Send one email to a contact emails:send_single
list_broadcasts List email broadcasts broadcasts:read
get_broadcast_stats Delivery and engagement of a broadcast broadcasts:read
list_automations List automations automations:read
trigger_automation_goal Fire an API goal for a contact automations:trigger
enroll_in_automation Enroll a contact in an automation automations:write
Tool What it does Permission
list_forms List forms forms:read
list_form_submissions List form submissions forms:submissions_read
list_bookings List bookings booking:read
check_availability Bookable slots of an event type booking:read
create_booking Book on behalf of a contact booking:manage_bookings
list_conversations List inbox conversations conversations:read
reply_conversation Reply in a conversation, or add an internal note conversations:write
send_esign_request Send a document for e-signature esign:write
list_esign_requests List e-signature requests esign:read
Tool What it does Permission
list_analytics_sites List tracked websites analytics:read
analytics_overview Website KPIs over a range analytics:read
analytics_timeseries Website metrics per interval analytics:read
analytics_breakdown Top pages, sources, campaigns, countries, devices… analytics:read
list_reports List reports reports:sales_read
run_report Run a report reports:sales_read

Everything else (settings, custom fields, pipelines, products and plans, promo codes, checkouts, templates, broadcasts scheduling, landing pages, funnels, ads, webhooks, domains…) goes through call_operation.

  1. Open Settings › API keys and click New API key.
  2. Name it after the assistant and the person using it, for example “Cursor – Marta”.
  3. Choose the scopes. Start with Read only and add write scopes only for what the assistant must change (for example contacts:write and tasks:write). Leave out orders:refund, broadcasts:send and the settings scopes unless you really need them.
  4. Click Create key, confirm with your second factor and copy the key.

Replace crm.example.com and acme with your dashboard host and workspace slug.

Add the server to .cursor/mcp.json in your project (or ~/.cursor/mcp.json for every project), and put the key in the AMABLE_API_KEY environment variable:

{
"mcpServers": {
"amabledata": {
"url": "https://crm.example.com/api/mcp/t/acme",
"headers": {
"Authorization": "Bearer ${env:AMABLE_API_KEY}"
}
}
}
}

Then open Cursor Settings › MCP and check that amabledata is enabled and lists its tools.

Ask the assistant “Which amabledata workspace are you connected to, and what can you do?”. It calls whoami and answers with the workspace, the role and the permissions of the key.

You can also test the endpoint from a terminal:

Terminal window
curl -s https://crm.example.com/api/mcp/t/acme \
-H "Authorization: Bearer amb_live_..." \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"whoami","arguments":{}}}'
  • “Find Ada Lovelace, add a note about today’s call and a task to send the offer on Friday.”
  • “Which orders over 500 EUR are still unpaid this month?”
  • “Refund 20 EUR of order WEB-10045 on the card.” (needs orders:refund; the assistant should ask you to confirm)
  • “How did yesterday’s broadcast perform, and which links got the most clicks?”
  • “Top 5 traffic sources of the website in the last 30 days, with revenue.”
  • “Create a checkout for the Pro plan with a 10% launch promo code.” (through call_operation)
  • Results are the JSON returned by the REST API, as text.
  • Lists are cursor-paginated: pass limit (1 to 200) and the next_cursor of the previous page as cursor.
  • A result over 100,000 characters is cut: the assistant receives truncated: true, the full size and a preview, and should ask for fewer items.
  • Downloads (CSV exports, PDFs, images) come back as text for CSV and as base64 up to 256 KB for binary files; larger files only report their size.
  • Money is in minor units with a currency (1999 is 19.99), as everywhere in the API.

Five operations take a raw file instead of JSON: the CSV of a contact import, the workspace logo, a media library image, an e-sign template PDF and its page images. Call them with call_operation, the file in body_base64 and, for images, the content_type (image/png, image/jpeg, image/webp…).

  • Edit locks. The six WebSocket edit-lock endpoints (automations, checkouts, email templates, broadcasts, forms, landing pages) cannot run over MCP; call_operation refuses them and the matching …/lock/status operation shows who is editing. Saving a landing page draft needs the edit lock, so do it from the editor.
  • Browser-only actions. Creating or revoking API keys, managing members, installing apps and the other actions that need a signed-in session with a second factor are not reachable with an API key.
  • Server notifications. The server is stateless: no SSE stream, no resources, no prompts.
  • Marketplace app endpoints (/api/v2/t/<workspace>/apps/…) are not part of the catalog.
Method Answer
initialize Protocol version, tools capability, server info and usage instructions for the assistant.
tools/list The tools this key can use.
tools/call The tool result (isError: true on a REST error).
ping {}
resources/list, prompts/list Empty lists.
Notifications 202 with no body.

Batches (arrays of messages) are accepted.

  • Permissions are the key’s scopes intersected with its creator’s current role. Each dedicated tool needs the permission shown in the table; each operation needs the permission shown by describe_operation.
  • Rate limit: 600 requests per minute per key, shared with any other use of the same key. Every MCP message counts once: a tool that calls the API through its REST request, the other messages (initialize, tools/list, whoami, search_operations, describe_operation) when the server checks the key. Above the limit the tool answers status: 429 with retry_after (seconds); other messages answer HTTP 429 with Retry-After.
  • One key per assistant and person. Revoking it in Settings › API keys cuts the assistant off at once, without touching other integrations.
  • Least privilege. The assistant follows your instructions and the content it reads (emails, notes, form answers). Give it only the scopes it needs, and keep destructive scopes (refunds, sending broadcasts, deleting, settings) for keys you watch closely.
Symptom Cause Fix
The client shows 401 or “unauthorized” Missing header, wrong prefix (Bearer is required), or the key is revoked or its creator was removed Check the Authorization header and the key status in Settings › API keys.
404 tenant_not_found Wrong workspace slug in the URL, or the key belongs to another workspace Copy the slug from the dashboard URL /t/<workspace>/….
A tool you expect is missing The key lacks its permission Ask the assistant to run whoami; create a key with the scope you need and reload the server.
403 forbidden with missing call_operation on an operation outside the key’s scopes Same as above, or let the assistant use only what is available.
403 session_required The action can only be done by a signed-in member in the web app Do it from the dashboard.
status: 429 with retry_after Over 600 requests per minute with this key Wait, then ask the assistant for fewer, larger pages.
422 validation_failed Wrong argument names or values The assistant can call describe_operation and retry; field names are the API’s (given_name, amount_minor…).
truncated: true The result was over 100,000 characters Ask for a smaller limit or a narrower filter.
websocket_only An edit-lock endpoint was called Use the matching lock/status operation, or edit in the dashboard.