Checking registration availability…

Give your AI agent social media tools with MCP

Run the published @socialcannon/mcp package over stdio and give any MCP client 23 tools for posting, scheduling, analytics, A/B tests and replies.

Updated · 6 min read

The Model Context Protocol (MCP) lets an AI assistant call tools that run on your machine. SocialCannon ships an MCP server, so Claude, Hermes Agent or any other MCP client can draft, schedule and publish posts without you writing glue code. On Pro and above it can also read analytics, run A/B tests and answer comments. This guide sets it up, explains the tools, and covers the guardrails worth keeping.

How it works

The server is the published npm package @socialcannon/mcp@1.0.2. Your MCP client starts it locally over stdio. The server authenticates with your API client credentials, keeps a short-lived token refreshed in the background, and turns each tool call into a request to the SocialCannon REST API. Your social account tokens never reach the assistant: they stay encrypted on SocialCannon’s side.

Step 1: Create API credentials

In the SocialCannon dashboard, open Settings → API Keys. The API Credentials card shows your client ID. If you already use your credentials elsewhere, reuse that secret: pressing Generate API Secret replaces it, and anything still using the old one stops working. Otherwise, generate one now. These become SOCIALCANNON_CLIENT_ID and SOCIALCANNON_CLIENT_SECRET. The secret is shown only once; treat it like a password. Put it in your MCP host’s environment or secret settings, not in a chat message and not in a file you commit.

Step 2: Add the server to your MCP client

Most MCP hosts take a command, its arguments and the environment to start it with. Claude Desktop does not pass your shell’s variables to the server, so the credentials go in the server’s env block in claude_desktop_config.json. Replace the placeholders, and make the file readable only by you:

claude_desktop_config.json
{
  "mcpServers": {
    "socialcannon": {
      "command": "npx",
      "args": [
        "-y",
        "@socialcannon/mcp@1.0.2"
      ],
      "env": {
        "SOCIALCANNON_CLIENT_ID": "your-client-id",
        "SOCIALCANNON_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Hermes Agent reads YAML. Export the two variables in the environment that starts Hermes and reference them, so the secret stays out of the file. Merge this into your existing ~/.hermes/config.yaml: if mcp_servers already exists, add socialcannon beneath it rather than creating a second key:

~/.hermes/config.yaml
mcp_servers:
  socialcannon:
    command: "npx"
    args: ["-y", "@socialcannon/mcp@1.0.2"]
    env:
      SOCIALCANNON_CLIENT_ID: "${SOCIALCANNON_CLIENT_ID}"
      SOCIALCANNON_CLIENT_SECRET: "${SOCIALCANNON_CLIENT_SECRET}"

Keep the pinned version in the arguments. It means an update to the package never changes your agent’s tools without you choosing it. Never commit or sync a config file that contains the secret.

Step 3: Test with the sandbox

Restart or reload the client. Seeing the tools listed only shows the server started, so prove the credentials work with list_accounts first. An empty list is fine; it means no social account is connected yet. Then ask for exactly one create_post call with accountId: "sandbox", any text and no scheduledAt, so it runs straight away. The sandbox simulates a publication without contacting a social network, and the call succeeded only if it returns a post ID and status. If a request fails, or its outcome is unclear, stop and look at the error instead of creating more posts. Each API client gets 100 sandbox posts in total; the allowance does not reset.

The 23 tools

Area, Tools
AreaTools
Accounts and postslist_platforms, list_accounts, get_tiktok_creator_info, create_post, list_posts, get_post, update_post, delete_post, retry_post
Calendar and analyticsget_calendar, get_post_analytics, get_analytics_summary (analytics: Pro)
Threads and linkscreate_thread, generate_tracked_link
Contentrepurpose_content
Engagementget_engagements, reply_to_engagement (Pro), list_unread_engagements
Testing and timing (Pro)create_ab_test, get_ab_test_results, get_best_posting_times, get_optimal_slot, auto_schedule_week

Each tool validates its input before calling the API. When the API refuses a request, the tool reports the HTTP status and, where there is one, a short error code such as LIMIT_EXCEEDED, but not the full error text, which stays in SocialCannon’s logs. A 400 often means a missing requirement, such as an image for Instagram; a 403 with LIMIT_EXCEEDED means a plan limit. Do not resend a request just to read its error. If a tool reports that a post may have been created, check the returned IDs with get_post or list_posts before trying again, because a second request can publish the post twice. A post that failed to publish keeps a plain-English reason, which get_post shows. The API reference describes every tool.

Guardrails worth keeping

An assistant with publishing tools can post on your behalf, so decide up front what it may do alone. A sensible default:

  1. The assistant drafts posts and shows them to you.
  2. You approve before anything is published or scheduled to a real account. Remember that create_post without scheduledAt publishes immediately.
  3. Replies, retries, deletions and account changes also wait for your approval.
Write those rules into the assistant’s instructions or system prompt. The SocialCannon API enforces your plan, scopes and each network’s rules, and the MCP server passes its refusals back, but neither can know which posts you meant to approve.

What you can ask for

  • “Draft three LinkedIn posts from this changelog and schedule the one I pick for Tuesday at 9:00 UK time.”
  • “Which of last week’s posts did best, and what time should I post next?”
  • “Show me unread comments on yesterday’s Instagram post and suggest replies.”
  • “Rewrite this announcement for X and Facebook and show me both before posting.”

Several of these need Pro or above: analytics (available for Instagram, X and YouTube; Facebook, LinkedIn and TikTok analytics are not available yet), timing suggestions, A/B tests, comment replies and posting to X. The pricing page shows what each plan includes.

Next steps

If you use OpenClaw, the OpenClaw skill guide covers the same setup through ClawHub. For direct REST integration, start with scheduling posts with one API.

Frequently asked questions

Which AI clients work with the SocialCannon MCP server?
Any client that can start a local stdio MCP server, including Claude Desktop, Hermes Agent and other MCP hosts. The server runs with npx, so there is nothing to clone.
Where do the credentials come from?
In the SocialCannon dashboard under Settings, API Keys, copy your client ID and reuse your existing secret, or generate one if you have none (a new secret replaces the old one). Supply them as SOCIALCANNON_CLIENT_ID and SOCIALCANNON_CLIENT_SECRET through your MCP host's environment. The server exchanges them for short-lived tokens and refreshes them itself.
Can I test without posting to a real account?
Yes. Call create_post with accountId "sandbox". The sandbox simulates a publication without contacting any social network.
Will the agent publish without asking me?
The tools do what they are asked: create_post without scheduledAt publishes immediately. Tell your agent to prepare drafts and ask for approval before publishing or scheduling to real accounts.

Start with a free account

Free includes two connected accounts, unlimited posts and scheduling, and a sandbox for testing. Some features in this guide need Pro; the pricing page lists what each plan includes.

Authenticate, connect an account, and schedule posts up to 30 days ahead with one endpoint. Covers time formats, the "optimal" slot, idempotency, rescheduling and retries.

Install the SocialCannon skill with one ClawHub command, add credentials privately, verify with a sandbox post, then let your OpenClaw agent draft and schedule with approval.

Publish the same message to every connected account with one request body, adapt it per network, and respect each platform's media and caption rules.