Machine-to-Machine (M2M) Authentication
Overview
Lightcast MCP supports two authentication methods for software that runs without user interaction:
- OAuth Client Credentials (M2M): Recommended for AI agents, backend services, automation workflows, and enterprise integrations.
- API Keys: Use only when your software or AI gateway does not support OAuth.
If you use an AI assistant that supports OAuth sign-in, authenticate through your browser instead. See Security.
Endpoint
All clients connect to the same Lightcast MCP endpoint, regardless of the authentication method.
https://mcp.ai.api.lightcast.io OAuth Client Credentials
OAuth 2.0 Client Credentials is the recommended authentication method for machine-to-machine communication.
Authentication Flow
Authenticating with Lightcast MCP consists of two steps:
- Request an access token using your client credentials and organization ID.
- Include the access token in the Authorization header of every MCP request.
flowchart TD
A["Your Application"]
B["OAuth Token Endpoint"]
C["OAuth Access Token (JWT)"]
D["Lightcast MCP Server"]
E["MCP Tool Execution"]
A -->|"Client ID, Client Secret, Organization ID"| B
B -->|"Validate Credentials"| C
C -->|"Authorization: Bearer token"| D
D --> E
Get Client Credentials
Lightcast creates one or more clients for your organization. Each client must belong to an existing organization.
Lightcast provides the following credentials and configuration details:
| Parameter | Description |
|---|---|
| Client ID | Identifier for your application. |
| Client Secret | Confidential credential used to authenticate your application. |
Use the following configuration values when requesting an access token:
| Parameter | Value |
|---|---|
| OAuth Token Endpoint | https://lightcast-ai.us.auth0.com/oauth/token |
| Audience | https://mcp.ai.api.lightcast.io/ |
| Grant Type | client_credentials |
Store your client credentials in a secure secret manager. Never expose your client secret in source code, client-side applications, or version control.
Request an Access Token
Exchange your client ID and client secret for an access token. Include your organization ID in the organization field.
The client must be assigned to the specified organization for an access token to be issued.
A request that specifies an organization that does not exist or is not associated with the client returns HTTP 400 with the invalid_request error.
curl --request POST \
--url https://lightcast-ai.us.auth0.com/oauth/token \
--header 'content-type: application/json' \
--data '{
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"audience": "https://mcp.ai.api.lightcast.io/",
"grant_type": "client_credentials",
"organization": "YOUR_ORGANIZATION_ID"
}'Call the MCP Server
Include the access token in the Authorization header of every MCP request.
Once authenticated, your application can discover and invoke the MCP tools available under your organization's plan.
POST /
Host: mcp.ai.api.lightcast.io
Authorization: Bearer <access_token>
Content-Type: application/jsonToken Lifecycle
Access tokens are short-lived. Cache and reuse the access token until it expires, then request a new token.
| Property | Value |
|---|---|
| Token Type | JWT bearer token |
| Token Lifetime | 1 hour |
| Refresh Token | Not issued |
| Renewal Strategy | Request a new access token |
flowchart TD
A[Application Starts] --> B[Request Access Token]
B --> C[Cache Access Token]
C --> D{Token Expired?}
D -->|No| E[Call MCP Server]
D -->|Yes| B
E --> D
Rotate or Retire Credentials
Rotating a client secret immediately invalidates the previous secret. Previously issued access tokens remain valid until they expire.
To rotate credentials without downtime:
- Create a replacement client.
- Update your software to use the new client credentials.
- Delete the original client.
API Keys
API keys are not recommended. Use an API key only when your software or AI gateway cannot use OAuth, such as a gateway that supports only fixed authentication headers.
API keys do not expire. Use OAuth client credentials whenever your software supports OAuth.
How API Keys Work
Each API key belongs to one client within an existing organization. Lightcast MCP validates the key on every request.
The key provides access to the tools and datasets available under your organization's plan.
All requests made using the same API key count toward the usage of that client. Use a separate API key for each gateway or application.
Get an API Key
Lightcast creates an API key for your organization and displays it only once.
Store the key immediately in a secure secret manager. If you lose the key, contact your Lightcast representative to request a new one.
Call the MCP Server
Send the API key in the x-api-key header of every MCP request.
Use the same Lightcast MCP endpoint as OAuth clients.
POST /
Host: mcp.ai.api.lightcast.io
x-api-key: YOUR_API_KEY
Content-Type: application/jsonRotate or Remove an API Key
To replace an API key without downtime:
- Contact your Lightcast representative to request a new API key.
- Update your software to use the new key.
- Ask your Lightcast representative to delete the original key.
The original key remains valid until it is deleted. Removing a client immediately invalidates its API key.
An organization can have up to 50 active API key clients.
API Key Security
- Store API keys in a secure secret manager.
- Never include API keys in source code, URLs, or shared files.
- Rotate API keys according to your organization's security policies.
- Replace an API key whenever someone who had access to it leaves your organization.
Updated 10 days ago

