> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# LaunchDarkly

> Read LaunchDarkly projects, feature flags, and environments, and toggle flags

## At a glance

* **Availability**: Experimental ([how to enable](/cloud/integrations)).
* **Auth**: API key.
* **Connection**: The key comes from `LAUNCHDARKLY_API_TOKEN`.
* **Docs**: [https://launchdarkly.com/docs/api](https://launchdarkly.com/docs/api)

## Credentials

Set these per environment. See [Connect an integration](/cloud/integrations).

| Variable                 | Required | Description                                                                                                                                                    |
| ------------------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `LAUNCHDARKLY_API_TOKEN` | Yes      | LaunchDarkly personal or service access token (sent raw in the Authorization header, no prefix) [Docs](https://launchdarkly.com/docs/home/account/api-create). |

## Setup

1. **Sign in to LaunchDarkly**: Use an existing account or start a trial at [https://app.launchdarkly.com](https://app.launchdarkly.com). A project with a couple of test flags is enough to exercise all tools.
2. **Create an access token**: Go to Organization settings → Authorization ([https://app.launchdarkly.com/settings/authorization](https://app.launchdarkly.com/settings/authorization)) and create a personal or service access token. A Reader role token is enough for the read tools; toggling flags needs Writer access to the relevant projects.
3. **Set the environment variable**: Add the token to your .env as LAUNCHDARKLY\_API\_TOKEN=...
4. **Verify access**: Run List Projects, then List Feature Flags with a project key.

* The Authorization header contains the raw token with no Bearer prefix
* Toggle Feature Flag uses LaunchDarkly's semantic patch format: Content-Type 'application/json; domain-model=launchdarkly.semanticpatch' with an instructions array
* EU and Federal instances use different hosts (app.eu.launchdarkly.com, app.launchdarkly.us); these tools target the commercial instance at app.launchdarkly.com

Provider API reference: [https://launchdarkly.com/docs/api](https://launchdarkly.com/docs/api)

## Tools

| Tool                | Access | Description                                                                         |
| ------------------- | ------ | ----------------------------------------------------------------------------------- |
| List Projects       | Read   | List projects in the LaunchDarkly account                                           |
| List Feature Flags  | Read   | List feature flags in a project, optionally scoped to one environment               |
| Get Feature Flag    | Read   | Get a feature flag including its variations and per-environment configuration       |
| List Environments   | Read   | List environments in a LaunchDarkly project                                         |
| Toggle Feature Flag | Write  | Turn a feature flag on or off in one environment using a semantic patch instruction |

## Example prompts

* List the feature flags in my LaunchDarkly project and group them by whether they are archived or tagged as temporary.
* Get my LaunchDarkly flag and tell me whether it is on in production and what the default variation is.
