Ayrshare MCP Server 一共暴露 27 个工具,下方按领域分组列出。每个工具都会在进程内通过真实的 Ayrshare API 处理链进行分发。
作用范围
每个工具的作用范围要么是 Profile(配置文件级),要么是 Account(账户级):
- Profile —— 工具接受
profileKey 参数,以某个子配置文件为目标。 - Account —— 工具 不接受
profileKey,它在账户层面执行操作。
不接受 profileKey 参数的 6 个工具为:create_profile、list_profiles、explain_error、validate_media、generate_post 和 recommend_hashtags。其他所有工具都接受 profileKey;其中 generate_jwt_social_linking_url 必须 提供 profileKey。注意:recommend_hashtags 虽然不接受 profileKey 参数,但它仍会读取连接的 Profile-Key 请求头来决定使用哪个已关联的 TikTok 账户,因此其结果与具体配置文件相关。
当本次调用的 profileKey 参数与 Profile-Key 请求头同时存在时,参数优先生效。优先级规则详见 Connect & Setup。
帖子(Posts)
| 工具 | 作用范围 | 用途 |
|---|
create_post | Profile | 发布到一个或多个已关联的平台。 |
validate_post | Profile | 干跑(dry-run)校验,输入格式与 create_post 相同。 |
get_post | Profile | 通过 Ayrshare Post ID 获取某条帖子。 |
update_post | Profile | 更新已排期或等待审批的帖子。 |
retry_post | Profile | 重新提交一条失败的帖子。 |
历史(History)
| 工具 | 作用范围 | 用途 |
|---|
get_post_history | Profile | 通过 Ayrshare 发送的帖子。 |
get_platform_history | Profile | 直接来自平台的帖子和分析数据,包括非 Ayrshare 发送的帖子。对于 X/Twitter 的 userId / userName 查询,必须仅使用账户 API 密钥;此时传入 profileKey 参数或 Profile-Key 请求头会返回 400 错误。 |
分析(Analytics)
| 工具 | 作用范围 | 用途 |
|---|
get_post_analytics | Profile | 根据 Ayrshare Post ID 获取单条帖子的指标。 |
get_post_analytics_by_social_id | Profile | 根据平台原生 Social Post ID 获取单条帖子的指标。 |
get_social_network_analytics | Profile | 获取已关联社交账户的账户级分析与受众信息。对于 X/Twitter 的 userId / userName 查询,必须仅使用账户 API 密钥;此时传入 profileKey 参数或 Profile-Key 请求头会返回 400 错误。 |
| 工具 | 作用范围 | 用途 |
|---|
get_comments | Profile | 读取某条帖子的评论。 |
add_comment | Profile | 发表顶级评论。 |
reply_comment | Profile | 回复某条评论。 |
消息 / 私信(Messages / DMs)
| 工具 | 作用范围 | 用途 |
|---|
get_messages | Profile | 获取某个平台的私信。 |
send_message | Profile | 发送一条私信。 |
get_auto_response | Profile | 读取私信自动回复设置。 |
set_auto_response | Profile | 配置私信自动回复。 |
配置文件(Profiles)
| 工具 | 作用范围 | 用途 |
|---|
list_profiles | Account | 列出子配置文件。 |
create_profile | Account | 创建子配置文件。 |
generate_jwt_social_linking_url | Profile | 生成 JWT 社交账户关联 URL(必须提供 profileKey)。 |
| 工具 | 作用范围 | 用途 |
|---|
validate_media | Account | 通过 HEAD 请求检查媒体 URL 是否可访问,并返回 contentType。 |
生成(Generate)
| 工具 | 作用范围 | 用途 |
|---|
generate_post | Account | AI 生成帖子文案。 |
recommend_hashtags | Account | 基于 TikTok 浏览量数据推荐话题标签。使用由 Profile-Key 请求头指定的配置文件下已关联的 TikTok 账户;不接受单次调用的 profileKey。 |
Webhook
| 工具 | 作用范围 | 用途 |
|---|
register_webhook | Profile | 注册 Webhook。 |
unregister_webhook | Profile | 注销 Webhook。 |
list_webhooks | Profile | 列出已注册的 Webhook。 |
错误(Errors)
| 工具 | 作用范围 | 用途 |
|---|
explain_error | Account | 将 Ayrshare 错误码解析为原因、分类与修复建议。 |
本目录与线上服务器的 tools/list 保持一致。后续还会规划更多工具(例如 Links 相关工具)。如有疑问,请以 tools/list 的返回结果为准。本目录由 MCP 服务器团队维护。