AutoPersonas

MCP integration guide

Connect any MCP-compatible AI agent to AutoPersonas — no SDK, no HTTP plumbing. Paste one URL into your client and the agent can manage characters, generate content batches, approve drafts, and publish to social. The hosted MCP server at https://mcp.autopersonas.com exposes 140 tools, 7 resources, and 6 prompts that wrap our developer REST API.

Quickstart

MCP server URL

https://mcp.autopersonas.com
  1. 1. Paste the URL above into your AI agent's MCP settings (see Pick your client).
  2. 2. The agent opens an OAuth consent screen in your browser. Sign in with your AutoPersonas account, click Allow.
  3. 3. Done. Ask the agent "list my AutoPersonas tools" to confirm.

Prefer a one-click setup with a pre-scoped API key instead of OAuth? Open the Integrations page and use the Connect AI agent button.

What is MCP, briefly?

The Model Context Protocol is an open standard (originally from Anthropic, now adopted by Cursor, Cline, Continue, GitHub Copilot, and others) that lets AI clients call external tools and read external resources. AutoPersonas's MCP server exposes the same operations as our REST API — list and create characters, generate content batches, approve drafts, publish to social — but the agent invokes them via tool-calling rather than hand-crafted HTTP requests. Any client that speaks MCP over Streamable HTTP and supports OAuth 2.1 (or accepts a bearer header) can connect with zero changes on our end.

The server is stateless Streamable HTTP under the hood, authenticated with the same ap_live_* bearer tokens you already use for /api/v1. Every tool and resource enforces the same scopes, the same rate limits, and the same monthly budget caps as the REST surface.

Pick your client

Click the entry for the agent you're setting up. Each one accepts the same URL — the OAuth flow handles the rest.

Claude Desktop

Edit the config file at ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows). Either OAuth (URL only) or API key:

// OAuth — recommended
{
  "mcpServers": {
    "autopersonas": {
      "url": "https://mcp.autopersonas.com"
    }
  }
}

// API key — for terminal-only setups
{
  "mcpServers": {
    "autopersonas": {
      "url": "https://mcp.autopersonas.com",
      "headers": { "Authorization": "Bearer ap_live_..." }
    }
  }
}
Claude Code (CLI)
# OAuth (recommended)
claude mcp add --transport http autopersonas https://mcp.autopersonas.com

# API key
claude mcp add --transport http autopersonas https://mcp.autopersonas.com \
  --header "Authorization: Bearer ap_live_..."
Claude.ai (web)

Settings → Custom Connectors → Add → paste https://mcp.autopersonas.com. The OAuth flow opens automatically; sign in with the account you use for the AutoPersonas dashboard and click Allow.

Cursor

Settings → MCP → Add Custom MCP → paste the URL. Cursor adopted MCP+OAuth in 2025 and handles the flow natively. The config file is ~/.cursor/mcp.json (same mcpServers shape as Claude Desktop) if you prefer to edit it directly.

Cline (VS Code extension)

Open the Cline panel → settings (gear icon) → MCP Servers Edit MCP Settings. Same mcpServers JSON shape as Claude Desktop. Cline supports both OAuth and bearer-header API keys.

Continue.dev

Edit ~/.continue/config.json and add an mcpServers block matching the Claude Desktop shape above. Continue picks it up on the next IDE reload.

VS Code GitHub Copilot agent mode

Settings → MCP → Add MCP server → paste the URL (or edit settings.json directly under github.copilot.chat.mcp.servers). Same shape as Claude Desktop.

Custom client / SDK

Use @modelcontextprotocol/sdk for TypeScript, or the equivalent SDK for Python / Go / Rust. Any HTTP client that speaks Streamable HTTP MCP and OAuth 2.1 (or accepts a bearer header) works. Point it at https://mcp.autopersonas.com; the OAuth metadata endpoints handle the rest.

Authentication

AutoPersonas's MCP supports two credential types — pick the one that matches your client:

OAuth 2.1 (recommended)

PKCE + Dynamic Client Registration + Resource Indicators. The client probes a 401 from the MCP URL, auto-registers itself, and walks you through a login + consent screen in your browser — no API key to copy/paste. Works with Claude Desktop, Claude.ai web, Cursor, Cline, Continue, and most other modern MCP clients.

OAuth flow under the hood
  1. Client POSTs to https://mcp.autopersonas.com without a bearer header.
  2. Server responds 401 with WWW-Authenticate: Bearer realm="AutoPersonas", error="invalid_token", resource_metadata="https://mcp.autopersonas.com/.well-known/oauth-protected-resource".
  3. Client follows the metadata pointer (RFC 9728), reads our authorization-server URL, then fetches /.well-known/oauth-authorization-server (RFC 8414).
  4. Client registers itself dynamically via POST /oauth/reg (RFC 7591) and gets back a client_id.
  5. Client opens a browser to /oauth/auth with PKCE (S256). The user signs in with their dashboard account, sees a consent screen showing the client's name (whatever the client passed in client_name during DCR), and clicks Allow.
  6. Authorization code → JWT access token (RS256, 1h TTL) + refresh token (30d, rotating). All subsequent JSON-RPC calls use the JWT in the bearer header.

