Optimly Developer Documentation

Optimly MCP

Optimly MCP

In short

Connect over Streamable HTTP and use OAuth or an Optimly brand API key.

Optimly MCP exposes authorized Optimly evidence to MCP-compatible clients over Streamable HTTP.

Endpoint

https://scout.optimly.ai/mcp

Claude Code

claude mcp add --transport http optimly-mcp https://scout.optimly.ai/mcp

OAuth-capable clients should follow the HTTP authorization challenge. Optimly supports authorization code flow with PKCE and dynamic client registration. Scripts or clients that do not support MCP OAuth can use an active Optimly brand API key:

Authorization: Bearer osk_your_api_key_here

Never place a brand API key in browser code or the Optimly Connect extension.

Brand selection

OAuth sessions can authorize one or more brands. If a user has access to several brands, brand-bound tools require an explicit brand_id. Clients should list accessible brands, ask the user to choose, and retry the intended tool call.

Tool discovery

Treat tools/list as authoritative. The manifest is filtered by the authenticated user's plan, authorized brands, and permissions. Do not hard-code an assumption that every session receives every tool.

Use the existing generated MCP tool reference for current parameters, examples, side effects, and related tools. Write-capable action tools require explicit permissions and follow the approval and execution-ledger workflow described in the authentication documentation.

Safe agent behavior

  • Use the verified Source of Truth for brand facts.
  • Distinguish retrieved evidence from inference.
  • Do not invent missing claims, selectors, destinations, or conversions.
  • Do not publish website changes without the customer's explicit approval and an authorized execution path.
  • Use Site Analytics for human activity and Agent Analytics for crawler activity; do not merge them.