npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@arvoretech/launchdarkly-mcp

v1.0.0

Published

LaunchDarkly MCP Server for feature flag management via session-based authentication

Readme

LaunchDarkly MCP Server

A Model Context Protocol (MCP) server for managing LaunchDarkly feature flags. Uses session-based authentication (email/password) with direct API calls — no external dependencies beyond the MCP SDK.

Features

  • Feature Flags: List, search, create, delete, toggle ON/OFF
  • Targeting Rules: Add rules with clauses (in, contains, segmentMatch, etc.)
  • Segments: List and inspect segments
  • Multi-environment: Operate on any environment (production, test, etc.)
  • Semantic Patch: Full support for LaunchDarkly's semantic patch API
  • Auto re-auth: Automatically re-authenticates if session expires

Environment Variables

| Variable | Required | Default | Description | |----------|----------|---------|-------------| | LAUNCHDARKLY_EMAIL | Yes | — | Account email | | LAUNCHDARKLY_PASSWORD | Yes | — | Account password | | LAUNCHDARKLY_BASE_URL | No | https://app.launchdarkly.com | LaunchDarkly base URL | | LAUNCHDARKLY_PROJECT | No | default | Default project key | | LAUNCHDARKLY_ENVIRONMENT | No | production | Default environment key |

Cursor IDE Integration

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "launchdarkly": {
      "command": "node",
      "args": ["packages/launchdarkly/dist/index.js"],
      "env": {
        "LAUNCHDARKLY_EMAIL": "[email protected]",
        "LAUNCHDARKLY_PASSWORD": "your-password",
        "LAUNCHDARKLY_PROJECT": "default",
        "LAUNCHDARKLY_ENVIRONMENT": "production"
      }
    }
  }
}

Available MCP Tools

Flags

| Tool | Description | |------|-------------| | list_flags | List flags with pagination, filtering, and sorting | | get_flag | Get detailed flag info (variations, rules, targeting) | | search_flags | Search flags by name or key | | create_flag | Create a new boolean feature flag | | delete_flag | Permanently delete a flag | | toggle_flag | Turn a flag ON or OFF in a specific environment | | get_flag_statuses | Get evaluation status of specific flags |

Targeting

| Tool | Description | |------|-------------| | add_flag_rule | Add a targeting rule with clauses and variation | | update_flag_targeting | Send raw semantic patch instructions (advanced) |

Segments

| Tool | Description | |------|-------------| | list_segments | List segments in a project/environment | | get_segment | Get segment details including rules |

Project

| Tool | Description | |------|-------------| | list_projects | List all projects | | list_environments | List environments in a project |

Targeting Rule Operators

The add_flag_rule tool supports these clause operators:

| Operator | Description | Example | |----------|-------------|---------| | in | Exact match | access_token in ["TOKEN1", "TOKEN2"] | | contains | String contains | email contains "@company.com" | | startsWith | String starts with | name startsWith "admin" | | endsWith | String ends with | domain endsWith ".edu" | | matches | Regex match | key matches "^test-.*" | | lessThan | Numeric less than | age lessThan 18 | | greaterThanOrEqual | Numeric gte | score greaterThanOrEqual 100 | | segmentMatch | In segment | Context in segment "beta-users" |

Development

pnpm install
pnpm dev       # Run with tsx
pnpm build     # Compile TypeScript
pnpm lint      # Run ESLint
pnpm test      # Run tests

Architecture

  • LaunchDarklyClient: Handles login (2-step cookie auth) and API requests
  • LaunchDarklyMCPTools: Tool implementations and response formatting
  • LaunchDarklyMCPServer: MCP server with stdio transport and tool registration
  • Validation: Zod schemas for all inputs
  • Auth: Cookie-based session via /internal/account/login + /internal/account/login2

Authentication Flow

  1. POST /internal/account/login with email + password
  2. PUT /internal/account/login2 with email
  3. Session cookies (ldso, pa_ldso, ob_ldso) captured and reused
  4. On 401, automatically re-authenticates

License

MIT