# LaunchDarkly (OAuth) — Pipedream Connect

> Launch Darkly offers unified feature management and experimentation. Feature flags, context-aware targeting, and experimentation in one powerful software delivery platform.

- API slug: `launch_darkly_oauth` (use in MCP headers and tool keys)
- Auth: OAuth (Pipedream-managed)
- Categories: Developer Tools
- Website: https://launchdarkly.com/
- Managed OAuth scopes: `reader` · `writer`
- This page (HTML): https://pipedream.com/apps/launch-darkly-oauth
- Tools: 10 actions · 3 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: launch_darkly_oauth`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "launch_darkly_oauth",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Evaluate Feature Flag:
const result = await mcp.callTool({
  name: "launch_darkly_oauth-evaluate-feature-flag",
  arguments: {
    projectKey: "Project Key",
    environmentKey: "Environment Key",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a LaunchDarkly (OAuth) endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://app.launchdarkly.com/api/v2/projects

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcHAubGF1bmNoZGFya2x5LmNvbS9hcGkvdjIvcHJvamVjdHM?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "launch_darkly_oauth-evaluate-feature-flag",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    launch_darkly_oauth: { authProvisionId: "apn_xxxxxxx" },
    projectKey: "Project Key",
    environmentKey: "Environment Key",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (10)

### `launch_darkly_oauth-evaluate-feature-flag` — Evaluate Feature Flag (Write)

Evaluates an existing feature flag for a specific user or in a general context. See the documentation.

Full schema: https://pipedream.com/apps/launch-darkly-oauth/actions/evaluate-feature-flag.md

### `launch_darkly_oauth-get-feature-flag` — Get Feature Flag (Write)

Get a feature flag by key. See the documentation.

Full schema: https://pipedream.com/apps/launch-darkly-oauth/actions/get-feature-flag.md

### `launch_darkly_oauth-get-feature-flag-status` — Get Feature Flag Status (Write)

Get the status of a feature flag. See the documentation.

Full schema: https://pipedream.com/apps/launch-darkly-oauth/actions/get-feature-flag-status.md

### `launch_darkly_oauth-get-project` — Get Project (Write)

Get a project by key. See the documentation.

Full schema: https://pipedream.com/apps/launch-darkly-oauth/actions/get-project.md

### `launch_darkly_oauth-list-environments` — List Environments (Write)

List all environments. See the documentation.

Full schema: https://pipedream.com/apps/launch-darkly-oauth/actions/list-environments.md

### `launch_darkly_oauth-list-feature-flags` — List Feature Flags (Write)

List all feature flags. See the documentation.

Full schema: https://pipedream.com/apps/launch-darkly-oauth/actions/list-feature-flags.md

### `launch_darkly_oauth-list-members` — List Members (Write)

List all members in an account. See the documentation.

Full schema: https://pipedream.com/apps/launch-darkly-oauth/actions/list-members.md

### `launch_darkly_oauth-list-projects` — List Projects (Write)

List all projects. See the documentation.

Full schema: https://pipedream.com/apps/launch-darkly-oauth/actions/list-projects.md

### `launch_darkly_oauth-toggle-feature-flag` — Toggle Feature Flag (Write)

Toggles the status of a feature flag, switching it from active to inactive, or vice versa. See the documentation

Full schema: https://pipedream.com/apps/launch-darkly-oauth/actions/toggle-feature-flag.md

### `launch_darkly_oauth-update-feature-flag` — Update Feature Flag (Write)

Updates an existing feature flag using a JSON object. See the documentation

Full schema: https://pipedream.com/apps/launch-darkly-oauth/actions/update-feature-flag.md

## Triggers (3)

### `launch_darkly_oauth-new-access-token-event` — New Access Token Event (Instant)

Emit new event when a new access token activity happens. See the documentation.

Full schema: https://pipedream.com/apps/launch-darkly-oauth/triggers/new-access-token-event.md

### `launch_darkly_oauth-new-flag-event` — New Flag Event (Instant)

Emit new event when flag activity occurs. See the documentation.

Full schema: https://pipedream.com/apps/launch-darkly-oauth/triggers/new-flag-event.md

### `launch_darkly_oauth-new-user-event` — New User Event (Instant)

Emit new event when user activity is noted. See the documentation.

Full schema: https://pipedream.com/apps/launch-darkly-oauth/triggers/new-user-event.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
