# Connect your AI agent

Give Claude, ChatGPT, Cursor or another AI agent its own flayr API key, so it can draft, schedule and report on your posts over MCP. Connect it with Read + Write and keep Post review on, so nothing posts without your approval.

Create a key for the agent, keep approval on, connect it and check that it works. About five minutes.

## Create the key

One key per agent, with the recommended scope: Read + Write, no Publish.

null

1. Open Developers, then API Keys

Choose Developers in the sidebar and find API Keys.

2. Name the key after the agent

For example "Claude Code". With one key per agent, you can revoke one without breaking the others.

3. Pick Read + Write, leave Publish off

This is the recommended scope, and the default. The agent drafts posts, media and campaigns. Nothing goes live until you schedule or publish it in flayr.

4. Create the key and copy it

Choose Create key and use the copy button. flayr shows the full key once. Store it like a password.

5. Check the key

Run this in a terminal, with your new key in place of flayr_sk_YOUR_KEY.

## Nothing posts without your approval

Two settings keep you in control of what goes live.

null

1. Keep Publish off the key

A key without the Publish scope can never post. The agent can only prepare drafts.

2. Set Post review to Required

Open Brand Intelligence, then Post review, and choose Required. Scheduled posts then wait for your review, including posts scheduled by an agent whose key has the Publish scope.

## What the agent can do

The agent works through tools. The scopes on its key decide which ones it may use.

null

1. Read

Read tools only look.

2. Write

Write tools change drafts in flayr.

3. Publish

Publish tools act on your real accounts and need a key with the Publish scope. A key without it can never post.

4. See every tool

The full list, grouped by Read, Write and Publish, is in the agent reference.

## Connect the agent

Give the agent the MCP server URL and its key.

null

1. Claude Code

Run this in a terminal with your key in place of flayr_sk_YOUR_KEY, then run /mcp to see flayr listed.

2. Any other agent

Claude Desktop, Claude.ai, Cursor and other MCP clients are in Connect over MCP. Scripts and automation tools are in Use the API.

## Check it works

One question tells you the agent is connected to the right brand.

null

1. Ask your agent

Ask the question below. A working setup calls the whoami tool and answers with your brand (or "all your brands" for an account-wide key) and your plan.
