MCP

Introduction

Connect AI agents to Ferra using the Model Context Protocol (MCP)

MCP (Model Context Protocol) lets AI agents interact with Ferra 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 Ferra account and manage your social media through natural language.

How It Works

Ferra exposes an MCP server that provides 13 tools to AI agents. The agent discovers these tools, understands their schemas, and calls them on your behalf.

sequenceDiagram
    participant Agent as AI Agent
    participant MCP as Ferra MCP Server
    participant Ferra as Ferra Backend

    Agent->>MCP: Connect with API key / OAuth token
    MCP-->>Agent: List available tools
    Agent->>MCP: Call tool (e.g., schedule post)
    MCP->>Ferra: Execute action
    Ferra-->>MCP: Return result
    MCP-->>Agent: Tool response

Available Tools

ToolDescription
integrationListList all connected social media accounts (optionally filtered by group)
groupListList all groups (customers) for your organization
integrationConnectToolGet a link for connecting a new social media account
integrationSchemaGet platform-specific posting rules and settings schema
triggerToolExecute platform-specific helpers (e.g., list Discord channels)
schedulePostToolSchedule, draft, or immediately publish posts
postsListToolList the organization's posts scheduled between two dates (with their current settings)
postSettingsToolUpdate the provider settings of a scheduled post or draft that was not published yet
postAttachmentsToolReplace the attachments of a scheduled post or draft that was not published yet
generateImageToolGenerate AI images for posts
generateVideoOptionsList available video generation options
videoFunctionToolGet video generator settings (e.g., available voices)
generateVideoToolGenerate videos for posts
clippingToolTurn a long YouTube video into captioned vertical clips and draft posts
clippingStatusToolCheck a clipping and get the finished clips
integrationAnalyticsToolGet the analytics of a connected channel
postAnalyticsToolGet the analytics of a published post

Authentication

There are two ways to authenticate with the MCP server:

API Key

Your API key lives in Ferra 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.

OAuth Token

If you're building an app for other Ferra 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://tryferra.co/api/mcp
Authorization: Bearer your-api-key

This method supports both API keys and OAuth tokens (prefixed with pos_).

Note

Public API paths are appended to the base URL, so a cloud request goes to {NEXT_PUBLIC_BACKEND_URL}/public/v1/....

Quick Example

Here's what a typical interaction looks like when an AI agent uses Ferra MCP:

  1. Agent calls integrationList, gets back your connected accounts (X, LinkedIn, etc.)
  2. Agent calls integrationSchema with platform: "x" and learns X's character limits, settings, and rules
  3. Agent calls schedulePostTool, 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 Ferra MCP?

No. The MCP server just exposes Ferra's tools. Your AI client (Claude, ChatGPT, Cursor, etc.) provides the model. Ferra only needs an OPENAI_API_KEY if you use Ferra'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?

Ferra 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.

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 Ferra UI.

Parts of these docs are adapted from open-source documentation under the MIT License (© 2023 Mintlify).