MCP Hub
Back to servers

Ayrshare Unofficial MCP Server

Enables AI agents to interact with the Ayrshare API to publish social media posts, manage profiles, and handle comments or messages. It supports executing real-time API calls for analytics, media uploads, and automated scheduling across various social platforms.

Updated
Feb 19, 2026

Ayrshare Unofficial MCP Server

License: MIT Node.js Version

An unofficial MCP (Model Context Protocol) server for the Ayrshare social media API. Enables AI agents to publish posts, manage profiles, upload media, handle comments, send messages, view analytics, and configure auto-scheduling — all through real API calls.

Note: This is an unofficial, community-built project. It is not affiliated with or endorsed by Ayrshare. The official Ayrshare MCP server provides documentation access only — this server actually executes API calls on your behalf.

Prerequisites

  • Node.js >= 18.0.0
  • An Ayrshare account with an API key (get one here)
  • At least a Premium plan for most features (Business plan for profiles and messaging)

Installation

Option 1: npx (Recommended)

Add to your MCP client configuration (e.g. Claude Desktop claude_desktop_config.json):

{
  "mcpServers": {
    "ayrshare": {
      "command": "npx",
      "args": ["-y", "ayrshare-unofficial-mcp"],
      "env": {
        "AYRSHARE_API_KEY": "your-api-key-here"
      }
    }
  }
}

Option 2: Claude Code

claude mcp add ayrshare -e AYRSHARE_API_KEY=your-api-key-here -- npx -y ayrshare-unofficial-mcp

Option 3: Build from Source

git clone https://github.com/yardz/ayrshare-unofficial-mcp.git
cd ayrshare-unofficial-mcp
npm install
npm run build

Then configure your MCP client:

{
  "mcpServers": {
    "ayrshare": {
      "command": "node",
      "args": ["/absolute/path/to/ayrshare-unofficial-mcp/build/index.js"],
      "env": {
        "AYRSHARE_API_KEY": "your-api-key-here"
      }
    }
  }
}

Configuration

Environment VariableRequiredDescription
AYRSHARE_API_KEYYesYour Ayrshare Primary Profile API key
AYRSHARE_PROFILE_KEYNoDefault Profile Key for user profile operations (Business plan)

All tools also accept an optional profileKey parameter to override the default on a per-call basis.

Available Tools (18)

Posts (4 tools)

ToolDescriptionMin Plan
create_postPublish or schedule a post to one or more social platformsBasic
get_postGet details of a specific post by IDBasic
get_post_historyList post history with optional filtersBasic
delete_postDelete a post or scheduled postsBasic

Profiles (3 tools)

ToolDescriptionMin Plan
create_profileCreate a new user profileBusiness
list_profilesList all user profilesBusiness
update_profileUpdate a profile's settingsBusiness

Media (1 tool)

ToolDescriptionMin Plan
upload_mediaUpload an image or video to the media libraryPremium

Comments (3 tools)

ToolDescriptionMin Plan
post_commentPost a comment on a social media postPremium
get_commentsGet comments on a postPremium
delete_commentDelete a commentPremium

Messages (2 tools)

ToolDescriptionMin Plan
send_messageSend a direct message (Facebook, Instagram, X)Business
get_messagesGet messages and conversationsBusiness

Analytics (2 tools)

ToolDescriptionMin Plan
get_post_analyticsGet engagement metrics for a postPremium
get_social_analyticsGet account-level analyticsPremium

Auto-Schedule (3 tools)

ToolDescriptionMin Plan
set_auto_scheduleCreate or update an auto-posting schedulePremium
list_auto_schedulesList all configured schedulesPremium
delete_auto_scheduleDelete a schedulePremium

Tool Details

Posts

create_post

Publish or schedule a social media post to one or more platforms. Supports text, images, videos, scheduling, and auto-scheduling.

ParameterTypeRequiredDescription
poststringYesText content of the post (can be empty if mediaUrls provided)
platformsstring[]YesTarget platforms: bluesky, facebook, gmb, instagram, linkedin, pinterest, reddit, snapchat, telegram, threads, tiktok, twitter, youtube
mediaUrlsstring[]NoHTTPS URLs of images or videos to attach
scheduleDatestringNoISO 8601 UTC datetime (e.g. 2026-03-01T10:00:00Z)
shortenLinksbooleanNoEnable link shortening (requires Max Pack)
requiresApprovalbooleanNoPut post in approval workflow
notesstringNoInternal reference notes
autoScheduleobjectNo{ schedule: true, title?: "schedule-name" } — queue to next slot
profileKeystringNoProfile Key override

