# Set up an AI coding agent for Postify

These are official instructions from Postify to set up an AI development environment for a multi-platform social scheduling SaaS — compose once, tailor per platform, then schedule or publish. All commands below are validated by Postify. Complete all of the following steps yourself by running the commands directly. Do not ask the user to run any of these commands.

Checklist:

- [ ] Get credentials (only if your agent uses the REST API / SDK path — the MCP path needs none)
- [ ] Connect your agent (pick the matching section below)
- [ ] Install the SDK if you are integrating Postify into the user's own project
- [ ] Verify the connection
- [ ] Print the completion message

## 1. Get credentials

Most agent connections below use the MCP server, which needs **no API key** — it authenticates via an OAuth 2.1 browser flow the first time you call a tool. Skip straight to section 2.

If you are wiring the REST API or the `@postify/sdk` SDK directly (not through MCP), the user creates an API key at https://app.usepostify.com/settings/api-keys (Settings → API keys → Create key). The key is prefixed `postify_live_` followed by a random secret, and is shown once.

Ask the user for it ONCE if it is not already present as the `POSTIFY_API_KEY` environment variable. Never print, log or embed the key value anywhere. Store it only where the user's own project already keeps secrets (their `.env`, their secret manager) — never hardcode it into source.

## 2. Connect your agent

Use the section for your agent.

### Claude Code

```bash
claude mcp add --transport http postify https://app.usepostify.com/api/mcp
```

The OAuth 2.1 flow (dynamic client registration + PKCE) triggers automatically the first time you call a Postify tool — approve the scopes you need in the browser tab that opens, then continue.

### Codex

```bash
codex mcp add postify --url https://app.usepostify.com/api/mcp
codex mcp login postify
```

`codex mcp login` opens the same OAuth consent screen; approve scopes there before the first tool call.

### Cursor

```json
{
  "mcpServers": {
    "postify": {
      "url": "https://app.usepostify.com/api/mcp"
    }
  }
}
```

Cursor opens the OAuth consent screen on the first tool call from this server.

### Windsurf

```json
{
  "mcpServers": {
    "postify": {
      "serverUrl": "https://app.usepostify.com/api/mcp"
    }
  }
}
```

### OpenCode

```json
{
  "mcp": {
    "postify": {
      "type": "remote",
      "url": "https://app.usepostify.com/api/mcp",
      "enabled": true
    }
  }
}
```

### GitHub Copilot

```json
{
  "servers": {
    "postify": {
      "type": "http",
      "url": "https://app.usepostify.com/api/mcp"
    }
  }
}
```

### VS Code

```json
{
  "servers": {
    "postify": {
      "type": "http",
      "url": "https://app.usepostify.com/api/mcp"
    }
  }
}
```

### Other MCP-capable agents

Postify has no separate skills-plugin repo — every agent, including ones not listed above, connects the same way: a generic MCP server entry pointing at https://app.usepostify.com/api/mcp.

```json
{
  "mcpServers": {
    "postify": {
      "type": "http",
      "url": "https://app.usepostify.com/api/mcp"
    }
  }
}
```

## 3. SDK (optional — for building against the Postify API directly)

If the task is to integrate Postify into the user's own application (not just to operate their workspace interactively), install the SDK instead of/alongside MCP:

```bash
npm i @postify/sdk
```

```ts
import { Postify } from "@postify/sdk";

const postify = new Postify({ apiKey: process.env.POSTIFY_API_KEY! });
const channels = await postify.channels.list();
```

The SDK also verifies Standard Webhooks signatures (`webhook-id`/`webhook-timestamp`/`webhook-signature` headers) for endpoints created via `POST https://app.usepostify.com/v1/webhook-endpoints` — see the webhooks guide in Resources below before writing your own verification code.

## 4. Verify

**MCP path:** call the `list_channels` tool (no arguments, requires only the `channels:read` scope). Success looks like a JSON result listing the workspace's connected channels — an empty list is still success (it proves the connection and auth are live); an `isError: true` result with a `SCOPE_MISSING` or similar structured code means the OAuth consent step above did not finish.

**REST/SDK path:** run

```bash
curl -sS https://app.usepostify.com/v1/usage \
  -H "Authorization: Bearer $POSTIFY_API_KEY"
```

Success is an HTTP 200 with a JSON usage object. A 401 means the key is missing or wrong; ask the user for it again.

## 5. Completion message

Print this back to the user once setup succeeds, filled in for what you actually did:

```
Postify is connected.
- Method: [MCP, or REST API / SDK — whichever you used]
- Tools/scopes available: [what the verify step returned]
- Still needed from you: [OAuth consent in the browser tab that opened, if not already approved — otherwise, nothing]
```

## 6. Resources

- Docs home: https://usepostify.com/docs
- FAQ: https://usepostify.com/docs/faq
- llms.txt: https://usepostify.com/llms.txt
- API reference: https://usepostify.com/docs/api-reference
- MCP server + OAuth details: https://usepostify.com/docs/connecting-ai-assistants
- MCP endpoint: https://app.usepostify.com/api/mcp
- Pricing: https://usepostify.com/docs/pricing
- App: https://app.usepostify.com
- Support: support@usepostify.com

