# Publish an X thread from Cursor

Turn a changelog into a short thread. Approve the text, account, and estimated X API fees, then check the published thread link.

Canonical page: https://pubnio.com/cursor/x

## Connect Cursor

### Add PubNio to .cursor/mcp.json

Project file. Merge the pubnio entry into mcpServers; Cursor's global MCP config takes the same entry for every project.

```json
{
  "mcpServers": {
    "pubnio": {
      "url": "https://pubnio.com/mcp"
    }
  }
}
```

### Sign in

1. Open Cursor's MCP settings.
2. Click Connect on pubnio. Your browser opens PubNio sign-in; approve the workspace.
3. Run the prompt from Cursor's Agent.

### Install the skill (optional)

```sh
npx skills add pubnio/agent-skills
```

Installs the pnio skill from skills.sh.

### Connect your X account

[Open PubNio](https://pubnio.com/app), choose your workspace, and go to Accounts. Use the same workspace when you sign in from Cursor.

- Connect the X account you want to post from in PubNio and confirm it is ready.
- Open the repository containing your changelog in Cursor.
- Review the current X pass-through estimate in PubNio before approving.
- Make sure your workspace has enough prepaid credit for the estimated X fees.

### Check the destination

```
List the X accounts in my PubNio workspace and show which are ready to publish. Do not create, schedule, or publish posts.
```

## Worked job: Turn your changelog into an X thread

Contract example: sample IDs and URLs. The request and both responses decode against PubNio's API schemas; no provider confirmed this post.

### Prompt

```
Read CHANGELOG.md and draft a short X thread with an opener and two replies. Keep each post within 280 characters. Show the destination account and every post. Validate the thread with PubNio to get the publishing fee estimate, including X pass-through fees, and wait for my approval. If validation is blocked or the cost is unavailable, stop. After approval, publish once, then read the delivery and return the thread’s opening-post link.
```

### What Cursor runs: the Code Mode flow

```text
search   -> find the validate-post, create-post, and read-post operations
execute  -> validate post { text: "…", publishNow: true, targets: [ { accountId: "…", provider: "x", placement: "feed", settings: { thread: [ "Set a recurring schedule once for each account.", "Add a post to the queue and check delivery when it goes live." ] } } ] }
         => { canPublish: true, billing: { xPublishes: 3, estimatedCost: "…", blocked: null } }
            show the estimate and wait for approval
execute  -> create post { text: "…", publishNow: true, targets: [ { accountId: "…", provider: "x", placement: "feed", settings: { thread: [ "Set a recurring schedule once for each account.", "Add a post to the queue and check delivery when it goes live." ] } } ] }
            Idempotency-Key: cursor-x-weekly-queues-thread
         => 202 { postId, targets: [x/feed: queued] }
execute  -> read post, sleep 1s between checks, within the 30s budget
         => { status: "published", url: "https://x.com/i/web/status/1234567890" }
```

### Settled result (200 OK)

```json
{
  "postId": "00000000-0000-4000-8000-000000000002",
  "isDraft": false,
  "revision": 1,
  "scheduledAt": null,
  "text": "Weekly queues are here. Here’s what changed.",
  "media": [],
  "targets": [
    {
      "accountId": "00000000-0000-4000-8000-000000000001",
      "provider": "x",
      "placement": "feed",
      "settings": {
        "thread": [
          "Set a recurring schedule once for each account.",
          "Add a post to the queue and check delivery when it goes live."
        ]
      }
    }
  ],
  "deliveries": [
    {
      "targetId": "00000000-0000-4000-8000-000000000003",
      "attemptId": "00000000-0000-4000-8000-000000000004",
      "accountId": "00000000-0000-4000-8000-000000000001",
      "provider": "x",
      "placement": "feed",
      "canRetry": false,
      "canReconcile": false,
      "revision": 1,
      "status": "published",
      "providerRef": {
        "id": "1234567890",
        "kind": "post"
      },
      "url": "https://x.com/i/web/status/1234567890"
    }
  ],
  "status": "published",
  "createdAt": "2026-12-04T07:20:00.000Z",
  "updatedAt": "2026-12-04T07:20:18.000Z"
}
```

### From approval to delivery

Illustrative conversation and result with sample data.

**Cursor:** I’ve drafted an opener and two replies for @example. Here are all three posts and the PubNio estimate, including the X API fee for each write.

**You:** I’ve reviewed the thread, destination, and estimated fees. Publish it once.

**Cursor:** PubNio accepted the thread. I checked the original delivery and got the confirmed link to the opening post.

#### Example delivery result

- Status: `published`

- Destination: @example · three-post X thread

- Sample URL: `https://x.com/i/web/status/1234567890`

## Check delivery and get the link

- Review the validation estimate before any publish request.
- Save the PubNio post ID after admission.
- Check the existing delivery until it confirms and returns the opening-post URL.
- Open the thread to check the replies. If submission is unresolved, reconcile the existing target before trying again.

## X rules Cursor runs into

Account kinds: social account. Connection scopes: `tweet.write`.

| Placement | Default | Media types | Max per target | Caption limit |
| --- | --- | --- | --- | --- |
| `feed` | Yes | image, video | 4 | 280 |

- This walkthrough uses a text-only feed target.
- A feed post takes up to 4 images or videos.
- Put the opening text in the post body and the replies in the target’s thread settings.
- Keep each post to 280 characters.
- If you add URLs, review the new estimate. X charges can vary with the content of each write.

## Failures and recovery

### X issue codes

| Code | Cause | Fix | Retry |
| --- | --- | --- | --- |
| `account_not_ready` | The connected account's OAuth token is expired, revoked, or disconnected. | Reconnect the account in the PubNio workspace, then re-validate. | After reconnect |
| `empty_content` | Neither text nor media was provided for a target that requires content. | Add caption text or attach a ready media ID. | No |
| `caption_too_long` | Text exceeds the destination placement's character limit (`caption.limit`). | Shorten the caption or add a shorter target-specific text override. | No |
| `insufficient_credit` (billing, 402) | Prepaid credit cannot cover the publish, including X pass-through fees. | Top up credit or upgrade the plan. | After a top-up |
| `spend_cap_reached` (billing, 402) | The publish would pass the workspace's monthly spend cap. | Raise the monthly spend cap in billing settings. | After raising the cap |

### Cursor setup problems

- pubnio shows as disconnected in Cursor's MCP settings. Click Connect again and finish the browser sign-in.
- Cursor does not list the pubnio server. Check that the entry sits under mcpServers in .cursor/mcp.json and that the JSON is valid.
- Writes fail with 403 read_only_mode. PubNio returns 403 read_only_mode when the server URL ends in ?readOnly=1. Point the entry at https://pubnio.com/mcp to allow writes.

### Cursor quirks

- Sign-in starts from Cursor's MCP settings screen, not from a terminal command.
- The entry needs only url, so the file is safe to commit; each teammate connects from their own settings.

## What it won't do

- Waive X API fees ($0.015 a post, or $0.20 with a link). They pass through on every plan.
- Publish when prepaid credit cannot cover the estimated X fees.
- Post identical copy again. X rejects duplicates, so check the existing delivery first.
- Connect accounts, create API keys, or manage webhooks from an MCP session that uses an API key. Those operations need a person signed in, so connect the MCP server with browser OAuth or use the PubNio web app.
- Stream binary uploads through execute. Import media from an HTTPS URL, or send a file of up to 8 MiB inline as base64.
- Run one execute call past 30 seconds or past its request limit. The script returns the post ID so the next call can check it.

## Frequently asked questions

### Can Cursor turn release notes into an X thread?

Yes. Use the X feed placement with opening text and ordered replies, then approve the prepared thread.

### What does it cost to publish an X thread?

Validate the thread for PubNio’s current estimate. X API create fees are separate, and a thread contains multiple writes.

### Which link does PubNio return?

The confirmed X delivery links to the opening post. Open that link to review the thread.

### Should I resubmit if Cursor stops waiting?

Save the PubNio post ID and recheck the same delivery. If the outcome is unresolved, reconcile before retrying.

### Is it safe to commit .cursor/mcp.json?

Yes. It contains only https://pubnio.com/mcp. Authentication happens per person through browser OAuth.

### Where do I sign Cursor in to PubNio?

In Cursor's MCP settings. Click Connect on pubnio and approve the workspace in your browser.

## Also works with

- [Publish an X thread from Claude Code](https://pubnio.com/claude/x)
- [Publish an X thread from Codex](https://pubnio.com/codex/x)
- [Publish an X thread from OpenCode](https://pubnio.com/opencode/x)
- [Post to Instagram from Cursor](https://pubnio.com/cursor/instagram)
- [Post to LinkedIn from Cursor](https://pubnio.com/cursor/linkedin)
- [Upload YouTube Shorts from Cursor](https://pubnio.com/cursor/youtube)
- [Post to a Facebook Page from Cursor](https://pubnio.com/cursor/facebook)
- [Create a Pinterest Pin from Cursor](https://pubnio.com/cursor/pinterest)
- [Post a TikTok video from Cursor](https://pubnio.com/cursor/tiktok)
- [Cursor setup](https://pubnio.com/cursor)
- [X publishing API](https://pubnio.com/platforms/x)
- [X MCP](https://pubnio.com/x-mcp)
- [X network reference](https://pubnio.com/docs/networks/x/)
- [X error codes](https://pubnio.com/docs/errors/x/)
- [Pricing](https://pubnio.com/pricing)

## Get started with PubNio

Connect unlimited accounts at $0 per account. Pay as you go includes 50 free confirmed publishes a month on your first workspace, then $20 per 1,000. X API fees are separate.

## REST API reference

Contract example: sample IDs and URLs. The request and both responses decode against PubNio's API schemas; no provider confirmed this post.

```http
POST /api/v1/posts?workspaceId=00000000-0000-4000-8000-000000000006
Authorization: Bearer pn_live_***
Idempotency-Key: cursor-x-weekly-queues-thread
Content-Type: application/json

{
  "text": "Weekly queues are here. Here’s what changed.",
  "publishNow": true,
  "targets": [
    {
      "accountId": "00000000-0000-4000-8000-000000000001",
      "provider": "x",
      "placement": "feed",
      "settings": {
        "thread": [
          "Set a recurring schedule once for each account.",
          "Add a post to the queue and check delivery when it goes live."
        ]
      }
    }
  ]
}
```

### 202 Accepted

```json
{
  "postId": "00000000-0000-4000-8000-000000000002",
  "idempotencyKey": "cursor-x-weekly-queues-thread",
  "targets": [
    {
      "targetId": "00000000-0000-4000-8000-000000000003",
      "attemptId": "00000000-0000-4000-8000-000000000004",
      "accountId": "00000000-0000-4000-8000-000000000001",
      "provider": "x",
      "placement": "feed",
      "canRetry": false,
      "canReconcile": false,
      "status": "queued",
      "scheduledAt": null,
      "url": null,
      "issue": null
    }
  ],
  "warnings": []
}
```

