Introduction
Connect AI agents to Infipost using the Model Context Protocol (MCP)
MCP (Model Context Protocol) lets AI agents interact with Infipost directly, listing integrations, scheduling posts, generating images and videos, clipping long videos into shorts, all through a standardized tool-calling interface.
This means you can connect Claude, ChatGPT, Cursor, or any MCP-compatible client to your Infipost account and manage your social media through natural language.
How It Works
Infipost exposes an MCP server that provides the tools below to AI agents. The agent discovers these tools, understands their schemas, and calls them on your behalf.
Available Tools
| Tool | Description |
|---|---|
integrationList | List all connected social media accounts (optionally filtered by group) |
groupList | List all groups (customers) for your organization |
integrationConnectTool | Get a link for connecting a new social media account |
integrationSchema | Get platform-specific posting rules and settings schema |
triggerTool | Execute platform-specific helpers (e.g., list Discord channels) |
integrationSchedulePostTool | Schedule, draft, or immediately publish posts |
postsListTool | List the organization's posts scheduled between two dates (with their current settings) |
postSettingsTool | Update the provider settings and the media of a scheduled post or draft that was not published yet |
postAttachmentsTool | Replace the media of a scheduled post or draft that was not published yet |
deletePostTool | Delete a post from Infipost (a post that was already published stays live on the channel) |
integrationAnalyticsTool | Read the analytics of a connected channel |
postAnalyticsTool | Read the analytics of a published post |
mediaListTool | List the images and videos in the media library |
uploadFromUrlTool | Upload an image or video to the media library from a URL |
mediaStatusTool | Check whether an uploaded media finished processing |
generateImageTool | Generate AI images for posts |
generateVideoOptions | List available video generation options |
videoFunctionTool | Get video generator settings (e.g., available voices) |
generateVideoTool | Generate videos for posts |
videoStatusTool | Check the status of a video generation |
clippingTool | Turn a long YouTube video into captioned vertical clips and draft posts |
clippingStatusTool | Check a clipping and get the finished clips |
Authentication
There are three ways to authenticate with the MCP server:
API Key
Your API key lives in Infipost under Settings → Developers → Public API. Click the reveal icon to show it, then copy. You can rotate it from the same place, rotating immediately invalidates the old key, so update anything using it (scripts, n8n, MCP clients, the CLI) at the same time.
Use it directly in the MCP endpoint URL, or as a Bearer token.
Sign in with Infipost (OAuth)
MCP clients that support OAuth can connect without an API key. Point the client at the OAuth-protected endpoint:
URL: https://mcp.infipost.asia/mcp-oauth-dynamic
The client discovers the authorization server from that endpoint, registers itself (RFC 7591 dynamic client registration) and opens a Infipost page where you authorize the access.
| Protected resource metadata | https://mcp.infipost.asia/.well-known/oauth-protected-resource/mcp-oauth-dynamic |
| Authorization server metadata | https://mcp.infipost.asia/.well-known/oauth-authorization-server/mcp-oauth-dynamic |
| Scopes | mcp:read, mcp:write |
| Client type | Public client with PKCE (S256), or a confidential client |
| Grant | authorization_code |
- The token works for the organization that is active in Infipost when you authorize.
- Tokens don't expire. To cut a client off, revoke it in Infipost under Settings → Apps → Approved Apps.
- Registration accepts loopback callbacks (
http://localhost,http://127.0.0.1) and private-scheme callbacks (for examplecursor://) from any client. A web (https) callback works only for hosts that Infipost has verified. - This endpoint has the same tools as
/mcp, without theask_postizagent tool.
OAuth Token
If you're building an app for other Infipost users, use OAuth2 to obtain tokens. OAuth tokens start with pos_ and work the same way as API keys.
Connecting
Use the /mcp endpoint with your API key or OAuth token as a Bearer token:
URL: https://mcp.infipost.asia/mcp
Authorization: Bearer your-api-key
This method supports both API keys and OAuth tokens (prefixed with pos_).
Use the /mcp-oauth-dynamic endpoint with a client that supports OAuth. No API key is needed, the client opens a Infipost page where you authorize it:
URL: https://mcp.infipost.asia/mcp-oauth-dynamic
Use the /mcp/:apiKey endpoint with your API key embedded in the URL:
URL: https://mcp.infipost.asia/mcp/your-api-key
| Where Infipost runs | Base URL |
|---|---|
| Infipost Cloud | https://api.infipost.asia |
| Self-hosted | your NEXT_PUBLIC_BACKEND_URL |
| Self-hosted, official Docker image | http://localhost:4007/api (the compose file maps host 4007 to container 5000) |
| Self-hosted, running from source | http://localhost:3000 (frontend is on 4200) |
Quick Example
Here's what a typical interaction looks like when an AI agent uses Infipost MCP:
- Agent calls
integrationList, gets back your connected accounts (X, LinkedIn, etc.) - Agent calls
integrationSchemawithplatform: "x"and learns X's character limits, settings, and rules - Agent calls
integrationSchedulePostTool, schedules your post with the correct format
All of this happens automatically when you tell your AI agent something like:
"Schedule a post to X for tomorrow at 10am: Excited to announce our new feature!"
FAQ
Do I need an OpenAI key to use Infipost MCP?
No. The MCP server just exposes Infipost's tools. Your AI client (Claude, ChatGPT, Cursor, etc.) provides the model. Infipost only needs an OPENAI_API_KEY if you use Infipost's own AI features (image generation, copilot) which are separate from the MCP tools surfaced to your client.
What happens when my API key expires or is rotated?
Infipost API keys don't auto-rotate, but if you regenerate one in Settings → Developers → Public API, every MCP client using the old key stops working until you update its config. Update the URL or the Authorization header in your client config and reconnect.
Self-hosted: how do I expose the MCP endpoint?
The MCP server starts as part of the Infipost backend and is reachable at /mcp (Bearer auth), /mcp/:apiKey (key in URL), and /mcp-oauth-dynamic (OAuth-protected, with its discovery documents under /.well-known/). Your reverse proxy must forward these paths to the backend and support streaming HTTP (Transfer-Encoding: chunked). See Reverse Proxies.
Can MCP read or reply to comments?
Not today. The current tool set is read-only on integrations and write-only on posts/media. There is no getComments or replyToComment exposed via MCP. Comment replies must be triggered through the Infipost UI.