Grok + PostNinja

Schedule Social Media Posts with Grok

Let Grok run your posting. Add PostNinja as a custom MCP server in Grok Bot, or give it to Grok through the xAI API's remote MCP tool, and Grok can write, schedule and check posts on every account you've connected.

  • Connect once with an API key
  • Draft, schedule and publish by asking
  • 7 platforms: X, Instagram, TikTok, Facebook and more

Setup

How do I connect PostNinja to Grok?

  1. 1

    Create an API key

    In PostNinja, go to Settings → API and create a key. It starts with pn_ and is shown once, so copy it somewhere safe.

  2. 2

    Add PostNinja to Grok

    In the Grok app, add PostNinja as a custom connector and sign in. In Grok Bot, add it as a custom MCP server with an API key. From code, pass it to the xAI API.

    1. On grok.com, go to Connectors → New Connector → Custom.
    2. Paste the server URL from the first box below.
    3. Log in to PostNinja when asked and click Allow.
    Server URL for the Grok app
    https://postninja.app/api/mcp
    Grok Bot: custom MCP server
    Name:     postninja
    URL:      https://postninja.app/api/mcp
    Header:   Authorization: Bearer pn_YOUR_KEY
    xAI API (Responses API, remote MCP tool)
    curl https://api.x.ai/v1/responses \
      -H "Authorization: Bearer $XAI_API_KEY" -H "Content-Type: application/json" \
      -d '{
        "model": "grok-4.7",
        "input": "List my scheduled posts for this week",
        "tools": [{
          "type": "mcp",
          "server_url": "https://postninja.app/api/mcp",
          "server_label": "postninja",
          "authorization": "pn_YOUR_KEY"
        }]
      }'

    Replace pn_YOUR_KEY with a key from Settings → API.

    Grok Bot is in beta, so its plugin settings may move. Servers you've set up in the Cursor editor aren't carried over to Grok Bot automatically.

    The xAI API runs the MCP calls on xAI's servers, so your PostNinja address must be public.

  3. 3

    Just ask

    Grok finds the PostNinja tools on its own. Try:

    • “Schedule a post about our webinar for Wednesday at 2pm on X and Threads.”
    • “Turn this announcement into a 4-post X thread for tomorrow morning.”
    • “Did yesterday's posts go out?”

Tools

What can Grok do with PostNinja?

Write and schedule

Drafts posts, gives each platform its own text, and schedules them for any date and time.

Threads and Stories

Builds multi-post X threads and posts photos or videos as Instagram Stories.

Check what's planned

Lists upcoming posts, drafts and what went out, with links to the live posts.

Fix and reschedule

Moves, edits or deletes drafts and scheduled posts when plans change.

Add images

Uploads images to attach to posts. Larger files and video go through the REST API.

Spot failures

Reads each account's status and error, so it can tell you what didn't go out and why.

One connection, seven platforms

Connect your accounts in PostNinja once. From then on Grok can post to any of them, and PostNinja publishes at the time you set.

FAQ

Grok and PostNinja questions

Can I add PostNinja in the Grok app on grok.com?

Yes. Add it under Connectors → New Connector → Custom and sign in with your PostNinja account. On Business and Enterprise, an admin may need to allow it first.

Which Grok plans include Grok Bot?

xAI includes Grok Bot with SuperGrok and X Premium+, and Cursor includes it with its paid plans. Check xAI's site for the current details.

Does Grok post without asking me?

That depends on Grok's own settings; most ask before each tool call. If you'd rather review everything, ask it to save posts as drafts, then schedule them from the PostNinja calendar.

Is my API key safe?

PostNinja only stores a hash of each key and shows its first characters so you can tell keys apart. A key works for one workspace, and you can revoke it any time under Settings → API.

Which platforms can Grok post to?

Every account you've connected: X, Instagram, Threads, Facebook Pages, TikTok, YouTube Shorts and Pinterest.

Do posts scheduled by an AI agent cost extra?

No. They're ordinary posts on your plan. As always, X posts use credits (10 each, 80 with a link) because X charges for every post; other platforms are unlimited.

Works with other AI agents too

Let Grok run your social media.

Connect Grok to PostNinja in a couple of minutes. Plans from $15 a month.