# Connect your assistant

> Give your assistant a private connection to your workspace.

Canonical: https://ownpost.fyi/docs/guides/connect-ai

## Before you begin

Your HTTPS OwnPost workspace and an assistant that supports remote HTTP MCP connections. Generated plugins support browser sign-in in compatible clients; the Codex and Claude Code examples below are for manual connection keys.

## Choose the setup for your assistant

Choose the Codex or Claude Code tab below for your connection settings. Create a separate key for each assistant. For ChatGPT, follow its OAuth guide.

[Codex plugin installation](https://ownpost.fyi/docs/plugins#codex)

[Claude Code plugin installation](https://ownpost.fyi/docs/plugins#claude-code)

[Cursor plugin installation](https://ownpost.fyi/docs/plugins#cursor)

[ChatGPT OAuth connection](https://ownpost.fyi/docs/guides/connect-chatgpt)

[Other compatible MCP clients](https://ownpost.fyi/docs/plugins#other-clients)

## Steps

1. For a generated plugin, open /settings/plugins, choose your client, install its download and authorize the bundled server through browser sign-in. Use the plugin guide linked below. Continue with these manual steps only if you need a separate connection key.

2. Open Settings → Connections → AI writing → AI assistant, choose your client and open Manage access and connection keys. Create an agent connection and name it for this client, such as Codex laptop.

3. Choose Full workspace tools for drafting, preferences and AI actions, or Assistant preparation only for legacy assigned preparation. Leave Allow approved publication off unless this client will execute work you have approved for X.

4. Create the connection and save the key while it is visible. Keep it in your client's private settings or environment, then choose I saved these details.

5. Select your client's tab below. Replace the example URL with your workspace's /api/mcp endpoint and make OWNPOST_MCP_KEY available to the assistant process. Restart or reconnect the client.

6. Paste the connection-check example below. Confirm it returns your accounts and preferences, then check Last contact in OwnPost.

### Codex

```
[mcp_servers.ownpost]
url = "https://YOUR-WORKSPACE/api/mcp"
bearer_token_env_var = "OWNPOST_MCP_KEY"
```

Add this to ~/.codex/config.toml and replace YOUR-WORKSPACE with your host. Set OWNPOST_MCP_KEY to your connection key in the environment that launches Codex. For the desktop app, use its private MCP settings; an export in another terminal may not reach the app. Restart Codex after setup.

### Claude Code

```
claude mcp add --transport http --scope user ownpost \
  https://YOUR-WORKSPACE/api/mcp \
  --header "Authorization: Bearer ${OWNPOST_MCP_KEY:?Set your OwnPost connection key first}"
```

First set OWNPOST_MCP_KEY to the key from OwnPost in your private terminal environment. Replace YOUR-WORKSPACE with your host, then run the command. Claude Code stores the header in its private configuration. Open /mcp to check the connection.

## Example request

Name separate connections Codex laptop, Claude runner and Cursor so their activity is recognizable. Verify each with a real read before asking it to change content. ChatGPT uses the separate OAuth setup guide.

```
Use my OwnPost connection to list my accounts and read my saved posting preferences. Tell me which account you will use for this task.
```

## Check the result

Your assistant returns your workspace accounts and preferences, and Last contact updates in OwnPost.

## Troubleshooting

For 401, check the endpoint, bearer configuration and whether the key was revoked. Assistant preparation only access cannot change workspace settings or manage all content. Reconnect the client after changing its environment.

## Keep going

[Install the complete OwnPost plugin](https://ownpost.fyi/docs/plugins)

[Connect ChatGPT with OAuth](https://ownpost.fyi/docs/guides/connect-chatgpt)

[Install OwnPost skills or the plugin](https://ownpost.fyi/docs/guides/install-skills)

[Configure preferences through a conversation](https://ownpost.fyi/docs/guides/guided-setup)

[Run preparation on a schedule](https://ownpost.fyi/docs/guides/agent-runner)

[Inspire or adapt posts from your ideas](https://ownpost.fyi/docs/guides/ideas-request)

[Build your daily writing challenge and routines](https://ownpost.fyi/docs/guides/routines)

[MCP connection overview](https://ownpost.fyi/docs/mcp)

## Related

- [Previous: Set up AI writing](https://ownpost.fyi/docs/guides/ai-writing)
- [Next: Connect ChatGPT](https://ownpost.fyi/docs/guides/connect-chatgpt)
