Docs menu

Agents

MCP server

SocialWire has a built-in MCP server: 90 tools that run the same operations as the REST API, with the same rules, limits and errors. Setup for each client is on the AI agents guide.

Address and transport

One address for every client: https://api.zaynstack.com/mcp, over streamable HTTP (not SSE or stdio). Directories and clients that read server cards find it at https://api.zaynstack.com/.well-known/mcp/server-card.json: name, version, protocol versions, transport and how to sign in.

Sign-in

  • OAuth (clients with a sign-in step): the client discovers the server from /.well-known/oauth-protected-resource and /.well-known/oauth-authorization-server, registers itself at /oauth/register, and opens SocialWire so you can allow access. Authorization code with PKCE (S256). The code lives 10 minutes, access tokens 1 hour, refresh tokens 30 days (rotated on each use).
  • API key: send Authorization: Bearer sh_live_…. A scoped or brand-limited key limits the agent the same way it limits REST calls.

An OAuth sign-in has full access to the workspace of the person who approved it. To limit an agent, give it a scoped key instead.

/oauth/register answers bad input in the API error shape: validation.field_required (no client_name, no redirect_uris) or validation.field_invalid (more than 10 redirect URIs, or one that is not https, http on localhost or an app scheme), with meta.field. Other OAuth errors use the standard { error, error_description } shape.

The context input

Every tool takes an optional context: one short sentence on the goal the call serves. It is not sent to the REST API. Describe people by role, never by name, email or id. The exception is social_hub_report_missing_capability, where context is required and says what you needed that no tool can do.

{
  "name": "social_hub_create_post",
  "arguments": {
    "text": "Doors open at 9",
    "targets": [{ "account_id": "…" }],
    "publish_now": true,
    "context": "Announce the store opening for the marketing lead"
  }
}

Errors

A failed tool call returns isError: true and one JSON object as text, with the REST error's code and message and its meta keys flattened in:

{ "code": "account.reconnection_required", "error": "This account must be reconnected before it can be used", "status": 403, "id": "…" }
{ "code": "publishing.velocity_limit", "error": "Publishing too fast: …", "status": 429, "account_id": "…", "window": "hour", "limit": 25, "retry_after_seconds": 1800, "retry_after": 1800 }
  • code is the same code REST returns: see Errors.
  • status is the HTTP status; retry_after repeats the Retry-After header when there is one.
  • A call that runs over 2 minutes stops with server.timeout; server.unreachable means the API could not be reached.

Tool notes

  • social_hub_connect_account and social_hub_create_invite take the platform names app_store_connect, bluesky, facebook, google, instagram, linkedin, pinterest, telegram, threads, tiktok, twitter, whatsapp, youtube and zalo. LinkedIn Pages connect with linkedin; there is no linkedin_page or instagram_fb. Invites work for OAuth platforms only.
  • social_hub_update_account_permissions takes either permissions: [...] or unrestricted: true (every permission), not both.
  • Publishing, replying and deleting act on real accounts: most clients ask you to confirm those calls. Tools are marked read-only, destructive or idempotent so clients can decide.

All tools

