# Connect PubNio MCP to Grok & Grok Bot

Human page: https://pubnio.com/grok
Hosted MCP URL: https://pubnio.com/mcp

## Summary

Add https://pubnio.com/mcp as a custom remote MCP connector in Grok (grok.com/connectors) or pass it in the xAI API tools array, complete OAuth sign-in, and Grok or Grok Bot can use the search and execute tools to draft, schedule, and verify live social posts across Facebook, Instagram, LinkedIn, Pinterest, TikTok, X, and YouTube.

## Install (Grok Connector · xAI Responses API)

```json
{
  "tools": [
    {
      "type": "mcp",
      "server_label": "pubnio",
      "server_url": "https://pubnio.com/mcp",
      "authorization": "Bearer pubnio_sk_..."
    }
  ]
}
```

## Setup steps

1. **Add PubNio in Grok Connectors or the xAI API:** In Grok or Grok Bot, open grok.com/connectors, choose New Connector -> Custom, and paste https://pubnio.com/mcp. For automated xAI SDK loops, pass the MCP tool config above with a scoped workspace API key.
2. **Authorize workspace access:** Approve the OAuth 2.1 consent prompt in your browser (or attach a workspace-scoped API key for headless API runs). Social platform tokens stay encrypted inside PubNio.
3. **Run always-on social publishing from Grok Bot:** Ask Grok or Grok Bot to inspect connected accounts, stage media, publish or assign weekly queue slots, and confirm terminal delivery outcomes with idempotency keys.

## Example prompt

> Check my ready PubNio accounts, publish today's product release thread to X and a short update to LinkedIn, then wait until both targets confirm.

## Expected Code Mode flow

```text
search   -> find account and post operations
execute  -> list ready accounts => { accounts: [x: ready, linkedin: ready] }
execute  -> create post { text, platforms: ["x", "linkedin"] } => { postId: "pst_01j9..." }
execute  -> read post until settled => x: published, linkedin: published
```

## FAQs

### Does PubNio work with both Grok web and always-on Grok Bot?

Yes. Both Grok's web connectors and always-on Grok Bot cloud VM agents speak standard remote Streamable HTTP MCP, so the same https://pubnio.com/mcp endpoint works across interactive chats and persistent background runs.

### How does PubNio keep automated Grok Bot posts safe?

Every publish call supports idempotency keys, preflight validation before hitting provider APIs, and isolated per-target retries. You can also connect https://pubnio.com/mcp?readOnly=1 for read-only analytics and draft audits.
