> ## Documentation Index
> Fetch the complete documentation index at: https://docs.postsider.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AI agent quickstart: MCP setup and your first draft

> Connect Claude Code, Codex, Cursor or local MCP to PostSider. List channels, save a draft and verify the result before publishing.

Start with a connection you can verify. This guide intentionally **does not publish a post**. It connects an MCP client to your PostSider organization, reads the connected channels, creates one draft only when you approve the content, and checks the saved result.

> [!NOTE]
>
> Prefer screenshots and an interactive client selector? See the [visual developer quickstart](https://postsider.com/developers/). This page is the technical reference.

## What you need

* A [PostSider account](https://app.postsider.com/register) with at least one connected social channel. Open **Channels** in the dashboard and complete the provider connection first.
* An MCP client that supports remote Streamable HTTP and OAuth, or a local client that can launch `npx` over stdio.
* Node.js **only for local stdio**. The hosted MCP server does not require installing a package.

## Step 1. Connect your client

> [tab] Claude Code · hosted
>
> Uses the PostSider-hosted MCP server and OAuth. No API key is pasted into a command.
>
> ```bash theme={null}
> claude mcp add --transport http postsider https://mcp.postsider.com/mcp
> ```
>
> Complete the PostSider sign-in and authorization flow when your client prompts you.

> [tab] Codex · hosted
>
> ```bash theme={null}
> codex mcp add postsider --url https://mcp.postsider.com/mcp
> ```
>
> Verify that PostSider appears in your MCP server list. Complete OAuth sign-in using the client's supported flow.

> [tab] Cursor · hosted
>
> Add this in your Cursor MCP settings or your project's `.cursor/mcp.json`:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "postsider": {
>       "url": "https://mcp.postsider.com/mcp"
>     }
>   }
> }
> ```
>
> Reconnect the MCP servers, then complete PostSider OAuth sign-in when requested.

> [tab] Local stdio · API key
>
> Create a key in **Settings → API**. Keep it outside source control. Add this to your client's MCP configuration:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "postsider": {
>       "command": "npx",
>       "args": ["-y", "@postsider/mcp"],
>       "env": {
>         "POSTSIDER_API_KEY": "YOUR_API_KEY"
>       }
>     }
>   }
> }
> ```
>
> For Claude Code:
>
> ```bash theme={null}
> claude mcp add postsider -e POSTSIDER_API_KEY=YOUR_API_KEY -- npx -y @postsider/mcp
> ```
>
> Restart the client if it does not discover the new server.

> [!WARNING]
>
> **Never include an organization key in a hosted MCP URL.** Hosted MCP uses OAuth, while the local process reads `POSTSIDER_API_KEY` from its environment. Organization keys currently provide broad access, not independently enforced read-only or per-action scopes.

## Step 2. Prove the read connection works

Ask your client:

```text theme={null}
Use PostSider to list my connected social channels.
Show the channel names, platforms, and IDs it returns.
Do not create, schedule, publish, modify, or delete anything.
```

Confirm the returned channels match your dashboard. If the list is empty, connect at least one account in PostSider. Never guess an ID.

## Step 3. Save exactly one draft

```text theme={null}
List my connected PostSider channels and ask me to choose one.
Read that channel's publishing rules.
Show me the exact text you propose for a short test post.
After I approve it, create exactly one post with type=draft.
Read it back by its returned post ID. Report the saved content, channel and state.
Do not schedule or publish the post.
```

Confirm the draft appears in your PostSider dashboard. If a tool reports an error, read and address it before trying again.

> [!NOTE]
>
> A chat instruction to wait for approval is workflow guidance, **not an access-control boundary**. Keep your client's write confirmations enabled. Formal team approval workflows start on the Team plan and must be configured separately.

## Step 4. Verify the result — not just the tool response

Read the saved post with `postsider_get_post` by its returned ID. Verify:

1. The selected channel ID and platform match the intended destination.
2. The content and any media are correct.
3. The post is still a draft, not scheduled or published.
4. The dashboard displays the same record.

Only after those checks should you consider scheduling. A queued post is not proof of eventual publication. After the intended time, check the per-channel result and any error.

## Prefer raw REST API?

The same read-first workflow is available without MCP. Organization keys go in the raw `Authorization` header — **no Bearer prefix**.

```bash theme={null}
export POSTSIDER_API_KEY="YOUR_API_KEY"
curl --fail-with-body --silent --show-error \
  -H "Authorization: $POSTSIDER_API_KEY" \
  https://api.postsider.com/public/v1/integrations
```

See the [posts API reference](https://docs.postsider.com/api/posts.md) for a draft payload. Choose one real returned channel ID, include a stable `Idempotency-Key` on retries, then read the saved post with `GET /public/v1/posts/:id`.

The [Node.js draft-and-readback example](https://postsider.com/developers/#rest-api) targets an X channel. Other providers may need different settings.

## Troubleshooting

| Symptom | Check |
| - | - |
| OAuth does not complete | The client supports remote MCP OAuth; reconnect in Settings → MCP |
| MCP tools missing | Confirm the server is enabled; local clients may need a restart |
| 401 from REST | Use the current raw organization key in Authorization, no Bearer |
| Channel missing | Connect it in the dashboard, then read the list again |
| 429 from REST | Back off using Retry-After |
| Draft creation error | Read provider rules and correct platform-specific settings |
| Post not published | Check whether it is a draft, queued, published or in error |

See the [MCP overview](https://docs.postsider.com/agent/mcp/overview.md), [tools reference](https://docs.postsider.com/agent/mcp/tools.md), [authentication guide](https://docs.postsider.com/agent/authentication.md), [REST API](https://docs.postsider.com/api/overview.md) and [SDK overview](https://docs.postsider.com/sdk/overview.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.