AI integrations: advanced

API keys, transport details and agent artifacts for the Droviat MCP server.

Most people should connect Claude by signing in with their Droviat account: see Connect Droviat to Claude. This page covers the secondary API-key path for scripts, self-hosted agents and clients that only send fixed headers, plus the protocol details integrators ask about.

Behavior to know

  • Write tools run on the first call. There is no confirmation round trip; a legacy confirmed argument is accepted and ignored. Each tool declares readOnlyHint, destructiveHint, idempotentHint and openWorldHint so clients can ask before changes.
  • Each tools/call that passes the scope and workspace checks counts as one API call against the workspace plan quota shared with the public API.
  • Quota exhaustion, a paused workspace and a missing API-key scope are tool results with isError: true and HTTP 200 (types plan_limit_exceeded, workspace_paused, insufficient_scope), not HTTP errors.
  • Droviat records the tool name, client, workspace, user, outcome and request ID for each call, not the tool arguments.

API-key access

A workspace API key is bound to one workspace and limited to the scopes it was created with.

Credentials

HeaderPurpose
Authorization: Bearer usk_…Preferred way to send a workspace API key.
x-api-key: usk_…Accepted only when no Authorization header is sent, and only for usk_ keys. Sending both headers returns 400 AMBIGUOUS_AUTH.
x-mcp-client-id, x-mcp-client-name, x-mcp-client-versionOptional labels for the connection records of API-key callers.

Credentials in query strings are ignored. An invalid, expired or revoked key gets 401 with WWW-Authenticate: Bearer … error="invalid_token".

Scopes

tools/list shows only the tools the key's scopes allow. Read tools need links:read or analytics:read; write tools need links:write. Create keys in Droviat under Workspace, Integrations.

Transport

Stateless Streamable HTTP with JSON responses.

Protocol

  • POST /mcp only. GET and DELETE return 405 with Allow: POST; there is no SSE stream and no session ID.
  • Supported MCP-Protocol-Version values: 2025-11-25, 2025-06-18, 2025-03-26. A request without the header is treated as 2025-03-26; an unsupported value returns 400. initialize answers with your version if supported, otherwise the latest.
  • JSON-RPC batching is not supported: a batch array returns 400 with error -32600.
  • Notifications and client responses get 202 with no body.
  • Unknown methods return -32601 and unknown tools -32602, both with HTTP 200. Malformed JSON returns 400 with -32700.
  • Requests with an Origin header from an origin Droviat does not recognize get 403.

Handshake flow

  1. Call POST /mcp with an initialize request.
  2. Send notifications/initialized after the handshake completes.
  3. Call tools/list to read the tools your credential allows.
  4. Call tools/call; write tools run on the first call.

Example initialize request

POST /mcp
Authorization: Bearer usk_<workspace-api-key>
MCP-Protocol-Version: 2025-11-25

{
  "jsonrpc": "2.0",
  "id": "init-1",
  "method": "initialize",
  "params": {
    "protocolVersion": "2025-11-25",
    "capabilities": {},
    "clientInfo": {
      "name": "my-agent",
      "version": "1.0.0"
    }
  }
}

Example tool call

{
  "jsonrpc": "2.0",
  "id": "call-2",
  "method": "tools/call",
  "params": {
    "name": "campaign_create",
    "arguments": {
      "name": "Q4 launch",
      "slug": "q4-launch",
      "status": "draft"
    }
  }
}

Claude Code

Sign in with Droviat (recommended), or use an API key when a fixed header is required.

Recommended: sign in

claude mcp add --transport http droviat https://api.droviat.com/mcp

Then run /mcp in Claude Code, sign in to Droviat and choose a workspace.

API key (CLI)

claude mcp add --transport http droviat https://api.droviat.com/mcp \
  --header "Authorization: Bearer ${DROVIAT_API_KEY}"

Use --scope user to make Droviat available in every project, or --scope project to share it through a committed .mcp.json.

API key (.mcp.json)

{
  "mcpServers": {
    "droviat": {
      "type": "http",
      "url": "https://api.droviat.com/mcp",
      "headers": {
        "Authorization": "Bearer ${DROVIAT_API_KEY}"
      }
    }
  }
}

${VAR} references expand from each developer's environment, so keys stay out of version control.

Key hygiene

  • Create a dedicated key with the smallest scope set that covers the workflow.
  • Export DROVIAT_API_KEY in your shell profile instead of inlining it.
  • Revoke the key in Droviat if it ever lands in a transcript or commit.

Droviat session tokens on /mcp (deprecated)

Using a Droviat app session token on /mcp still works for now, but it is deprecated.

  • Responses to session-token requests carry a Deprecation header and, once the date is set, a Sunset header with the date after which session tokens stop working on /mcp.
  • The sunset date is the last day of the month that falls 90 days after sign-in with Droviat is turned on for everyone. It will be published on this page that day; until then it is only in the Sunset header.
  • Move to signing in with Droviat, or to a workspace API key.

SKILL.md

The canonical skill document for agent-facing Droviat workflow guidance.

This v1 skill and the MCP fixtures below show the earlier header and session-token setup and a confirmation step. That step is no longer required: write tools run on the first call and a confirmed argument is ignored. Updated versions will be published here.

droviat-agent-automation-skill-v1.md

Markdown source published with the portal.

Download
Loading source…

Fixtures

Synthetic payloads for local testing, demos, prompt scaffolding, and regression setup.

campaign-create.json

Campaign creation request.

Download
Loading source…

campaign-create-response.json

Campaign creation response.

Download
Loading source…

link-create.json

Tracked link creation request.

Download
Loading source…

link-create-response.json

Tracked link creation response.

Download
Loading source…

utm-suggestions.json

Governed UTM suggestion query.

Download
Loading source…

utm-suggestions-response.json

Governed UTM suggestion response.

Download
Loading source…

analytics-summary.json

Workspace analytics query.

Download
Loading source…

analytics-summary-response.json

Workspace analytics response.

Download
Loading source…

conversion-ingest.json

Attribution conversion request.

Download
Loading source…

conversion-ingest-response.json

Attribution conversion response.

Download
Loading source…

mcp-campaign-create.json

Hosted MCP write request.

Download
Loading source…

mcp-campaign-create-response.json

Hosted MCP write response.

Download
Loading source…

Public API YAML

The same OpenAPI source used by the live reference page, viewable inline and downloadable.

control-api-public.yaml

OpenAPI 3.1 source for public automation workflows.

Download
Loading source…