Skip to content
SociaMesh

MCP server

Let AI agents connect, check, schedule and publish, under your project's rules.

SociaMesh runs a Model Context Protocol server over streamable HTTP at https://mcp.sociamesh.com/mcp (live at general availability; until then, self-host it next to your API). It calls the public API with your key, so an agent can do exactly what that key can do, and nothing more.

Connect a client

Claude Code

claude mcp add --transport http sociamesh https://mcp.sociamesh.com/mcp --header "Authorization: Bearer sm_test_…"

Any client with a JSON config (Claude Desktop, Cursor, VS Code…)

{
  "mcpServers": {
    "sociamesh": {
      "type": "http",
      "url": "https://mcp.sociamesh.com/mcp",
      "headers": { "Authorization": "Bearer sm_test_…" }
    }
  }
}

The key can also go in an x-api-key header. For clients that can't set headers at all, append ?api_key=sm_… to the URL; avoid it where you can, since URLs end up in logs and history.

Start with a sm_test_ key: the agent's posts are dry runs until you switch to a live key.

Tools

Every public API operation is a tool, generated from the same contract as the reference. The ones agents use most have names and instructions written for them:

ToolWhat it does
list_integrationsConnected accounts and their ids.
get_capabilitiesWhat a platform supports, with its limits.
validate_postDry run of a post for every account; nothing is sent or charged.
create_postPublish now, schedule, or save a draft.
list_scheduled_postsWhat's waiting to go out.
reschedule_postMove a post that hasn't started.
cancel_scheduled_postCancel what hasn't been sent.
get_postA post with each account's result and link.
get_analyticsA published post's metrics.
get_pinterest_boardsBoard ids, needed for every Pinterest post.
get_tiktok_creator_infoCreator details and allowed privacy levels, required before TikTok posts.
list_commentsComments on a published post.
reply_commentReply to a post or a comment.

create_post tells the agent to look up Pinterest boards and TikTok creator info first and to validate before publishing.

Agent publish policy

Each project chooses what agents may do with posts (console → Settings → Agent posting). It applies to calls made through the MCP server.

PolicyWhat an agent's post does
Publish (allow)Publishes or schedules like any API call.
Ask a person first (require_approval)Waits as pending_approval, and a post.approval_required webhook fires. An owner or admin approves or rejects it on the post's page in the console. Approved posts go out now or at their scheduled time.
Drafts only (draft_only)Saved as a draft. Agents can't publish drafts; a person does.

An agent's post under Ask a person first: every account waits until a person decides.

create_post (MCP){  "content": "Weekend sale",  "publishNow": true}
  • Bluesky@acme.bsky.social
    Needs approval
  • LinkedInAcme Bakery
    Needs approval
  • Threads@acmebakery
    Needs approval
Bluesky: Needs approval; LinkedIn: Needs approval; Threads: Needs approval

Under Ask a person first and Drafts only, agents can only edit, reschedule or retry their own drafts; anything a person approved, scheduled or published is out of their reach. Agents can never force a retry past an unknown outcome (it might post twice), whatever the policy.

Approving through the API (POST /v1/posts/{id}/approve or /reject) needs the posts:approve scope, which keys don't get by default, so the key you give an agent can't approve its own posts. You can send the updatedAt you reviewed; if the post changed since, approving is refused.

What the policy doesn't cover. It governs posts made through the MCP server. Comment replies, messages and automations follow the key's scopes (engagement:write, granted by default). And an agent that can also run commands or make HTTP requests could call the REST API directly with the same key, outside MCP. For untrusted agents, use a key created without engagement:write, or a separate project.

Self-hosting

The server is apps/mcp in the SociaMesh repository. It stores nothing and holds no keys of its own.

  • API_URL: your API. MCP_PORT: default 4100.
  • MCP_ALLOWED_HOSTS: the Host values it answers to (a DNS-rebinding guard).
  • MCP_TRUSTED_PROXY_CIDRS: the proxy in front of it that sets x-sociamesh-client-ip. Also list the MCP server in the API's TRUSTED_PROXY_CIDRS, so rate limits and key IP allowlists see each agent's own address rather than the MCP server's.