DocsAI Assistant (MCP)Connect with an API key

Connect with an API key

Connect Lead Distro AI to Cursor, Windsurf, scripts, or any MCP client using a secure, organization-scoped API key. Create the key in Settings, then paste the endpoint and a bearer token into your client's config.

Last updated:

Some AI clients (Cursor, Windsurf, and others) and headless setups like scripts and scheduled jobs connect with an API key instead of browser sign-in. The key is scoped to one organization and only does what its permissions allow.

Using Claude.ai, the Claude desktop app, or Claude Code? You do not need an API key. Use browser sign-in instead: see Connect with Claude.ai or Desktop or Connect with Claude Code.

Step 1: Create an API key

  • Open Settings, then API Keys (you need to be an admin).
  • Click Create key, give it a name (for example, "Cursor"), and choose its permissions.
  • Copy the key right away. It is shown only once. If you lose it, revoke it and create a new one.

Treat the key like a password. Anyone who has it can act on your organization. Billing actions (charging cards, refunds, invoices) are never available to a key.

Step 2: Add the connector

Point your AI client at the Lead Distro AI MCP endpoint and pass your key as a bearer token. The endpoint is:

https://mcp.leaddistro.ai/mcp

Cursor, Windsurf, and other JSON-config clients

Add Lead Distro AI to your client's MCP server config, and replace YOUR_KEY with the key you created:

{
  "mcpServers": {
    "leaddistro": {
      "url": "https://mcp.leaddistro.ai/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_KEY"
      }
    }
  }
}

Claude Code with a key

If you would rather use a key than browser sign-in in Claude Code (for example, on a server with no browser), add the connector with a header:

claude mcp add --transport http leaddistro \
  https://mcp.leaddistro.ai/mcp \
  --header "Authorization: Bearer YOUR_KEY"

Scripts and scheduled jobs

For headless use, store the key in an environment variable and send it as the Authorization: Bearer header on each request to the endpoint above. Never hard-code the key into a file you might share or commit.

Frequently Asked Questions

What permissions should I give a key?
Give it the least it needs. Read & reporting lets the assistant look things up. Manage campaigns & fields lets it create and change campaigns, buyers, suppliers, field mappings, and automations. You can mix them per key.
What happens if I lose my key?
The full key is shown only once when you create it, so it cannot be recovered. If you lose it, revoke it in Settings and create a new one, then update your client with the new key.
Can a key move money or see other organizations?
No. Billing actions are never exposed to a key, and a key can only act inside the organization it was created in.

If you have any questions, send us an email at support@leaddistro.ai