Skip to main content
Glama

PostFast MCP 服务器

用于 PostFast API 的 MCP 服务器 —— 通过 Claude、Cursor、VS Code 等 AI 工具安排和管理社交媒体帖子。

快速开始

1. 获取您的 API 密钥

登录 PostFast,进入侧边栏的 API,然后生成一个密钥。

2. 安装

选择您偏好的方式:

Claude Desktop(推荐)

Claude Desktop 扩展目录 下载扩展或手动安装:

  1. 添加到 claude_desktop_config.json

{
  "mcpServers": {
    "postfast": {
      "command": "npx",
      "args": ["-y", "postfast-mcp"],
      "env": {
        "POSTFAST_API_KEY": "your-api-key-here"
      }
    }
  }
}
  1. 重启 Claude Desktop。

Claude Code

通过插件(等待市场审核):

/plugin install postfast@claude-plugins-official

安装后,设置您的 API 密钥 —— 选择以下任一方式:

# Option A: Add to your shell profile (~/.zshrc or ~/.bashrc)
export POSTFAST_API_KEY="your-api-key-here"

# Option B: Add to ~/.claude/settings.local.json
# { "env": { "POSTFAST_API_KEY": "your-api-key-here" } }

然后重启 Claude Code。

通过手动配置:

添加到您项目的 .mcp.json~/.claude/.mcp.json(全局):

{
  "mcpServers": {
    "postfast": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "postfast-mcp"],
      "env": {
        "POSTFAST_API_KEY": "your-api-key-here"
      }
    }
  }
}

Cursor / VS Code / Windsurf / 其他 MCP 客户端

添加到您的 MCP 配置(.mcp.jsonmcp.json 或工具的设置界面):

{
  "mcpServers": {
    "postfast": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "postfast-mcp"],
      "env": {
        "POSTFAST_API_KEY": "your-api-key-here"
      }
    }
  }
}

3. 使用它

向您的 AI 助手询问如下内容:

  • "List my connected social accounts"

  • "Schedule a post to Instagram for tomorrow at 9am"

  • "Show me all scheduled posts for this week"

  • "Upload this image and create a LinkedIn post with it"

  • "Create a Facebook reel with this video"

  • "Show me analytics for my Instagram posts this month"

可用工具

工具

描述

list_accounts

列出已连接的社交媒体账号

list_posts

列出带有筛选条件的帖子(平台、状态、日期范围)

create_posts

创建并安排帖子(批量,最多 15 条)

delete_post

按 ID 删除帖子

upload_media

上传本地文件并获取媒体密钥(处理完整流程)

get_upload_urls

获取用于上传媒体文件的签名 URL

list_pinterest_boards

获取账号的 Pinterest 看板

list_youtube_playlists

获取账号的 YouTube 播放列表

generate_connect_link

生成用于客户端连接账号的链接

get_post_analytics

获取已发布帖子的表现指标 —— Instagram、Facebook、TikTok、Threads、YouTube、LinkedIn(公司主页)

支持的平台

Facebook, Instagram, X (Twitter), TikTok, LinkedIn, YouTube, BlueSky, Threads, Pinterest, Telegram

平台特定控制项

创建帖子时,您可以通过 controls 参数传递平台特定的设置:

平台

控制项

X (Twitter)

xCommunityId, xQuoteTweetUrl, xRetweetUrl

Instagram

instagramPublishType (TIMELINE/STORY/REEL), instagramPostToGrid, instagramCollaborators

Facebook

facebookContentType (POST/REEL/STORY), facebookAllowComments, facebookPrivacy, facebookReelsCollaborators

TikTok

tiktokPrivacy (PUBLIC/MUTUAL_FRIENDS/FOLLOWER_OF_CREATOR/ONLY_ME), tiktokIsDraft, tiktokAllowComments, tiktokAllowDuet, tiktokAllowStitch, tiktokBrandOrganic, tiktokBrandContent, tiktokAutoAddMusic, tiktokIsAigc

YouTube

youtubeTitle, youtubePrivacy (PUBLIC/PRIVATE/UNLISTED), youtubeTags, youtubeCategoryId, youtubeIsShort, youtubeMadeForKids, youtubePlaylistId, youtubeThumbnailKey

Pinterest

pinterestBoardId (必填), pinterestLink

LinkedIn

linkedinAttachmentKey, linkedinAttachmentTitle

媒体上传

upload_media 工具在单次调用中处理完整流程:

  1. 从文件扩展名检测内容类型

  2. 从 PostFast 获取签名上传 URL

  3. 上传文件

  4. 返回可在 create_posts 中使用的 keytype

支持的格式:JPEG, PNG, GIF, WebP, MP4, WebM, MOV

如果您需要对上传过程进行更多控制,也可以直接使用 get_upload_urls

环境变量

变量

必需

描述

POSTFAST_API_KEY

您的工作区 API 密钥

POSTFAST_API_URL

API 基础 URL (默认: https://api.postfa.st)

测试

使用 MCP Inspector 验证一切是否正常工作:

POSTFAST_API_KEY=your-key npx @modelcontextprotocol/inspector npx postfast-mcp

API 文档

完整的 REST API 文档:postfa.st/docs

开发

npm install
npm run build
node dist/index.js

徽章

peturgeorgievv-factory/postfast-mcp MCP server

许可证

MIT

-
security - not tested
F
license - not found
-
quality - not tested

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/peturgeorgievv-factory/postfast-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server