Snapchat MCP server

Add https://pubnio.com/mcp to your agent and it publishes Stories, Saved Stories, and Spotlight videos to Snapchat through two Code Mode tools: search reads the API, execute runs a short program against it.

Beta · hosted MCP at pubnio.com/mcpView as Markdown

Connect your agent

terminal.sh
claude mcp add --transport http pubnio https://pubnio.com/mcp
codex mcp add pubnio --url https://pubnio.com/mcp && codex mcp login pubnio

Sign in with OAuth when the agent asks, and choose the workspace that holds your Snapchat account. Setup for each client: Claude Code, Codex, Cursor, OpenCode, Grok, Dots, Muse Code.

Rules the agent reads

Before it writes a post, the agent reads the capability catalog. The Snapchat entry lists its placements, media, and caption limits:

snapchat-capabilities.json
{
  "provider": "snapchat",
  "label": "Snapchat",
  "availability": "beta",
  "accountKinds": [
    "social_page"
  ],
  "requiredScopes": [
    "snapchat-profile-api"
  ],
  "placements": [
    {
      "placement": "story",
      "default": true,
      "mediaTypes": [
        "image",
        "video"
      ],
      "maxMedia": 1,
      "captionCharacters": 160
    }
  ]
}

The execute call

Asked "Save the market-day clip to our Snapchat profile as a Saved Story called Market day.", the agent's Code Mode calls run like this:

code-mode-flow.txt
search   -> find the integrations, create-post, and read-post operations
execute  -> list ready accounts, keep { provider: "snapchat" }
         => { accounts: [ { id: "…", provider: "snapchat" } ] }
execute  -> create the post body below
            Idempotency-Key: snapchat-market-saved
         => 202 { postId, targets: [snapchat/story: queued] }
execute  -> read post, sleep 1s between checks, within the 30s budget
         => { status: "published", url: "…" }
post-body.json
{
  "publishNow": true,
  "targets": [
    {
      "accountId": "7f3c2a10-5b4e-4d6f-8a9b-0c1d2e3f4a5b",
      "provider": "snapchat",
      "placement": "story",
      "settings": {
        "contentType": "saved_story",
        "title": "Market day"
      },
      "media": [
        {
          "url": "https://cdn.example.com/market-day.mp4"
        }
      ]
    }
  ]
}

Snapchat fetches media from an HTTPS URL, so the program skips the import.

Other requests it handles the same way:

  • "Put the behind-the-scenes clip on our Snapchat Story."
  • "Submit the latte video to Spotlight with a one-line description."
  • "Save the opening-day video as a Saved Story titled Opening day."

Errors the agent fixes

Validation names the field and says what to change, so the agent fixes the request before anything reaches Snapchat:

CodeMessage
settings_conflictAdd a title for this Snapchat Saved Story.
media_typeSnapchat Spotlight requires one video.
caption_too_longSnapchat Saved Story titles are limited to 45 characters.

Create answers 422 Invalid publication for these; validate lists them under errors.

Before posting to Snapchat

  • The connection requests the snapchat-profile-api scope, and the connected account is a profile, the kind PubNio calls a page.
  • One item per post: PubNio checks a workspace JPEG or PNG at up to 20 MB, or an MP4 at up to 30 MB.
  • link attaches a URL, and locale takes a code shaped like en_US.
  • Spotlight accepts video only; a Story or a Saved Story may be a single image instead.

Limits

  • Snapchat is in beta: accounts connect and publish, and behavior may still change.
  • One execute call runs at most 30 seconds, so a slow job returns the post ID and the next call reads its status.
  • Binary files do not stream through execute: the agent imports media from an HTTPS URL or sends up to 8 MiB inline.