postforme-mcp-server
Give any AI agent — Claude, Cursor, Windsurf, or any MCP-compatible client — full control over your social media through natural language.
README
Post for Me MCP Server
Give any AI agent — Claude, Cursor, Windsurf, or any MCP-compatible client — full control over your social media through natural language.
What is this?
This is a Model Context Protocol (MCP) server that connects your AI tools directly to the Post for Me API — a social media scheduling and publishing platform supporting 10 platforms out of the box.
Once installed, your AI can manage social media end-to-end:
"Schedule a post to go out on Instagram, Facebook, and X tomorrow at 9am" "Show me all posts that failed to publish in the last week and tell me why" "Create a YouTube video post with a custom title, tags, and set it to unlisted" "Get the engagement metrics for every post we made this month on TikTok" "Set up a webhook so I'm notified whenever a post goes live"
21 tools covering the full Post for Me API:
| Category | Tools |
|---|---|
| Media | Upload signed URLs for images and videos |
| Social Posts | Create, schedule, update, delete posts across all platforms |
| Post Results | Fetch publish outcomes, errors, and platform URLs |
| Social Accounts | Connect, manage, and disconnect platform accounts |
| Account Feeds | Retrieve every post from a connected account (including non-API posts) with metrics |
| Webhooks | Subscribe to post and account events |
| Post Previews | Preview exactly what a post will look like before publishing |
Supported platforms: Bluesky · Facebook · Instagram · LinkedIn · Pinterest · Threads · TikTok · TikTok Business · X (Twitter) · YouTube
Prerequisites
- Node.js 18 or later — download here
- A Post for Me account — sign up free
- A Post for Me API key — takes 30 seconds to get (see below)
How to get your API key
- Log in to your Post for Me dashboard
- Navigate to Settings → API
- Copy your API key
⚠️ Keep your API key secret. Set it in your MCP client config — never commit it to source control.
Installation
No build step needed. Pass your API key in your AI client config and the server runs on demand via npx.
Quick install via package manager
Use npx, pnpm dlx, or bunx to run the server without installing anything globally:
# npm / npx (no install required)
npx @nerdsnipe-inc/postforme-mcp-server
# pnpm
pnpm dlx @nerdsnipe-inc/postforme-mcp-server
# bun
bunx @nerdsnipe-inc/postforme-mcp-server
Or install globally:
npm install -g @nerdsnipe-inc/postforme-mcp-server
# then run:
postforme-mcp-server
Connecting to AI Clients
Claude Desktop
Open (or create) your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"postforme": {
"command": "npx",
"args": ["-y", "@nerdsnipe-inc/postforme-mcp-server"],
"env": {
"POSTFORME_API_KEY": "your_api_key_here"
}
}
}
}
Restart Claude Desktop. You should see a hammer icon (🔨) in the chat input — that means MCP tools are active.
Claude Code (CLI)
claude mcp add postforme npx -- -y @nerdsnipe-inc/postforme-mcp-server \
-e POSTFORME_API_KEY=your_api_key_here
Or add it manually to ~/.claude/mcp_servers.json (or your project's .mcp.json):
{
"mcpServers": {
"postforme": {
"command": "npx",
"args": ["-y", "@nerdsnipe-inc/postforme-mcp-server"],
"env": {
"POSTFORME_API_KEY": "your_api_key_here"
}
}
}
}
Project-scoped tip: Add a
.mcp.jsonin your project root so everyone on the team picks it up automatically. Add.mcp.jsonto.gitignoreso your API key isn't committed.
Cursor
- Open Cursor Settings → MCP (or press
Cmd+Shift+P→ "Open MCP Settings") - Click Add Server and fill in:
{
"name": "postforme",
"command": "npx",
"args": ["-y", "@nerdsnipe-inc/postforme-mcp-server"],
"env": {
"POSTFORME_API_KEY": "your_api_key_here"
}
}
- Save and restart Cursor.
Windsurf
Open ~/.codeium/windsurf/mcp_config.json and add:
{
"mcpServers": {
"postforme": {
"command": "npx",
"args": ["-y", "@nerdsnipe-inc/postforme-mcp-server"],
"env": {
"POSTFORME_API_KEY": "your_api_key_here"
}
}
}
}
Any other MCP-compatible client
This server uses stdio transport — the standard for local MCP servers. Your client needs:
- Command:
npx - Args:
["-y", "@nerdsnipe-inc/postforme-mcp-server"] - Env:
POSTFORME_API_KEY
Refer to your client's MCP documentation for exact config syntax.
All 21 Tools — Full Reference
Media
Use media tools when you need to attach images or videos that aren't already on a public URL. The typical flow is: create upload URL → PUT file to signed URL → use media_url in your post.
| Tool | Description |
|---|---|
pfm_create_media_upload_url |
Request a signed upload URL for an image or video. Returns upload_url (PUT your file there) and media_url (use when creating a post). Media is deleted automatically after 24h if unused, or when the post is published. |
Social Posts
Posts support three levels of content override — the most specific wins:
- Default — top-level
captionandmediaapply to all platforms - Platform —
platform_configurations.instagram,.x,.youtube, etc. override defaults per platform - Account —
account_configurations[].configurationoverrides per specific account
| Tool | Description |
|---|---|
pfm_get_posts |
Get a paginated list of social posts. Filter by platform, status (draft, scheduled, processing, processed), external ID, or social account ID. All filters use OR logic. |
pfm_create_post |
Create and schedule (or publish immediately) a post across one or more accounts. Omit scheduled_at to post instantly. Supports full per-platform and per-account configuration. |
pfm_get_post |
Get a single post by ID. |
pfm_update_post |
Replace an existing post's full definition. |
pfm_delete_post |
Delete a post. |
Social Post Results
Post results record the outcome of publishing — whether each platform publish succeeded or failed, plus the live URL.
| Tool | Description |
|---|---|
pfm_get_post_results |
Get a paginated list of post results. Filter by post ID, platform, or social account ID. |
pfm_get_post_result |
Get a single post result by ID. Includes success, error details, platform_data.url, and media. |
Social Accounts
Social accounts are the platform-specific identities used for publishing. Each has a unique id (e.g. spc_xxx) that you reference when creating posts.
| Tool | Description |
|---|---|
pfm_get_social_accounts |
Get connected social accounts. Filter by platform, username, external ID, account ID, or status (connected / disconnected). |
pfm_create_social_account |
Create or upsert a social account using your own OAuth tokens (bring-your-own auth flow). Matches on platform + user_id. |
pfm_get_social_account |
Get a single social account by ID. |
pfm_update_social_account |
Update a social account's username or external ID. |
pfm_create_social_account_auth_url |
Generate an OAuth URL to connect a user's social platform account. Redirect the user to this URL. Include permissions: ['feeds'] if you want to access analytics later. |
pfm_disconnect_social_account |
Disconnect an account — removes all auth tokens and marks it as disconnected. The account record is kept and can be reconnected. |
Social Account Feeds
The account feed returns every post made under a connected account — including posts not made through Post for Me. Requires the account to have been connected with the feeds permission.
| Tool | Description |
|---|---|
pfm_get_account_feed |
Get all posts for a connected account, with optional expand=['metrics'] to include engagement data (views, likes, follows, etc.). Supports cursor-based pagination. |
Supported platforms and notes:
- Instagram — metrics may take up to 48 hours to appear
- Facebook — feeds with
expand=metricsare capped at 10 results by default - TikTok — consumer API exposes limited analytics; use TikTok Business for full metrics
- TikTok Business — full analytics available
- YouTube, Threads, X (Twitter), Pinterest — fully supported
- Bluesky — views/impressions not available via their API
- LinkedIn — metrics only available for company pages
Webhooks
Webhooks let you subscribe to Post for Me events. When an event fires, Post for Me sends a POST to your URL with:
{ "event_type": "social.post.result.created", "data": { ... } }
Verify requests using the Post-For-Me-Webhook-Secret header returned when you create a webhook. Failed deliveries are retried with exponential backoff ~8 times over ~1 day.
| Tool | Description |
|---|---|
pfm_get_webhooks |
Get a paginated list of webhooks. Filter by URL, event type, or ID. |
pfm_create_webhook |
Create a webhook. Available events: social.post.created, social.post.updated, social.post.deleted, social.post.result.created, social.account.created, social.account.updated. Returns a secret for request verification — store it securely. |
pfm_get_webhook |
Get a single webhook by ID. |
pfm_update_webhook |
Update a webhook's URL and/or subscribed event types. |
pfm_delete_webhook |
Delete a webhook. |
Social Post Previews
Generate a visual preview of exactly what a post will look like for each account before publishing. No real accounts needed — you can use placeholder IDs for accounts that aren't connected yet.
| Tool | Description |
|---|---|
pfm_create_post_previews |
Preview a post per account. Returns resolved caption, media, platform, and configuration for each specified account. |
Example Prompts
Here are things you can say to your AI once connected:
"Schedule a post to go out tomorrow at 9am on Instagram and Facebook with the caption 'Big announcement coming!' "
"Show me all posts that failed to publish in the last 7 days — include the error reason"
"Get the engagement metrics for every TikTok post we made this month"
"Create a YouTube video post, set the title to 'Q2 Product Demo', make it unlisted, and tag it as made for professionals"
"Post immediately to our X and Threads accounts: 'We just shipped something big. Stay tuned.' "
"What social accounts do we have connected? Show me the platform, username, and connection status"
"Disconnect the Instagram account with ID spc_abc and show me the confirmation"
"Set up a webhook at https://my-site.com/webhooks/postforme that fires whenever a post result comes in"
"Generate a preview of this caption across our Facebook and Instagram accounts before I schedule it"
"Upload this image URL as a media asset and give me the media_url to use in a post"
"Check the status of post sp_xyz — did it publish successfully on all platforms?"
"List all scheduled posts going out this week, sorted by platform"
"Get the full activity feed for our LinkedIn account and show me the top 5 posts by engagement"
"Create a Pinterest post with board ID brd_123 and a link back to our product page"
"Schedule a TikTok post as a draft so I can finish it in the app later"
Environment Variables Reference
| Variable | Required | Description |
|---|---|---|
POSTFORME_API_KEY |
✅ Yes | Your Post for Me API key — get it from app.postforme.dev |
That's it — just one variable. Social account IDs, post IDs, and webhook IDs are passed as parameters when you call the relevant tools.
Platform-Specific Configuration Reference
When creating posts, you can pass platform_configurations to override caption, media, or platform-specific settings for each platform:
placement (reels / stories / timeline), collaborators, share_to_feed, location, trial_reel_type (manual / performance), audio_name
placement (reels / stories / timeline), location, collaborators, set_caption_for_each_image
X (Twitter)
poll (duration, options, reply_settings), community_id, quote_tweet_id, reply_settings
YouTube
title, description, tags, category_id, privacy_status (public / private / unlisted), embeddable, license, made_for_kids, contains_synthetic_media, publish_at, recording_date, localizations
TikTok / TikTok Business
privacy_status, allow_comment, allow_duet, allow_stitch, disclose_your_brand, disclose_branded_content, is_ai_generated, is_draft, auto_add_music
title, board_ids, link
Threads
placement (reels / timeline)
LinkedIn, Bluesky
Caption and media overrides only.
Running from source (contributors)
git clone https://github.com/Nerdsnipe-Inc/postforme-mcp-server.git
cd postforme-mcp-server
npm install
Point your MCP client at the source via tsx:
{
"command": "npx",
"args": ["tsx", "/absolute/path/to/postforme-mcp-server/src/index.ts"]
}
Or build for production:
npm run build
node dist/index.js
Development
# Install dependencies
npm install
# Run in development mode (no build step needed)
npm run dev
# Type-check without building
npm run typecheck
# Build for production
npm run build
# Watch mode (rebuilds on file changes)
npm run build:watch
# Run tests
npm test
# Run tests with coverage
npm run test:coverage
Project Structure
postforme-mcp-server/
├── src/
│ ├── index.ts # MCP server entry point — registers all tools
│ ├── client.ts # HTTP client (auth, URL builder, error handling)
│ └── tools/
│ ├── media.ts # 1 media upload tool
│ ├── social_posts.ts # 5 post CRUD tools
│ ├── social_post_results.ts # 2 post result tools
│ ├── social_accounts.ts # 6 social account tools
│ ├── social_account_feeds.ts # 1 account feed tool
│ ├── webhooks.ts # 5 webhook tools
│ └── social_post_previews.ts # 1 post preview tool
├── tests/
│ ├── helpers.ts # Shared mocks and test utilities
│ ├── client.test.ts # Client and URL builder tests
│ ├── server.test.ts # Tool registry invariant tests
│ └── tools.test.ts # Handler tests for all 21 tools
├── dist/ # Compiled output (generated by npm run build)
├── .env.example # Environment variable template
├── package.json
├── tsconfig.json
└── README.md
Adding a new tool
- Find the relevant module in
src/tools/(or create a new one) - Add an entry following the existing pattern:
{
name: "pfm_your_tool_name",
description: "What this tool does and when to use it",
inputSchema: z.object({
id: z.string().describe("The resource ID"),
}),
handler: async (args: Record<string, unknown>, config: PostForMeConfig) => {
const { id } = args as { id: string };
try {
const result = await pfmRequest("GET", `/v1/your-endpoint/${id}`, {
apiKey: config.apiKey,
});
return JSON.stringify(result, null, 2);
} catch (e) {
return formatError(e);
}
},
}
- Import and spread it into
ALL_TOOLSinsrc/index.ts - Add handler tests in
tests/tools.test.ts - Run
npm testto verify everything passes - Submit a PR!
Troubleshooting
The server isn't showing up in my AI client
- Make sure Node.js 18+ is installed:
node --version - Try running
npx @nerdsnipe-inc/postforme-mcp-serverdirectly in a terminal to see any errors - Restart your AI client after changing MCP config
Getting "POSTFORME_API_KEY is not set" errors
- Verify the
envblock in your MCP client config includesPOSTFORME_API_KEY - Or create a
.envfile in your working directory withPOSTFORME_API_KEY=your_key
Getting 401 Unauthorized
- Double-check your API key in the Post for Me dashboard
- Make sure there are no extra spaces or line breaks in the key
Post published on some platforms but not others
- Use
pfm_get_post_resultsfiltered by the post ID to see per-platform outcomes - Each result includes an
errorfield explaining what went wrong on that platform
Account feed returns no data / 404
- The account must have been connected with the
feedspermission - Use
pfm_create_social_account_auth_urlwithpermissions: ['posts', 'feeds']to reconnect it
Media upload fails
- The signed
upload_urlfrompfm_create_media_upload_urlis short-lived — use it immediately - PUT the file directly to the signed URL, then use the returned
media_urlin your post
Contributing
Pull requests are welcome! Please:
- Fork the repo
- Create a feature branch (
git checkout -b feature/my-new-tool) - Add your changes and write tests (
npm testmust pass) - Commit and push, then open a PR
Keep tool names prefixed with pfm_ and handler args typed as Record<string, unknown> with internal casts.
License
MIT © Small Business AI Specialist
Related
- Post for Me — the social media scheduling and publishing platform behind the API
- Post for Me API Docs
- Model Context Protocol
- MCP TypeScript SDK
- GoHighLevel MCP Server — our MCP server for GHL
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。