# MCP server

Connect Claude, ChatGPT, Cursor, Codex, VS Code or any MCP client to Pozy so your assistant can post, reply, report and run ads on your connected accounts.

The Pozy MCP server lets an AI assistant work on your connected accounts. Add one URL to your client, sign in with your Pozy account, and ask in plain language: "schedule this for Tuesday on LinkedIn", "which DMs are waiting for a reply?", "pause the Meta campaign that spent the most this week".

```text
https://mcp.pozy.ai/mcp
```

It is hosted, so there is nothing to install. It speaks the [Model Context Protocol](https://modelcontextprotocol.io) over Streamable HTTP, which every current MCP client supports.

## What the assistant can do

The server gives your assistant 27 tools. 25 of them cover everyday jobs with inputs shaped for an assistant (a platform name instead of a request body, dates as `YYYY-MM-DD`). The last two, `search_tools` and `call_tool`, reach every one of the 1,128 operations in the [API reference](https://pozy.ai/docs/api), so nothing is out of reach.

| Job | Tools |
| --- | --- |
| Know where it is working | `whoami` |
| Accounts and profiles | `list_accounts`, `list_profiles`, `create_profile`, `connect_account` |
| Post and schedule | `create_post`, `schedule_post`, `list_posts`, `get_post`, `retry_post`, `delete_post`, `upload_media_from_url` |
| Analytics | `get_analytics`, `best_time_to_post` |
| Inbox | `list_conversations`, `get_conversation`, `send_message`, `list_comments`, `reply_to_comment`, `list_reviews`, `reply_to_review` |
| Ads | `get_ads_overview`, `list_ads_campaigns`, `pause_campaign`, `resume_campaign` |
| Everything else | `search_tools`, `call_tool` |

[Tools](https://pozy.ai/docs/mcp/tools) lists every argument.

## Connect in a minute

In Claude Code it is two steps:

```bash Terminal
claude mcp add --transport http pozy https://mcp.pozy.ai/mcp
```

Then type `/mcp` inside Claude Code, pick **pozy** and sign in. Ask "list my connected Pozy accounts" and the assistant answers from `list_accounts`:

```text
Found 2 connected account(s):
- instagram @acme (id: 6650f1c2a8b4e3d2c1b0a222)
- linkedin @acme-inc (id: 6650f1c2a8b4e3d2c1b0a333)
```

[Connect a client](https://pozy.ai/docs/mcp/connect) has the steps for Claude, ChatGPT, Cursor, Codex, VS Code and any other client.

## How sign-in works

You have two ways to authenticate, and the server accepts both on the same URL:

| Method | Best for | How |
| --- | --- | --- |
| OAuth | People using an assistant | Add the URL; the client opens a browser, you sign in to Pozy, pick a workspace and approve. Nothing to copy. |
| API key | Agents and clients without OAuth | Send `Authorization: Bearer pz_live_...` with every request |

With OAuth you choose what the assistant may do: read only, or read and act on your accounts. You can revoke a client at any time. See [OAuth](https://pozy.ai/docs/mcp/oauth).

## Safety

Tools that publish, reply, delete or change ads act on your real accounts. Each tool is labelled for your client as read-only, write or destructive, and the write tools tell the assistant to confirm the content, accounts and time with you first. Most clients ask before running a write tool.

- To let an assistant look but never touch, approve it **read-only**, or give it a [read-only API key](https://pozy.ai/docs/getting-started/authentication).
- `create_post` takes `dry_run: true`, which checks a post against each platform's rules without creating it.
- Every post tool takes an `idempotency_key`, so an assistant that retries never posts twice.
- `connect_account` only returns a link. Signing in to a platform is something you do yourself in the browser.

## Agents without a person at the keyboard

An autonomous agent has nobody to sign in, so it sends an API key and calls tools directly. Plain HTTP works:

```bash Terminal
curl https://mcp.pozy.ai/mcp \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": { "name": "list_accounts", "arguments": { "platform": "linkedin" } }
  }'
```

The reply is a server-sent event whose `data:` line holds the JSON-RPC result. The tool's answer is in `result.content[0].text`: a short summary line, then the full JSON. Create one key per agent so you can revoke it on its own, and keep it in a secrets store rather than in code.

## Discovery documents

Clients and registries find out about the server from standard documents on the same host:

| Document | URL |
| --- | --- |
| Protected resource metadata | `https://mcp.pozy.ai/.well-known/oauth-protected-resource` |
| Authorization server metadata | `https://mcp.pozy.ai/.well-known/oauth-authorization-server` |
| Server card | `https://mcp.pozy.ai/.well-known/mcp/server-card.json` |
| Agent skills | `https://mcp.pozy.ai/.well-known/agent-skills/index.json` |

The agent skills are short playbooks an assistant can load for common jobs: schedule a post, connect an account, summarise analytics, answer messages, run ads and manage blog articles.

## Next steps

- [Connect a client](https://pozy.ai/docs/mcp/connect): Claude, Claude Code, ChatGPT, Cursor, Codex, VS Code and others.
- [Tools](https://pozy.ai/docs/mcp/tools): Every tool and its arguments, plus search_tools and call_tool.
- [OAuth](https://pozy.ai/docs/mcp/oauth): Scopes, workspaces, read-only access and revoking clients.
- [Things to ask](https://pozy.ai/docs/mcp/prompts): Requests that work well, grouped by job.
- [Troubleshooting](https://pozy.ai/docs/mcp/troubleshooting): Sign-in problems, wrong workspace, accounts that need reconnecting.