The MCP server URL is the bare domain (https://mcp.autopersonas.com) — there is no /mcp path suffix. Pasting the URL into your client is enough.

API key (CI / scripted clients)

Fallback for scripted clients, Claude Code in non-interactive mode, or any agent that doesn't handle OAuth itself. Mint a key with safe defaults (read + generate, no publishing:write or billing:*) on the API Keys page, then pass it to your client as Authorization: Bearer ap_live_.... Any client that supports custom HTTP headers can use this path.

The Connect AI agent button on the Integrations page is the easiest way to mint one — it produces a ready-to-paste config snippet for Claude Desktop, Claude Code, Cursor, Cline, Continue, and most other MCP clients without changes.

Test the connection

Ask your agent "list my AutoPersonas tools". You should see the autopersonas_* set, plus the /autopersonas: slash-command prompts. Run autopersonas_account_info as a smoke test — it returns your user ID, scopes, and remaining rate-limit headroom.

What you can do

The MCP server surfaces the full developer-API as 140 tools spread across the categories below. Most map one-to-one to a REST endpoint; a few wrap multi-step flows (poll-until-complete, batch-and-wait) for agent ergonomics.

Account & catalog (3 tools, free)
ToolRequired scopeDescription
autopersonas_account_infoCurrent key's scopes + live rate-limit state. Free preflight.
autopersonas_list_configsMultiplexed read of public config (aesthetic grades, providers, etc.)
autopersonas_list_persona_libraryPersona-library catalog (6-layer templates).
Characters (7 tools)
ToolRequired scopeCostDescription
autopersonas_list_characterscharacter:readfreeList all characters owned by the calling user.
autopersonas_get_charactercharacter:readfreeFull character detail (identity, personality, lifestyle, brand goals).
autopersonas_create_charactercharacter:writefree (training extra)Create a character from a persona-library template + niche.
autopersonas_update_charactercharacter:writefreePatch identity / personality / ingredient library.
autopersonas_set_character_referencescharacter:writefreeSet 4-view reference images from URLs. Merge-style PATCH.
autopersonas_generate_character_referencescharacter:write~$0.80 / 4-view packGenerate a 4-view reference pack from saved ingredient library. Async.
autopersonas_set_brand_goalscharacter:writefreeAttach product / collaboration goals to a character.
Content (6 tools)
ToolRequired scopeCostDescription
autopersonas_generate_contentcontent:generate~20¢ – 36¢ / imageBatch generate N posts. Async — returns batchId + item IDs.
autopersonas_list_contentcontent:readfreeList content items (supports status filter + cursor pagination).
autopersonas_get_contentcontent:readfreeRead a single content item — caption, image URL, status, schedule.
autopersonas_approve_contentcontent:writefreeMark a draft approved (moves to publishable queue).
autopersonas_get_batch_statuscontent:readfreeAggregated status for a generation batch — counts + per-item state.
autopersonas_wait_for_batchcontent:readfreePoll a batch until terminal or timeout (default 300s). Orchestration helper.
Publishing (1 tool)
ToolRequired scopeCostDescription
autopersonas_publish_contentpublishing:write2¢/post + platform feesPublish to all connected social accounts on the linked profile.
Profiles (1 tool)
ToolRequired scopeCostDescription
autopersonas_list_profilesprofile:readfreeList profiles + their connected social accounts and active timelines.
Resources (read-only context)

Resources are read-only context an agent can attach to its conversation without invoking a tool. They're ideal for grounding follow-up generations on a known character or pulling catalog data into the prompt.

URIReturns
autopersonas://agents-guideLive workflow guidance for AutoPersonas agents — auth, long-running ops, polling, batch content patterns. Read up-front for context.
autopersonas://character/{id}Resolved character: identity, personality, lifestyle, brand goals, LoRA status.
autopersonas://profile/{id}Profile + connected social accounts + active timelines.
autopersonas://configs/aesthetic-gradesFull aesthetic-grade catalog. Lets the agent pick a grade without a tool call.
autopersonas://configs/feed-style-presetsFeed style preset catalog.
autopersonas://configs/video-providersAvailable video providers + per-second pricing.
autopersonas://configs/image-providersImage providers + pricing per resolution.

Costs are sourced from src/lib/api-pricing.ts at runtime — figures shown here are typical published rates and may drift slightly with provider pricing changes.

Slash commands

Prompts are reusable orchestration templates that collapse a multi-step flow into a single command. They're invoked from the agent (Claude, Cursor, etc.) with the /autopersonas: prefix.

PromptArgsOrchestrates
/autopersonas:create-branded-personaname, niche, brandGoals?, referenceUrls?Picks a persona-library template by niche → creates the character → attaches refs → attaches brand goals → returns characterId.
/autopersonas:batch-generate-and-scheduleprofileId, characterId, startDate, endDate, postsPerWeek, directionContext?Calls generate_content with N slot specs → waits for batch → returns drafts ready for review.
/autopersonas:publish-with-dedup-checkcontentId, platforms[]Fetches content → runs caption against voiceCorpus dedup → regenerates caption if duplicate → publishes to all targets.
/autopersonas:explore-aestheticscharacterId, baseSlotContextGenerates 5 parallel content variants spanning aesthetic grades. Returns 5 contentIds for comparison.
/autopersonas:run-learning-loopprofileId, lookbackDaysPulls learning dashboard → summarizes top patterns → suggests cadence/archetype changes. Read-only.
/autopersonas:train-and-deploy-loracharacterId, variant?Long-running. Dispatches LoRA training → polls until terminal → verifies the new loraUrl + version. Confirms cost up front (training is expensive).

Scopes

Each tool requires a scope; the "Connect AI agent" button defaults to read + generate (no *:write for safety). Grant additional scopes from the API Keys page or mint a separate key per agent.

ScopeAllows
character:readList + read characters and their config
character:writeCreate + update characters, set brand goals, set references
content:readList + read content drafts; read batch status
content:writeApprove / reject / edit content drafts
content:generateGenerate new content batches; regenerate single items
publishing:writePublish content to connected social accounts; retry failed publishes
profile:readRead profile + connected accounts
profile:writeModify profile settings
analytics:readRead analytics + learning dashboards
billing:readRead billing state + usage
billing:writeModify billing settings (rare)

Cost

Tools that incur charges display the cost in their description so the agent can surface it in chat before invoking. Examples (in cents, USD):

  • autopersonas_generate_content — ~20¢–36¢ / image (depending on resolution + provider).
  • autopersonas_publish_content — 2¢ / post + per-platform fees.
  • autopersonas_generate_character_references — ~80¢ for a 4-view pack.

Live rates come from src/lib/api-pricing.ts. Your monthly budget cap (configured under Billing) applies to MCP-driven calls just like dashboard-driven calls.

Examples

Create a branded persona end-to-end

/autopersonas:create-branded-persona \
  name="Maya" \
  niche="beauty" \
  brandGoals="EarthGlow Serum, RecycleHair Brush"

The agent will: create the character, attach brand goals, confirm. Use autopersonas_get_character afterward to inspect the result.

Generate a 2-week content batch

/autopersonas:batch-generate-and-schedule \
  profileId="prof_abc123" \
  characterId="char_xyz789" \
  startDate="2026-05-01" \
  endDate="2026-05-14" \
  postsPerWeek="5"

Each post is generated asynchronously; the prompt waits on the batch and returns the resulting drafts so you can review and approve them in one shot.

Publish without duplicates

/autopersonas:publish-with-dedup-check \
  contentId="ct_42" \
  platforms="x,instagram"

Troubleshooting

Click an error to see what causes it and how to fix it.

401 Unauthorized

Key revoked or expired (or no OAuth token). Re-mint via the Connect AI agent button or restart your client to re-trigger the OAuth flow.

403 Insufficient scope

The tool needs a scope your key doesn't have. Edit the key on the API Keys page to add it, or mint a new key.

429 Rate limit exceeded

60 RPM cap — wait a minute or split the work across users.

402 Payment Required (budget exceeded)

Monthly budget cap hit. Increase under Billing or wait until next month.

Agent says "tool not found"

Confirm the URL in your client config is exactly https://mcp.autopersonas.com and either OAuth is wired or the bearer header is set.

My agent (Cursor, Cline, etc.) can't connect

Any client speaking RFC 7591 / 8414 / 9728 (DCR + OAuth metadata + protected-resource-metadata) plus Streamable HTTP MCP works. Check your client's MCP docs for OAuth support; older builds may need the API-key fallback. Cursor, Cline, and Continue all added OAuth-MCP support during 2025.

SessionNotFound on the consent screen

Browser dropped the interaction cookie between /oauth/auth and the consent UI. Most common cause: third-party cookies disabled in your browser. Either allow third-party cookies for mcp.autopersonas.com, or open the connector setup in a different browser.

Limitations

  • OAuth-aware clients only: Claude Desktop, Claude.ai web, Cursor, Cline, Continue, VS Code Copilot agent mode all support the OAuth flow. Older or scripted MCP clients may not — use the API-key path instead.
  • Rate limit: 60 requests/minute per user across all keys.
  • Long-running ops: content batches return a batchId and have a companion autopersonas_wait_for_batch tool. LoRA training jobs use autopersonas_wait_for_lora for the same pattern.

Privacy

The bearer key in your agent's config syncs via the OS keychain (Claude Desktop) or wherever your terminal / IDE extension stores it (Claude Code, Cursor, Cline, Continue, …). We strongly recommend minting a separate MCP-scoped key (the Connect AI agent default) so a token leak doesn't compromise your full-scope developer key — or use OAuth, which never puts a long-lived secret on disk in the first place. Revoke any leaked key immediately from the API Keys page — disabled keys reject with 401 on the next request.


Related

© 2026 AutoPersonas. All rights reserved.