MCP tools
ToolWhat it does
social_hub_list_accountsList the social accounts connected to this workspace, optionally for one brand. Each account's `id` is the `account_id` the other tools expect.
social_hub_connect_accountBegin connecting a social account. Platforms that use OAuth return an `auth_url` for the person to open in a browser; Telegram, Bluesky and App Store Connect connect immediately from the credentials in `metadata` and return the new `account_id`.
social_hub_list_pending_profilesList the profiles a half-finished connection can choose from: Google Business locations, a LinkedIn member profile or LinkedIn company pages.
social_hub_select_pending_profileFinish a pending connection by picking which Google Business location, LinkedIn profile or LinkedIn page to connect.
social_hub_update_account_permissionsReplace the permission list of a connected account, or send `unrestricted: true` to give it every permission. Send one of the two. Dropping a permission also deletes the stored data that permission covered.
social_hub_disconnect_accountDisconnect a social account from the workspace. Scheduled posts for it will no longer go out.
social_hub_get_creator_infoRead a TikTok account's posting options: whether it may post right now, allowed privacy levels, longest video, and the comment, duet and stitch settings.
social_hub_list_account_pagesList the pages that belong to a connected account, for example the Facebook Pages behind one login.
social_hub_update_account_pageMake a page the account's default, or switch a page on or off.
social_hub_list_pinterest_boardsList the boards of a connected Pinterest account. A board `id` is the `board_id` of a post target.
social_hub_list_brandsList the brands in this workspace. A brand groups the accounts of one business or client.
social_hub_create_brandCreate a brand.
social_hub_update_brandRename a brand.
social_hub_delete_brandDelete a brand. Every account connected under it is disconnected too.
social_hub_create_inviteCreate a link that lets someone else connect one of their accounts to a brand without signing in to SocialWire.
social_hub_list_invitesList the invite links of a brand, including used and expired ones.
social_hub_revoke_inviteCancel an invite link so it can no longer be used.
social_hub_list_inbox_postsList published posts together with how many comments each has. Start here to find posts whose comments need attention.
social_hub_list_post_commentsList the comments on one post.
social_hub_get_comment_repliesList the replies under one comment.
social_hub_reply_to_commentPost a public reply on a post, or under a specific comment when `comment_id` is given. Keep the text within 2,200 bytes.
social_hub_private_reply_to_commentSend the author of a comment a private message instead of a public reply. Keep the text within 1,000 bytes.
social_hub_hide_commentHide a comment so the public no longer sees it. The comment is kept and can be shown again.
social_hub_unhide_commentMake a hidden comment visible again.
social_hub_like_commentLike a comment as the connected account.
social_hub_unlike_commentTake back the connected account's like on a comment.
social_hub_delete_commentPermanently delete a comment on the platform. This cannot be undone.
social_hub_list_conversationsList direct-message conversations, most recently active first.
social_hub_get_conversationGet one direct-message conversation.
social_hub_list_messagesList the messages of a conversation, newest first.
social_hub_send_dmSend a direct message in an existing conversation. Text is limited to 1,000 bytes. Quick replies, buttons, cards and lists are only available on the platforms that support them.
social_hub_update_conversationArchive a conversation or move it back to active.
social_hub_mark_conversation_readMark a conversation as read inside SocialWire. Nothing is shown to the other person.
social_hub_send_sender_actionShow a typing indicator or mark the person's messages as seen (Instagram, Facebook and WhatsApp).
social_hub_list_review_accountsList the connected accounts that receive reviews, with each one's rating summary.
social_hub_get_reviewsList the reviews of one connected account.
social_hub_reply_to_reviewReply to a review as the business. On Google Business a new reply replaces the previous one.
social_hub_get_mentionsList posts and comments in which a connected account was mentioned or tagged.
social_hub_reply_to_mentionReply in public to a mention, even when it is on someone else's post.
social_hub_list_automationsList automations (rules that answer comments or messages automatically), optionally for one account.
social_hub_get_automationGet one automation with its steps and counters.
social_hub_create_automationCreate an automation that reacts to comments or direct messages on an account, described by `steps` or by a `follow_gate`.
social_hub_update_automationChange an automation, or pause and resume it with `status`.
social_hub_delete_automationDelete an automation together with its run history.
social_hub_list_automation_firingsList the recent runs of an automation and what each action did.
social_hub_list_postsList posts of every status (draft, scheduled, published, failed) with filters.
social_hub_get_postGet one post with the delivery result for each account it targets.
social_hub_create_postCreate a post. Send `publish_now: true` to publish immediately, `scheduled_at` to schedule it, or neither to save a draft. `targets` lists the accounts to post to; `stagger` spreads them over time.
social_hub_update_postEdit a post that is a draft, scheduled or failed.
social_hub_publish_postPublish a draft or scheduled post right now.
social_hub_retry_postTry again on the accounts where a failed or partly failed post did not go out.
social_hub_unpublish_postTake a published post down from one platform (`account_id`) or all of them while keeping it in SocialWire. Some platforms, such as TikTok, do not allow removal.
social_hub_delete_postDelete a post. If it was published it is also removed from the platforms that allow removal.
social_hub_validate_postCheck a post against each platform's rules without creating it. Returns the problems found per platform.
social_hub_get_constraintsRead each platform's content rules: text length, number and kind of media, file sizes.
social_hub_get_post_metricsFetch the current engagement numbers of one published post from each platform.
social_hub_get_posts_metricsFetch the current engagement numbers of up to 20 published posts in a single call.
social_hub_list_instagram_storiesList the Stories currently live on an Instagram account.
social_hub_get_media_upload_urlGet an address to upload one file to, plus the `media_id` to attach to a post afterwards. Upload the bytes with an HTTP PUT, then call the verify tool.
social_hub_verify_media_uploadConfirm that an uploaded file arrived, which makes its `media_id` usable in a post.
social_hub_list_mediaList the files in the media library.
social_hub_delete_mediaDelete a file from the media library.
social_hub_get_storage_usageRead how much media storage is used and how much the plan allows.
social_hub_get_analytics_overviewSummarise how the posts published in a date range performed, for the whole workspace or narrowed to one account, brand or platform.
social_hub_get_account_analyticsRead the day-by-day metrics of one connected account.
social_hub_get_brand_analyticsRead the day-by-day metrics of a brand, added up over its accounts.
social_hub_get_post_analyticsRead the day-by-day engagement of one published post.
social_hub_create_exportStart an analytics export for a connected account. Poll the export until it completes.
social_hub_get_exportGet the status of an export and, when it has finished, the download links.
social_hub_list_exportsList the 50 most recent exports, newest first.
social_hub_get_export_videosRead the per-video rows of a finished export.
social_hub_list_webhooksList the webhook endpoints of this workspace.
social_hub_get_webhookGet one webhook endpoint with its delivery counts.
social_hub_create_webhookRegister an https address that receives the chosen events as signed POST requests.
social_hub_update_webhookChange a webhook endpoint's address or events, or switch it on or off.
social_hub_delete_webhookDelete a webhook endpoint.
social_hub_test_webhookSend a test event to a webhook endpoint and report the HTTP status it answered with.
social_hub_list_webhook_deliveriesList the deliveries made to a webhook endpoint.
social_hub_get_webhook_deliveryGet one delivery with its payload and the response to every attempt.
social_hub_retry_webhook_deliverySend a failed webhook delivery again.
social_hub_list_eventsRead the activity log: publishing attempts, webhook deliveries, incoming platform events and account changes.
social_hub_events_summaryCount events and failures over a time window.
social_hub_get_usageRead this billing period's usage next to the plan's allowances.
social_hub_get_account_limitsRead the remaining quotas of a connected account as the platform reports them.
social_hub_get_meGet the profile and plan of the SocialWire user behind this connection.
social_hub_patch_meUpdate the profile settings of the SocialWire user behind this connection.
social_hub_list_keysList the workspace's API keys. Secrets are never returned.
social_hub_revoke_keyRevoke an API key. Anything still using it stops working at once.
social_hub_moderate_commentHide, unhide or delete one comment in a single call. Give `post_id` and `account_id` when you have them; for a comment already in the SocialWire inbox the comment's SocialWire id alone is enough.
social_hub_report_missing_capabilityTell the SocialWire team about something you needed to do that none of these tools can. Changes nothing and costs nothing.