# Can ChatGPT Post Through Shager? Yes: Connect It With a Sign-In, or Use One of Three Other Routes

_2026-09-05 · ChatGPT’s MCP connectors sign in with OAuth, and Shager supports it: add Shager in developer mode, sign in and approve. Plus Codex, the API and a script._

Yes. ChatGPT’s custom MCP connectors authenticate with OAuth, and Shager’s MCP server supports OAuth sign-in. Add https://app.shager.ai/api/mcp as a connector in developer mode, sign in to Shager and approve, with no key to copy. You can also put OpenAI models to work on Shager through Codex, through the OpenAI API, or by using ChatGPT for writing and a short script for delivery.

This piece shows how to add the connector, and gives working code for each of the other routes.

## How do you add Shager as a ChatGPT connector?

OpenAI’s guide to [authentication for apps in ChatGPT](https://developers.openai.com/apps-sdk/build/auth) describes the supported model: servers that need authentication implement an OAuth 2.1 flow that follows the MCP authorization spec, with Client ID Metadata Documents preferred and dynamic client registration also supported. Servers can also run without authentication. The same guide states that ChatGPT cannot present custom API keys.

Shager’s server at https://app.shager.ai/api/mcp follows that spec, with both Client ID Metadata Documents and dynamic client registration. To connect it:

1. In ChatGPT, open Settings, then Apps & Connectors, turn on Developer mode and click Create.
2. Name it `Shager`, enter `https://app.shager.ai/api/mcp` and choose OAuth.
3. Click Connect. Shager opens: sign in, pick the organization and approve.

Developer mode is available on ChatGPT’s paid plans. The connection can read and create drafts. Scheduling and publishing is a separate checkbox on the approval screen, off unless you tick it, and you can disconnect it at any time from https://app.shager.ai/dashboard/agents.

### Why not put a no-auth proxy in front of an API key?

People suggest this, and it’s a bad idea, especially now that you don’t need it. A proxy that accepts unauthenticated requests and injects your Shager key turns your agency’s publishing access into a public endpoint. Anyone who finds the URL can draft posts into client workspaces, and with a `publish` key, schedule them. Don’t do it.

## Route 1: Codex, OpenAI’s coding agent

If what you want is "an OpenAI model operating Shager," Codex already does that cleanly. It supports bearer tokens from an environment variable for streamable HTTP MCP servers, so the setup is a few lines in `~/.codex/config.toml`:

```toml
[mcp_servers.shager]
url = "https://app.shager.ai/api/mcp"
bearer_token_env_var = "SHAGER_API_KEY"
```

OpenAI’s MCP docs note that the ChatGPT desktop app, Codex CLI and IDE extension share this configuration file. The full walkthrough, including a tool allowlist, is in [connecting Shager to Codex](https://shager.ai/blog/connect-shager-to-codex).

## Route 2: the OpenAI Responses API with a remote MCP tool

If you’re building your own agent on OpenAI’s API, the Responses API can call remote MCP servers itself. The [connectors and MCP guide](https://developers.openai.com/api/docs/guides/tools-connectors-mcp) documents an `mcp` tool with `server_url`, an `authorization` field for the access token, `allowed_tools` and `require_approval`. The docs also note the API does not store the `authorization` value, so you send it on every request.

```python
import os
from openai import OpenAI

client = OpenAI()

response = client.responses.create(
    model=os.environ["OPENAI_MODEL"],
    input=(
        "In the Shager workspace 'Cedar Clinics', list the channels, then create a "
        "DRAFT post to all active channels announcing Saturday walk-in hours. "
        "Use a different caption per channel that names the clinic's town. "
        "cta_url https://cedarclinics.example/walk-in, campaign 'walk-in-sat'. "
        "Do not pass schedule_at."
    ),
    tools=[{
        "type": "mcp",
        "server_label": "shager",
        "server_url": "https://app.shager.ai/api/mcp",
        "authorization": os.environ["SHAGER_API_KEY"],
        "allowed_tools": [
            "whoami", "list_workspaces", "list_channels",
            "list_groups", "create_post", "get_post",
        ],
        "require_approval": {
            "never": {"tool_names": ["whoami", "list_workspaces", "list_channels", "list_groups", "get_post"]}
        },
    }],
)

print(response.output_text)
```

Three notes from running this kind of setup.

First, test the auth with `whoami` before anything else. The OpenAI docs present `authorization` as an OAuth access token field; Shager’s key is a bearer token, so the first call tells you immediately whether the header arrives the way Shager expects. If you get a 401 back in the tool output, fall back to Route 3.

Second, `create_post` is deliberately left out of the `never` list, so the API returns an approval request before it runs. Your code inspects the arguments and answers with an approval response. That’s a cheap human or rule-based checkpoint before a draft is written.

Third, keep `publish` off this key. Then even an approved call can only create drafts.

## Route 3: ChatGPT writes, your script delivers

This is the most common pattern among agencies that live in ChatGPT. The model does what it’s good at, which is writing forty variations of a caption. A twenty-line script does the delivery through Shager’s REST API at https://app.shager.ai/api/v1, which the [OpenAPI document](https://app.shager.ai/api/v1/openapi.json) describes in full.

Ask ChatGPT for structured output you can paste into a file:

```text
For each account below, write a caption for our Saturday walk-in hours post.
Vary the opening line and mention the town. Keep facts identical.
Return only JSON: [{"channel_id": "...", "caption": "..."}]
Accounts: <paste the id and name list from list_channels>
```

Then push it as a draft:

```python
import json, os, requests

API = "https://app.shager.ai/api/v1"
H = {"Authorization": f"Bearer {os.environ['SHAGER_API_KEY']}"}
WS = os.environ["SHAGER_WORKSPACE_ID"]

captions = json.load(open("captions.json"))

r = requests.post(f"{API}/workspaces/{WS}/posts", headers=H, json={
    "caption": captions[0]["caption"],
    "channel_ids": [c["channel_id"] for c in captions],
    "per_channel": captions,
    "cta_url": "https://cedarclinics.example/walk-in",
    "campaign": "walk-in-sat",
    "first_comment": "Hours and directions: https://cedarclinics.example/walk-in",
}, timeout=60)

body = r.json()
if not r.ok:
    raise SystemExit(f"{body['error']['code']}: {body['error']['message']}")
print("draft", body["data"]["id"], body["data"]["status"])
```

The `per_channel` array accepts objects with `channel_id` and `caption` (plus optional `first_comment` and `format`), so ChatGPT’s JSON drops straight in. The `cta_url` gets a separate short link and UTM per account, with `utm_content` naming the account, which is what makes the results attributable later.

## Which route fits which team?

| Situation | Route |
|---|---|
| You want an agent with tools in a terminal or IDE today | Codex with `bearer_token_env_var` |
| You’re building your own product or agent on OpenAI models | Responses API with the `mcp` tool, or plain REST |
| Your team writes in ChatGPT and won’t leave it | ChatGPT for captions, script for delivery |
| You want Shager inside the ChatGPT app itself | A custom connector in developer mode, with OAuth sign-in |

## What does signing in give you?

You add https://app.shager.ai/api/mcp as a custom MCP server in ChatGPT and sign in to Shager, the way OpenAI’s [guide to connecting from ChatGPT](https://developers.openai.com/apps-sdk/deploy/connect-chatgpt) describes for authenticated servers. Each person connects with their own sign-in rather than sharing a key. The audit log works the same way, and so do the tools, which match the REST operations one to one.

## FAQ

### Is there any way to use an API key in ChatGPT’s connector settings?

Not according to OpenAI’s authentication guide for apps in ChatGPT, which lists OAuth and no-auth modes and says ChatGPT cannot present custom API keys. You don’t need one: choose OAuth and sign in. Treat any workaround that exposes your key behind an open endpoint as a security problem, not a fix.

### Does Shager work in ChatGPT on mobile?

That depends on where ChatGPT allows custom MCP servers, which is OpenAI’s decision and has changed during rollout. Check OpenAI’s current documentation rather than relying on what it did before.

### Do I need a paid Shager plan to try any of these routes?

No. API and MCP access are included on every plan, and during the launch period Shager is free, no card; before we start charging we’ll tell you in advance. The [pricing page](https://shager.ai/pricing) has the account limits per plan.

## Next step

If you’re going the code route, the fastest way to get oriented is the [REST API quickstart](https://shager.ai/blog/shager-rest-api-quickstart), which goes from a fresh key to a tracked multi-account draft in six calls.

---
Source: https://shager.ai/blog/shager-and-chatgpt
