MCP server
Adeli runs a Model Context Protocol server, so an AI agent can use the API as typed tools instead of hand-written HTTP requests. The tools are the REST API: each one calls the same endpoint with the same validation, profile scoping, errors, and side effects. Nothing is available over MCP that is not available over REST.
Endpoint and authentication
POST https://app.tryadeli.com/mcpThere are two ways in, and both reach the same tools:
-
Sign in — Claude.ai, Claude Desktop, and ChatGPT add the URL as a custom connector and send you to Adeli to sign in. You pick the organization and approve what the app may do. There is no key to copy.
-
API key — every other client sends the same
rk_live_key you use for REST, asAuthorization: Bearer rk_live_.... Create one under Settings → API keys. See Authentication. -
Transport — Streamable HTTP. The server is stateless and answers each request with JSON; there is no session to keep and no event stream to hold open.
-
Scope — a connection reaches every profile in its organization. Profile-scoped tools do not default: pass
profileId, or anaccountId, which names its own profile.list_profiles,create_profile,list_accounts, andget_x_usagecan act on the whole organization;list_accountsacceptsprofileIdwhen you want one profile only.
A request with no credential, a revoked key, or an expired sign-in fails with
401 unauthorized before any tool runs. Its WWW-Authenticate header points at
https://app.tryadeli.com/.well-known/oauth-protected-resource/mcp, which is how
a client knows to send you to sign in.
An API key lives in your client's config
MCP clients store the header in a local config file. Read the key from an environment variable where your client supports it, give each machine or agent its own key, and never commit the file. If one leaks, delete that key under Settings → API keys — revocation is immediate.
Connect Claude or ChatGPT by signing in
- Add a custom connector with the URL
https://app.tryadeli.com/mcp:- Claude.ai and Claude Desktop — Settings → Connectors → Add custom connector. Leave the advanced OAuth fields empty.
- ChatGPT — Settings → Apps & Connectors → Create, with authentication set to OAuth.
- Click Connect. Adeli opens in your browser: sign in with Google or your email and password.
- If you belong to more than one organization, choose the one the app should work in.
- Review what the app may do and click Allow. Leave Let it make changes on to post, reply, message, and manage ads; turn it off for a read-only connection that only lists tools that read.
The app then calls Adeli as you, in that organization. A sign-in lasts an hour and the app renews it in the background for up to 30 days of inactivity. Disconnect it any time under Settings → API keys → Connected apps; it stops working on its next request. Removing someone from the organization disconnects their apps too.
Connect with an API key
claude mcp add --transport http adeli https://app.tryadeli.com/mcp \
--header "Authorization: Bearer $ADELI_API_KEY"Claude Code expands $ADELI_API_KEY when you run the command and stores the
result in its config. Clients that can only launch local processes reach the
server through mcp-remote, which
bridges stdio to HTTP.
Check the connection
List the tools with a single request. You should get back the tools described in MCP tools.
curl https://app.tryadeli.com/mcp \
-H "Authorization: Bearer $ADELI_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'To call tools interactively, run npx @modelcontextprotocol/inspector, choose
Streamable HTTP, and either add the Authorization header or sign in
through its OAuth flow.
Once you are connected, Prompts & Use Cases has requests to paste into your client, grouped by what you want to do.
How tools behave
- Results are REST bodies. A tool returns exactly the JSON the matching
endpoint returns, as
structuredContentand as text. - Partial is not an error. Reads that span providers can succeed for some
accounts and fail for others. That result carries
status: "partial"and anerrorslist, as described in Core concepts, and is not marked as a tool error. - Errors keep the envelope. Any
4xxor5xxbecomes a tool error whose content is the usual{ "error": { "code", "message", "details" } }body. See Errors for every code. - Tools say what they change. Read-only tools are annotated
readOnlyHint.disconnect_accountandads_set_statusare annotateddestructiveHint, so clients that ask before acting will ask. - Large reads are truncated in text only. Past about 100 KB, the text copy
is cut short and
structuredContentstill holds the whole body. Filter byplatformoraccountIdto keep responses small.
What MCP does not do
- No multipart uploads.
create_posttakes the JSON body ofPOST /api/v1/posts. For TikTok and YouTube video, pass a public HTTPSvideo.urlrather than base64. Send large files through REST. - No key management, and no profile deletion. Create keys in the dashboard. Agents can list and create profiles, but deleting a profile is not a tool.
- WhatsApp sends templates only.
send_messagesends one of the business's approved WhatsApp templates; free-form WhatsApp replies stay in the dashboard inbox. Connecting a WhatsApp number is done on the dashboard's Accounts page.
For agents
If you are an AI agent reading this page, the essentials are:
- Call
list_profilesand pick the profile the user means; usecreate_profilefor a new customer. Nothing defaults to a profile-specific operation. If the user wants to discover all connected accounts instead,list_accountscan be called withoutprofileId. - Call
list_accounts, withprofileIdwhen the user means one profile. Every account-level tool takes anaccountIdfrom it, which names its profile, soprofileIdcan then be left out. Every ads tool takes anadAccountIdfromads_list_accounts. - Ask the user before calling
create_post,send_message,disconnect_account,ads_create_campaign,ads_create_account,ads_update_account, orads_delete_campaign. These act on a real customer's real accounts, and an ad account, once created, cannot be deleted. - Never call
ads_set_statuswithACTIVEunless the user has confirmed the budget and dates in this conversation. It starts spending money. - Publishing to TikTok and YouTube, and Facebook Reels and videos, is
asynchronous: poll the matching status tool with the returned
publishId. Ask the user for a YouTube video's visibility and whether it is made for kids; never choose either for them. - For anything not covered here, read the
adeli://docs/llms.txtresource. It is this entire documentation site as plain text. - To add Adeli to a codebase rather than call it as tools, use the prompt for the user's use case in the Quickstart.