Example prompt: "Publish to Instagram and Twitter: 'New product launch! Check it out.' with this image: https://example.com/product.jpg"

get_post

Get details of a specific post by its Ayrshare Post ID.

ParameterTypeRequiredDescription
idstringYesAyrshare Post ID
profileKeystringNoProfile Key override

Example prompt: "Show me the details of post abc123"

get_post_history

List post history with optional filters.

ParameterTypeRequiredDescription
limitnumberNoPosts to return (default 25, max 1000)
platformsstring[]NoFilter by platforms
statusstringNoFilter: success, error, processing, pending, paused, deleted, awaiting approval
typestringNoFilter: immediate or scheduled
lastDaysnumberNoLast N days (default 30, 0 = all)
profileKeystringNoProfile Key override

Example prompt: "Show me my last 10 posts on Instagram"

delete_post

Delete a post from social platforms.

ParameterTypeRequiredDescription
idstringNo*Ayrshare Post ID to delete
bulkstring[]No*Array of Post IDs for bulk deletion
deleteAllScheduledbooleanNo*Delete all pending scheduled posts
profileKeystringNoProfile Key override

*At least one of id, bulk, or deleteAllScheduled is required.

Example prompt: "Delete post abc123"


Profiles

create_profile

Create a new user profile for managing separate social media accounts.

ParameterTypeRequiredDescription
titlestringYesUnique profile name
messagingActivebooleanNoEnable messaging (default false)
disableSocialstring[]NoSocial networks to disable
tagsstring[]NoTags for organizing

Example prompt: "Create a profile called 'Client ABC' with Instagram and Twitter enabled"

list_profiles

List all user profiles with their linked social accounts.

ParameterTypeRequiredDescription
titlestringNoFilter by title
refIdstringNoFilter by reference ID
hasActiveSocialAccountsbooleanNoFilter by active accounts
limitnumberNoMax results (default 5000)
cursorstringNoPagination cursor

Example prompt: "List all my profiles and their connected social accounts"

update_profile

Update an existing profile's settings.

ParameterTypeRequiredDescription
profileKeystringYesProfile Key to update
titlestringYesNew profile title
disableSocialstring[]NoSocial networks to disable
messagingActivebooleanNoEnable/disable messaging
tagsstring[]NoTags for organizing

Example prompt: "Enable messaging on the 'Client ABC' profile"


Media

upload_media

Upload an image or video to Ayrshare's media library. Files are stored for 90 days. Max size: 30MB.

ParameterTypeRequiredDescription
fileUrlstringNo*Public URL of the file to upload
base64DatastringNo*Base64 data URI (e.g. data:image/png;base64,...)
fileNamestringNoName for the file
descriptionstringNoFile description
profileKeystringNoProfile Key override

*One of fileUrl or base64Data is required.

Example prompt: "Upload this image to my media library: https://example.com/photo.jpg"


Comments

post_comment

Post a comment on a social media post.

ParameterTypeRequiredDescription
idstringYesAyrshare Post ID or Social Post ID
commentstringYesComment text
platformsstring[]YesTarget platforms: bluesky, facebook, instagram, linkedin, reddit, tiktok, twitter, youtube
searchPlatformIdbooleanNoSet true when using Social Post ID
mediaUrlsstring[]NoImage URLs to attach
profileKeystringNoProfile Key override

Example prompt: "Comment 'Thanks for the feedback!' on my last Instagram post"

get_comments

Get comments on a social media post.

ParameterTypeRequiredDescription
idstringYesAyrshare Post ID, Social Post ID, or Social Comment ID
searchPlatformIdbooleanNoSet true when using Social Post ID
commentIdbooleanNoSet true when using Social Comment ID
platformstringNoRequired when searchPlatformId or commentId is true
profileKeystringNoProfile Key override

Example prompt: "Show me the comments on post abc123"

delete_comment

Delete a comment from a social media post. Supported on Facebook, Instagram, TikTok, X/Twitter, and YouTube.

ParameterTypeRequiredDescription
idstringYesSocial Comment ID (from get_comments)
platformstringYesPlatform: facebook, instagram, tiktok, twitter, youtube
profileKeystringNoProfile Key override

Example prompt: "Delete the spam comment xyz789 on Instagram"


Messages

send_message

