Authentication

Set up your API key to authenticate with distribute.

1. Create an Account

Sign up at dashboard.distribute.you to get started.

2. Get Your API Key

After signing in, go to API Keys and create a new key.

dist_xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Keep this key secret. It grants full access to your organization.

3. Using Your API Key

MCP Server

Pass the key via CLI flag or environment variable:

# CLI flag
npx @distribute/mcp --api-key=dist_YOUR_KEY

# Environment variable
DISTRIBUTE_API_KEY=dist_YOUR_KEY npx @distribute/mcp

REST API

Include your key in the X-API-Key header:

curl https://api.distribute.you/v1/me \
  -H "X-API-Key: dist_YOUR_KEY"

TypeScript Client

import { DistributeClient } from "@distribute/api-client";

const client = new DistributeClient({
  apiKey: "dist_YOUR_KEY",
});

const me = await client.getMe();
console.log(me); // { userId, orgId, authType }

4. Verify Setup

Test your key with a simple API call:

curl https://api.distribute.you/v1/me \
  -H "X-API-Key: dist_YOUR_KEY"

You should see your user ID and organization ID.

Security

  • API keys are scoped to your organization
  • Never commit keys to version control
  • Use environment variables for local development
  • Rotate keys periodically via the dashboard
  • You can create multiple keys and revoke them individually