Pages in MCP
Connect accounts
Call accounts_connect with one of instagram, facebook, linkedin, tiktok, threads, twitter, discord, telegram, bluesky, youtube, pinterest and an optional platformSetId. It works exactly like POST /api/accounts/connect in the REST API: the same plan limits, the same link lifetime, the same connectPlatform rate limit and the same daily link cap for Free and new accounts.
{
"platform": "instagram",
"platformSetId": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40"
}To reconnect an account, revoked or with health.needsReconnect, pass its id; the platform comes from the account. An active account gets refreshed tokens and permissions, a revoked one is reactivated. For a new connection, expectedUsername or expectedPlatformAccountId pins the account the user must sign in to. Signing in to another account fails with ACCOUNT_MISMATCH and changes nothing. On Free, an account connected in another Ampost workspace (or disconnected from one less than 30 days ago) fails with SOCIAL_ACCOUNT_IN_USE.
{
"accountId": "c41d8e2f-6a3b-4f9c-b1e5-7d2a9c4e6f80"
}Show the returned connectUrl to the user and tell them to open it in a browser. Social consent cannot be completed by the agent or inside the conversation. A client on MCP revision 2026-07-28 that supports URL elicitation opens the page for the user instead (after asking them), and the result then has no connectUrl, so the link never enters the conversation. After the user finishes the Ampost-hosted confirmation and provider flow, poll every 2–5 seconds:
{
"connectRequestId": "11111111-1111-4111-8111-111111111111"
}Status is exactly one of pending, awaiting_selection, connected, failed, or expired. A connected result includes accountId, which can be passed to accounts_get; a reconnected account keeps its id. On failed or expired, error.message gives the reason and the next step for the user, the same text the hosted page shows. error.code SUPERSEDED means a newer request for the same platform replaced this one, so poll the newer one. A new request also replaces one the user opened but did not finish, so call accounts_connect again when the user lost or closed the page; USER_CANCELLED means the user cancelled or declined consent. Status uses the apiRead rate limit.
An app that embeds account connection passes redirectUrl (https; http only for localhost) and optionally state. When the connection ends, Ampost's result page links there (the user clicks to leave Ampost) with status, connectRequestId, platform, accountId or error, and state; confirm with accounts_connect_status. See Embed account connection in your app.
Never ask the user to paste an access token, OAuth authorization code, password, state value, URL fragment, or Facebook Page token into chat. The create URL is returned once; status output contains only safe Ampost error codes and never provider credentials or raw provider errors.
accounts_disconnect disconnects an account and revokes Ampost's access at the platform where it can. accounts_set_analytics turns metered X analytics on or off for an X account; ask the user first, since every read counts against the plan's X units. accounts_list_boards and accounts_set_board pick the default board of a Pinterest account (or create one); the connect picks it by itself only when the account has exactly one board. There are no separate profiles (platform sets group accounts) or headless authorization. Facebook Page selection stays in the Ampost-hosted browser UI.