Send a direct message on a social platform.

ParameterTypeRequiredDescription
platformstringYesfacebook, instagram, or twitter
recipientIdstringYesRecipient's platform user ID
messagestringYesMessage text
mediaUrlsstring[]NoMedia file URLs to attach
profileKeystringNoProfile Key override

Example prompt: "Send a message to user 12345 on Instagram saying 'Thanks for reaching out!'"

get_messages

Get messages and conversations from a platform.

ParameterTypeRequiredDescription
platformstringYesfacebook, instagram, or twitter
statusstringNoactive or archived (default: active)
conversationIdstringNoGet a specific conversation
conversationsOnlybooleanNoReturn only conversation list (default: false)
profileKeystringNoProfile Key override

Example prompt: "Show me my recent Instagram conversations"


Analytics

get_post_analytics

Get engagement analytics for a specific post (likes, views, shares, impressions, comments).

ParameterTypeRequiredDescription
idstringYesAyrshare Post ID
platformsstring[]NoFilter by platforms (omit for all)
profileKeystringNoProfile Key override

Note: TikTok and YouTube analytics can take 24-48 hours to update.

Example prompt: "What are the engagement metrics for my last post?"

get_social_analytics

Get account-level analytics (follower count, demographics, impressions, engagement rates).

ParameterTypeRequiredDescription
platformsstring[]YesPlatforms to get analytics for
quartersnumberNoHistorical range 1-4 quarters (Facebook/Instagram/YouTube)
dailybooleanNoReturn daily time-series (Facebook/Instagram/TikTok/YouTube)
profileKeystringNoProfile Key override

Example prompt: "Show me my Instagram follower demographics and engagement rate"


Auto-Schedule

set_auto_schedule

Create or update an auto-posting schedule with predefined times and days. Posts created with autoSchedule in create_post will be queued to the next available slot.

ParameterTypeRequiredDescription
schedulestring[]YesTimes in UTC (e.g. ["09:00Z", "14:00Z", "18:00Z"])
titlestringNoSchedule name (defaults to "default")
daysOfWeeknumber[]No0=Sunday through 6=Saturday (defaults to [0,6])
excludeDatesstring[]NoDates to skip (e.g. ["2026-01-01"])
setStartDatestringNoISO 8601 UTC datetime to begin scheduling
profileKeystringNoProfile Key override

Example prompt: "Set up auto-scheduling for Monday through Friday at 9am, 2pm, and 6pm UTC"

list_auto_schedules

List all configured auto-posting schedules.

ParameterTypeRequiredDescription
profileKeystringNoProfile Key override

Example prompt: "Show me all my auto-posting schedules"

delete_auto_schedule

Delete an auto-posting schedule by title.

ParameterTypeRequiredDescription
titlestringYesSchedule title (case-sensitive)
deleteLastScheduleDatebooleanNoAlso clear the last schedule date
profileKeystringNoProfile Key override

Example prompt: "Delete the 'Weekend Posts' auto-schedule"

Supported Platforms

PlatformPostCommentMessageAnalytics
BlueskyYesYes-Yes
FacebookYesYesYesYes
Google BusinessYes--Yes
InstagramYesYesYesYes
LinkedInYesYes-Yes
PinterestYes--Yes
RedditYesYes-Yes
SnapchatYes--Yes
TelegramYes---
ThreadsYes--Yes
TikTokYesYes-Yes
X (Twitter)YesYesYesYes
YouTubeYesYes-Yes

Plan Requirements

FeatureBasicPremiumBusinessEnterprise
Posts (create, get, history, delete)YesYesYesYes
Media Upload-YesYesYes
Comments (post, get, delete)-YesYesYes
Analytics (post, social)-YesYesYes
Auto-Schedule (set, list, delete)-YesYesYes
Profiles (create, list, update)--YesYes
Messages (send, get)--YesYes

Error Handling

All tools return structured error responses when something goes wrong:

  • API errors from Ayrshare are returned with the original error code and message
  • Network errors are caught and returned with a descriptive message
  • Validation errors (e.g. missing required parameters) are caught before the API call

Error responses have isError: true set so the AI agent can distinguish them from successful responses.

Development

Build

npm install
npm run build

Watch Mode

npm run dev

Test with MCP Inspector

npx @modelcontextprotocol/inspector node build/index.js

Set the AYRSHARE_API_KEY environment variable before running the inspector.

License

MIT

Reviews

No reviews yet

Sign in to write a review