/ayrshare:messagesfrom Ayrshare - Unified Social Media API for AI Agents
Reads and sends DMs on Facebook, Instagram, and Twitter/X via Ayrshare, and manages the account's DM auto-responder settings.
Ships in Ayrshare - Unified Social Media API for AI Agents. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Four tools, split into two jobs — moving messages, and the account-level auto-responder:
mcp__ayrshare__get_messages — read conversations and messages for one platform. Its conversation/message ids feed send_message.mcp__ayrshare__send_message — send a DM (text and/or media) to a recipient or into an existing conversation.mcp__ayrshare__get_auto_response — read the account's DM auto-reply settings.mcp__ayrshare__set_auto_response — change the account's DM auto-reply settings.DMs are ONLY on Facebook, Instagram, and Twitter/X. No other network (LinkedIn, TikTok, YouTube, etc.) has a messaging surface here. get_messages and send_message are platform-scoped and accept exactly one of facebook, instagram, twitter. The two auto-response tools take no platform: they govern the selected profile's DM auto-reply across FB/IG/X at once (network-agnostic, but still scoped to the profile the profileKey argument or Profile-Key header selects).
All four are profile-scoped: choose the profile with the profileKey argument or the Profile-Key header (see Auth; the argument wins when both are set).
| Tool | Purpose | Method + Endpoint | Required inputs | Optional inputs |
|---|---|---|---|---|
mcp__ayrshare__get_messages | Read conversations / messages for one platform | GET /messages/:platform | platform (facebook|instagram|twitter) | conversationsOnly (bool), conversationId, status (active|archived), limit (1-100, X/Twitter only), next (cursor, X only) |
mcp__ayrshare__send_message | Send a DM (text and/or media) | POST /messages/:platform | platform (facebook|instagram|twitter); message OR mediaUrls; recipientId OR conversationId | — (none beyond the above) |
mcp__ayrshare__get_auto_response | Read the account's DM auto-reply settings | GET /messages/autoresponse | — (no params) | — |
mcp__ayrshare__set_auto_response | Update the account's DM auto-reply settings | POST /messages/autoresponse | at least one of autoResponseActive (bool), autoResponseMessage (string), autoResponseWaitSeconds (int) | — (none beyond the above) |
Full input schemas and example payloads/responses are in references/schemas.md.
All four tools are profile-scoped: choose the profile with an optional profileKey tool argument or the Profile-Key connection header (the argument wins when both are set). Pass profileKey on the call to act as one client for that call, or set the plugin's Profile-Key setting (/plugin configure ayrshare@ayrshare, then /reload-plugins; it is sent as the Profile-Key header) to default the whole connection to it; with neither, calls act on the account's primary/Business profile. Full model: ../getting-started/SKILL.md.
This applies to the auto-response tools too: they take no platform, but still act on whichever profile the profileKey argument or Profile-Key header selects. Different profiles → different DM auto-reply settings.
get_messages and send_message are :/platform calls; pass exactly one of facebook, instagram, twitter. There is no "all platforms" mode — to scan three networks, make three calls.get_messages to pull conversations/messages, find the right conversation, then reply with send_message. Use conversationsOnly: true for a lightweight list of threads (no message bodies) when you just need to pick a conversation; drop it (or pass a conversationId) to read the messages within one thread.send_message needs two things: content AND a target.
message (text), mediaUrls (an array of URLs), or both. At least one is required — an empty message with no media is rejected. On Twitter/X, message text is required even when you send mediaUrls — a media-only DM is rejected on X (FB/IG accept media-only). mediaUrls count also differs: Facebook and Instagram accept multiple URLs; X/Twitter accepts only one — sending more than one to X errors.recipientId (the person/page-scoped user id) or conversationId (an existing thread). At least one is required.recipientId. On FB/IG you must address the message to a recipientId; a bare conversationId is not enough. On Twitter/X you can reply into a conversationId or send to a recipientId. When in doubt, include recipientId — it's the universally accepted target.recipientId and conversationId come out of get_messages. Read first to obtain them; don't guess or hand-construct ids.mcp__ayrshare__explain_error and tell the user the window has closed (the customer must message first to reopen it). See the global retry rule in ../getting-started/SKILL.md.limit and next are Twitter/X-only. limit (1-100) caps results and next is the pagination cursor — both apply to X only on get_messages. Don't pass them for Facebook or Instagram.get_auto_response takes no params and returns autoResponseActive, autoResponseMessage, autoResponseWaitSeconds. set_auto_response accepts any subset of those three; send the field(s) you're changing (at least one of the three is required). Sending autoResponseMessage: "" (empty string) resets the message to the Ayrshare default, it does not blank it out.get_messages and send_message reject any other platform. Don't try LinkedIn/TikTok/YouTube/etc. DMs through these tools — there is no messaging surface for them.profileKey argument (per call; it wins) or the connection's Profile-Key header; with neither it's the primary profile. Confirm you're targeting the right profile before reading or sending.send_message needs content AND target. Missing either side fails: you must give message OR mediaUrls, and recipientId OR conversationId. FB/IG additionally require recipientId specifically — a conversationId alone won't do. On Twitter/X, message text is required even with mediaUrls — a media-only DM (the generic "mediaUrls alone is fine" case) is rejected on X; it works only on FB/IG.mediaUrls is an array of URLs. Media is referenced by reachable URL, same as posts — there is no upload step here. Validate a media URL with mcp__ayrshare__validate_media (see the Media skill) before sending if you're unsure it's reachable.autoResponseMessage: "" reverts to the Ayrshare default reply; it does not produce an empty auto-reply. To stop auto-replying entirely, set autoResponseActive: false.get_auto_response/set_auto_response hit /messages/autoresponse with no platform; they govern the whole account's (profile's) DM auto-reply across FB/IG/X at once. Don't expect a per-platform toggle here.mcp__ayrshare__explain_error, then surface it — don't loop. send_message is a write: never auto-retry it on a 4xx. A closed messaging window, a bad/expired recipientId, or an unsupported platform won't fix itself on retry, and a blind resend can double-send. Translate the error via mcp__ayrshare__explain_error and present it; 429 gets at most one retry. (Mirrors the global retry-safety rule.)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
13 skills in this plugin
/analyticsSocial media analytics for the Ayrshare MCP server — metrics for a specific post, and account/network-level analytics on a connected social network (followers, impressions, reach, demographics). Use whenever someone wants performance data: "how did my post do", "engagement on that tweet", likes/comments/shares/views/impressions/reach for a post, follower counts, reach or impressions for an account, "analytics for our LinkedIn", "how is our Instagram growing", or comparing networks. Also use when pulling analytics for a post that was NOT created through Ayrshare (by its native Social Post ID). Trigger when calling `mcp__ayrshare__get_post_analytics`, `mcp__ayrshare__get_post_analytics_by_social_id`, or `mcp__ayrshare__get_social_network_analytics`, and even without the word "Ayrshare" — if the user wants social media stats for a post or a network through an AI assistant, this is the skill. For the shared auth model and retry rules, see `../getting-started/SKILL.md`.
/commentsUse whenever someone wants to read, add, or reply to comments on a social media post through the Ayrshare MCP server — the `mcp__ayrshare__get_comments`, `mcp__ayrshare__add_comment`, and `mcp__ayrshare__reply_comment` tools. Trigger on phrasings like "leave a comment on that post", "reply to that commenter", "respond to the top comment", "what are people saying on my LinkedIn post", "pull the comments", or "answer the question someone left on Instagram" — even if the user never says "Ayrshare", "MCP", or names a tool. Also trigger when a user wants to engage with an audience under an existing post rather than create a new post. For installing/configuring the server and the auth model, this skill cross-links to `../getting-started/SKILL.md`. To create the post being commented on, see `../post/SKILL.md`.
/draft-in-brand-voiceDraft social posts that match a brand's established voice for the Ayrshare MCP server: first pull the profile's own past posts (history) to read tone, format, and what performed, then write platform-appropriate copy in that voice and validate it before anything publishes. Use whenever someone wants on-brand content rather than generic copy: "write a post the way we usually post", "draft this in our brand voice", "match our tone", "write like our LinkedIn", or any time content is created for a profile whose established style should be matched. Trigger even without the word "Ayrshare": if the user wants content that sounds like an existing account, this is the skill. It pulls history (`get_post_history` / `get_platform_history`), optionally `get_post_analytics` for what worked, drafts via `generate_post` or your own copy, then checks with `validate_post`. It produces DRAFTS only and never publishes; publishing is the explicit `create_post` step in `../post/SKILL.md`.
/errorsError explanation for the Ayrshare MCP server: translate an Ayrshare error code into a plain-English cause, a classification, and a fix. Use whenever a code or numeric error needs decoding: "what does Ayrshare error 156 mean", "why did that post fail with code 272", "explain this error", "what is error code 110 on Instagram", "how do I fix this Ayrshare error". Trigger when calling `mcp__ayrshare__explain_error`, and even without the word "Ayrshare": if the user surfaces a social-posting error code and wants to know what it means or how to fix it, this is the skill. CRITICAL: whenever ANY OTHER Ayrshare MCP tool returns a structured error code (for example `Error 156: ...`), look the code up here and explain or fix it rather than echoing the raw error back. For the shared auth model and the global retry-safety rule, see `../getting-started/SKILL.md`.
/generateAI content generation for the Ayrshare MCP server — draft post copy and suggest hashtags. Use whenever someone wants help WRITING social content rather than publishing it: "write me a post about our product launch", "draft a tweet announcing the sale", "generate a caption for this image", "give me a LinkedIn post about X", "what should I caption these photos", "suggest hashtags for sustainable fashion", "recommend trending hashtags for ...". Trigger when calling `mcp__ayrshare__generate_post` or `mcp__ayrshare__recommend_hashtags`, and even without the word "Ayrshare" — if the user wants AI-written social copy or hashtag ideas through an assistant, this is the skill. These tools produce DRAFTS ONLY; they never publish. The natural next step is `mcp__ayrshare__validate_post` then `mcp__ayrshare__create_post` (see `../post/SKILL.md`). For the shared auth model and retry rules, see `../getting-started/SKILL.md`.
/getting-startedFoundation skill for the Ayrshare MCP server: auth model, installation, client onboarding, and retry safety. Use it when installing, configuring, or wiring up the Ayrshare MCP plugin or server in Claude Code; when an Ayrshare tool returns 401/403 or "unauthorized", or no Ayrshare tools appear; when it is unclear WHICH credential to use (Business API key vs Profile-Key, how to act as a client); when onboarding a client profile; or when the user has no Ayrshare account or API key yet. Trigger even without the word "Ayrshare" if tools named `mcp__ayrshare__*` are involved, or the user asks how to set up an MCP server for social posting or connect a client's social accounts through an AI assistant. Every other Ayrshare skill cross-links here for the shared auth and retry rules.
npx claudepluginhub ayrshare/ayrshare-social-media-api-claude-plugin --plugin ayrshareOther plugins' skills for the same job