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-resourceand/.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 }codeis the same code REST returns: see Errors.statusis the HTTP status;retry_afterrepeats the Retry-After header when there is one.- A call that runs over 2 minutes stops with
server.timeout;server.unreachablemeans the API could not be reached.
Tool notes
social_hub_connect_accountandsocial_hub_create_invitetake the platform namesapp_store_connect,bluesky,facebook,google,instagram,linkedin,pinterest,telegram,threads,tiktok,twitter,whatsapp,youtubeandzalo. LinkedIn Pages connect withlinkedin; there is nolinkedin_pageorinstagram_fb. Invites work for OAuth platforms only.social_hub_update_account_permissionstakes eitherpermissions: [...]orunrestricted: 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
| Tool | What it does |
|---|---|
social_hub_list_accounts | List 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_account | Begin 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_profiles | List the profiles a half-finished connection can choose from: Google Business locations, a LinkedIn member profile or LinkedIn company pages. |
social_hub_select_pending_profile | Finish a pending connection by picking which Google Business location, LinkedIn profile or LinkedIn page to connect. |
social_hub_update_account_permissions | Replace 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_account | Disconnect a social account from the workspace. Scheduled posts for it will no longer go out. |
social_hub_get_creator_info | Read 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_pages | List the pages that belong to a connected account, for example the Facebook Pages behind one login. |
social_hub_update_account_page | Make a page the account's default, or switch a page on or off. |
social_hub_list_pinterest_boards | List the boards of a connected Pinterest account. A board `id` is the `board_id` of a post target. |
social_hub_list_brands | List the brands in this workspace. A brand groups the accounts of one business or client. |
social_hub_create_brand | Create a brand. |
social_hub_update_brand | Rename a brand. |
social_hub_delete_brand | Delete a brand. Every account connected under it is disconnected too. |
social_hub_create_invite | Create a link that lets someone else connect one of their accounts to a brand without signing in to SocialWire. |
social_hub_list_invites | List the invite links of a brand, including used and expired ones. |
social_hub_revoke_invite | Cancel an invite link so it can no longer be used. |
social_hub_list_inbox_posts | List published posts together with how many comments each has. Start here to find posts whose comments need attention. |
social_hub_list_post_comments | List the comments on one post. |
social_hub_get_comment_replies | List the replies under one comment. |
social_hub_reply_to_comment | Post 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_comment | Send the author of a comment a private message instead of a public reply. Keep the text within 1,000 bytes. |
social_hub_hide_comment | Hide a comment so the public no longer sees it. The comment is kept and can be shown again. |
social_hub_unhide_comment | Make a hidden comment visible again. |
social_hub_like_comment | Like a comment as the connected account. |
social_hub_unlike_comment | Take back the connected account's like on a comment. |
social_hub_delete_comment | Permanently delete a comment on the platform. This cannot be undone. |
social_hub_list_conversations | List direct-message conversations, most recently active first. |
social_hub_get_conversation | Get one direct-message conversation. |
social_hub_list_messages | List the messages of a conversation, newest first. |
social_hub_send_dm | Send 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_conversation | Archive a conversation or move it back to active. |
social_hub_mark_conversation_read | Mark a conversation as read inside SocialWire. Nothing is shown to the other person. |
social_hub_send_sender_action | Show a typing indicator or mark the person's messages as seen (Instagram, Facebook and WhatsApp). |
social_hub_list_review_accounts | List the connected accounts that receive reviews, with each one's rating summary. |
social_hub_get_reviews | List the reviews of one connected account. |
social_hub_reply_to_review | Reply to a review as the business. On Google Business a new reply replaces the previous one. |
social_hub_get_mentions | List posts and comments in which a connected account was mentioned or tagged. |
social_hub_reply_to_mention | Reply in public to a mention, even when it is on someone else's post. |
social_hub_list_automations | List automations (rules that answer comments or messages automatically), optionally for one account. |
social_hub_get_automation | Get one automation with its steps and counters. |
social_hub_create_automation | Create an automation that reacts to comments or direct messages on an account, described by `steps` or by a `follow_gate`. |
social_hub_update_automation | Change an automation, or pause and resume it with `status`. |
social_hub_delete_automation | Delete an automation together with its run history. |
social_hub_list_automation_firings | List the recent runs of an automation and what each action did. |
social_hub_list_posts | List posts of every status (draft, scheduled, published, failed) with filters. |
social_hub_get_post | Get one post with the delivery result for each account it targets. |
social_hub_create_post | Create 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_post | Edit a post that is a draft, scheduled or failed. |
social_hub_publish_post | Publish a draft or scheduled post right now. |
social_hub_retry_post | Try again on the accounts where a failed or partly failed post did not go out. |
social_hub_unpublish_post | Take 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_post | Delete a post. If it was published it is also removed from the platforms that allow removal. |
social_hub_validate_post | Check a post against each platform's rules without creating it. Returns the problems found per platform. |
social_hub_get_constraints | Read each platform's content rules: text length, number and kind of media, file sizes. |
social_hub_get_post_metrics | Fetch the current engagement numbers of one published post from each platform. |
social_hub_get_posts_metrics | Fetch the current engagement numbers of up to 20 published posts in a single call. |
social_hub_list_instagram_stories | List the Stories currently live on an Instagram account. |
social_hub_get_media_upload_url | Get 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_upload | Confirm that an uploaded file arrived, which makes its `media_id` usable in a post. |
social_hub_list_media | List the files in the media library. |
social_hub_delete_media | Delete a file from the media library. |
social_hub_get_storage_usage | Read how much media storage is used and how much the plan allows. |
social_hub_get_analytics_overview | Summarise 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_analytics | Read the day-by-day metrics of one connected account. |
social_hub_get_brand_analytics | Read the day-by-day metrics of a brand, added up over its accounts. |
social_hub_get_post_analytics | Read the day-by-day engagement of one published post. |
social_hub_create_export | Start an analytics export for a connected account. Poll the export until it completes. |
social_hub_get_export | Get the status of an export and, when it has finished, the download links. |
social_hub_list_exports | List the 50 most recent exports, newest first. |
social_hub_get_export_videos | Read the per-video rows of a finished export. |
social_hub_list_webhooks | List the webhook endpoints of this workspace. |
social_hub_get_webhook | Get one webhook endpoint with its delivery counts. |
social_hub_create_webhook | Register an https address that receives the chosen events as signed POST requests. |
social_hub_update_webhook | Change a webhook endpoint's address or events, or switch it on or off. |
social_hub_delete_webhook | Delete a webhook endpoint. |
social_hub_test_webhook | Send a test event to a webhook endpoint and report the HTTP status it answered with. |
social_hub_list_webhook_deliveries | List the deliveries made to a webhook endpoint. |
social_hub_get_webhook_delivery | Get one delivery with its payload and the response to every attempt. |
social_hub_retry_webhook_delivery | Send a failed webhook delivery again. |
social_hub_list_events | Read the activity log: publishing attempts, webhook deliveries, incoming platform events and account changes. |
social_hub_events_summary | Count events and failures over a time window. |
social_hub_get_usage | Read this billing period's usage next to the plan's allowances. |
social_hub_get_account_limits | Read the remaining quotas of a connected account as the platform reports them. |
social_hub_get_me | Get the profile and plan of the SocialWire user behind this connection. |
social_hub_patch_me | Update the profile settings of the SocialWire user behind this connection. |
social_hub_list_keys | List the workspace's API keys. Secrets are never returned. |
social_hub_revoke_key | Revoke an API key. Anything still using it stops working at once. |
social_hub_moderate_comment | Hide, 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_capability | Tell the SocialWire team about something you needed to do that none of these tools can. Changes nothing and costs nothing. |