DevCycleのロゴ

DevCycle

組織
DevCycleHQ

DevCycle - CLI

公開者DevCycleHQ
リポジトリcli
言語TypeScript
フォーク
6
スター
20
利用可能なツール
0
通信方式streamable-http
ライセンスMIT
リンク
  • ツールをAIワークフローに接続

    DevCycleは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには20件のスターと6件のフォークがあります。

DevCycle CLI & MCP Server

This repository contains the DevCycle CLI for managing feature flags from the command line, plus an MCP (Model Context Protocol) server that enables AI coding assistants to interact with DevCycle.

Major features include:

  • Fully manage your Features, Variables, Variations and Targeting Rules from the command line
  • Detect and list DevCycle Variable usages in your codebase
  • Manage your Self-Targeting Overrides to quickly switch between Variable values
  • Generate type definitions for type-safe usage of DevCycle (Typescript only)
  • MCP (Model Context Protocol) server for AI-powered feature flag management with Cursor and Claude

The CLI can be customized in several ways using command-line args or by creating a configuration file.

oclif Version License

MCP Server for AI Assistants

The DevCycle MCP (Model Context Protocol) server enables AI coding assistants like Cursor and Claude to manage feature flags directly from your development environment. DevCycle offers a hosted MCP server that requires no local installation.

Quick Setup (No Installation Required)

  1. Configure your AI assistant to use the hosted MCP server:

    • Cursor: Add to .cursor/mcp_settings.json:

      json
      {
        "mcpServers": {
          "devcycle": {
            "url": "https://mcp.devcycle.com/mcp"
          }
        }
      }
    • Claude Desktop: Add to your Claude config file:

      json
      {
        "mcpServers": {
          "devcycle": {
            "command": "npx",
            "args": [
              "mcp-remote",
              "https://mcp.devcycle.com/mcp"
            ]
          }
        }
      }
  2. That's it! The server will guide you through OAuth authentication when you first use it.

Your AI assistant can now create, update, and manage feature flags on your behalf.

For local installation options, detailed configuration, available tools, and advanced usage, see the complete MCP documentation.

CLI Documentation

Setup

Install the CLI

Using NPM

sh
$ npm install -g @devcycle/cli

Or alternatively, using homebrew

sh
$ brew tap devcyclehq/cli
$ brew install devcycle

Authentication

Many of the CLI commands require DevCycle API authorization. There are several ways to provide these credentials.

Using Access Tokens (preferred)

Login Command

By using the login sso command, the CLI will retrieve and store an access token, which is valid for 24 hours.

The login again command can be used to retrieve a new access token using the saved project and organization without prompting for them.

This process will open browser windows to interact with the DevCycle universal login page. It will first obtain a personal access token, then prompt you to choose an organization. A second browser window is used to authenticate the CLI with your chosen organization.

To switch organizations once logged in, the organizations select command can be used.

If executing the CLI in a containerized environment, please ensure one of the following PORTs can be accessed via Port Forwarding: 2194 (default), 2195, 2196 or 8080. This will allow the authentication process to complete and set the access token appropriately.

Repo Init Command

The repo init command behaves in the same way as login sso, but creates a repo configuration file and stores the project and organization choices there instead.

Using Client Credentials

Client Credentials in Auth File

Use the dvc status command to find the configuration file location for your platform. The credentials can be stored in the file pointed to by the Auth config path. Create the file if it does not exist, with the following contents.

yaml
clientCredentials:
  client_id: <your client id>
  client_secret: <your client secret>

This file should not be checked in to version control.

The default location is based on the oclif configDir

If you intend to run the CLI using options that override config file locations, the dvc status command command can be run with those options to confirm that the file locations are as expected.

Project Selection

You also need to specify the default project ID for the CLI to use.

If there is a repo configuration file, the dvc diff and dvc usages commands will use the project defined there.

Otherwise, this is chosen during login or set using the project select command

Environment Variables

Set the following environment variables:

sh
$ export DEVCYCLE_CLIENT_ID=<your client id>
$ export DEVCYCLE_CLIENT_SECRET=<your client secret>
$ export DEVCYCLE_PROJECT_KEY=<your project key>

Command-Line Arguments

The CLI can be run with the following arguments:

sh
$ dvc --client-id=<your client id> --client-secret=<your client secret> --project=<your project key>

Github Action

The Devcycle Github actions are configured with auth information through the project-key, client-id and client-secret configuration parameters. This is passed to the CLI via command line arguments.

Usage

sh
$ npm install -g @devcycle/cli
$ dvc COMMAND
running command...
$ dvc (--version)
@devcycle/cli/6.3.2 linux-x64 node-v22.22.2
$ dvc --help [COMMAND]
USAGE
  $ dvc COMMAND
...

Command Topics

  • dvc alias - Manage repository variable aliases.
  • dvc autocomplete - display autocomplete installation instructions
  • dvc cleanup - Replace a DevCycle variable with a static value in the current version of your code. Currently only JavaScript is supported.
  • dvc diff - Print a diff of DevCycle variable usage between two versions of your code.
  • dvc environments - Create a new Environment for an existing Feature.
  • dvc features - Create, view, or modify Features with the Management API.
  • dvc generate - Generate Devcycle related files.
  • dvc help - Display help for dvc.
  • dvc identity - View or manage your DevCycle Identity.
  • dvc keys - Retrieve SDK keys from the Management API.
  • dvc login - Log in to DevCycle.
  • dvc logout - Discards any auth configuration that has been stored in the auth configuration file.
  • dvc organizations - List or switch organizations.
  • dvc overrides - Create, view, or modify Overrides for a Project with the Management API.
  • dvc projects - Create, or view Projects with the Management API.
  • dvc repo - Manage repository configuration.
  • dvc status - Check CLI status.
  • dvc targeting - Create, view, or modify Targeting Rules for a Feature with the Management API.
  • dvc usages - Print all DevCycle variable usages in the current version of your code.
  • dvc variables - Create, view, or modify Variables with the Management API.
  • dvc variations - Create a new Variation for an existing Feature.

Repo Configuration

The following commands can only be run from the root of a configured repository

Many of the options available as command-line args can also be specified using a repo configuration file. The default location for this file is <REPO ROOT>/.devcycle/config.yml.

This location can be overridden using the --repo-config-path flag.

The configuration file format is documented below:

yml
## the project and organization to use when connecting to the DevCycle Rest API for this repo
project: "project-key"
org:
  id: "org_xxxxxx"
  name: "unique-org-key"
  display_name: "Human Readable Org Name"
## block for configuring "code insights" features like diff and variable usage scanning
## use this section to improve the detection of DevCycle usage within your code
codeInsights:
  ## add additional names to check for when looking for instances of DVCClient from an SDK
  clientNames:
    - "dvcClient"
  ## map the values used in your code to the corresponding variable key in DevCycle
  variableAliases:
    "VARIABLES.ENABLE_V1": "enable-v1"
  ## additional regex patterns used to match variables for a specific file extension
  matchPatterns:
    ## file extension to override for, containing a list of patterns to use
    js:
      - dvcClient\.variable\(\s*["']([^"']*)["']
  ## an array of file glob patterns to include in usage scan
  includeFiles:
    - "*.[jt]s"
  ## an array of file glob patterns to exclude from usage scan
  excludeFiles:
    - "dist/*"

Match Patterns and Aliases

When identifying variable usages in the code, the CLI will identify DevCycle SDK methods by default. To capture other usages you may define match patterns. Match patterns are defined by file extension.

:::note Each pattern must include exactly one capture group for the variable key. Capture the entire key value (including surrounding quotes if you choose the “with quotes” pattern). :::

Match patterns can be defined in the configuration file, for example:

yml
codeInsights:
  matchPatterns:
    js:
      - customVariableGetter\(\s*["']([^"']*)["']
    ts:
      - customVariableGetter\(\s*["']([^"']*)["']
    jsx:
      - customVariableHook\(\s*["']([^"']*)["']
      - customVariableGetter\(\s*["']([^"']*)["']
    tsx:
      - customVariableHook\(\s*["']([^"']*)["']
      - customVariableGetter\(\s*["']([^"']*)["']

Capturing with or without quotes

Match patterns can capture variable keys with or without quotes, which affects whether aliases are needed:

With quotes:

yml
# Pattern captures the key including surrounding quotes
- dvcClient\.variable\(\s*(["'][^"']*["'])\s*,
  • Matches: dvcClient.variable('my-variable', default)
  • Captures: 'my-variable' (with quotes)

Without quotes (aliases or generated constants required):

yml
# Pattern strips quotes, capturing only the content
- dvcClient\.variable\(\s*["']([^"']*)["']
  • Matches: dvcClient.variable('my-variable', default)
  • Captures: my-variable

Match patterns can also be passed directly to relevant commands using the --match-pattern flag:

bash
dvc usages --match-pattern ts="customVariableGetter\(\s*["']([^"']*)["']" js="customVariableGetter\(\s*["']([^"']*)["']"

When testing your regex the --show-regex flag can be helpful. This will print all patterns used to find matches in your codebase.

bash
dvc usages --show-regex

Custom Wrapper Functions

If you use wrapper functions around the SDK, add patterns for them.

Example: Custom wrapper functions

yml
codeInsights:
  matchPatterns:
    ts:
      # Matches: getFeatureFlag('my-variable', defaultValue)
      - getFeatureFlag\(\s*([^,)]*)\s*,
      # Matches: isFeatureEnabled('my-variable')
      - isFeatureEnabled\(\s*([^,)]*)\s*\)
    tsx:
      # Matches: useFeatureFlag('my-variable', defaultValue)
      - useFeatureFlag\(\s*([^,)]*)\s*,

インストール

TypingMind
{
  "mcpServers": {
    "devcycle": {
      "url": "https://mcp.devcycle.com/sse"
    }
  }
}

DevCycleのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度DevCycleに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、TypingMindでリモートホストされたMCPサーバーのURLを使って接続します。

MCPサーバーのURLを追加

DevCycleがすでにリモートでホストされている場合や、チームの複数のユーザーで1つのコネクタを共有したい場合は、この方法を使います。

1

MCPコネクタを開く

TypingMindで「プラグイン」に移動し、「MCPコネクタ」を開いて「URLを追加」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 「プラグイン」に移動してください。
  3. 「MCPコネクタ」を開いてください。
  4. 「URLを追加」をクリックします。
TypingMindの「カスタムMCPサーバーURLを追加」フォーム
2

サーバーURLを貼り付け

「サーバーURL」欄にhttps://mcp.devcycle.com/sseを入力してください。サーバーで必要とされる場合は、接続名、説明、アイコン、カスタムHTTPヘッダー、OAuthクライアント設定を追加してください。

  1. 「サーバーURL」欄にhttps://mcp.devcycle.com/sseを貼り付けてください。
  2. DevCycleの接続名を入力してください。
  3. 接続を識別しやすくするには、説明とアイコンを追加してください。
  4. サーバーで認証が必要な場合は、カスタムHTTPヘッダーまたはOAuthクライアントの詳細情報を追加してください。
3

接続を作成

「接続を作成」をクリックし、プラグイン一覧に戻って、新しいMCP接続が有効になっていることを確認してください。

  1. 「接続を作成」をクリックします。
  2. MCPコネクタの一覧に戻ってください。
  3. DevCycleの接続が「有効」と表示されていることを確認してください。
  4. 接続がすぐに表示されない場合は、プラグイン一覧を更新してください。
4

再接続せずにモデルを切り替え

お好みのモデルでチャットを開始し、「プラグイン」でDevCycleのツールを有効にしてください。必要に応じて別のモデルに切り替えられます。MCP接続は、TypingMindのワークスペースで引き続き利用できます。

  1. TypingMindで新しいチャットを開始してください。
  2. 使用するAIモデルを選択してください。
  3. 「プラグイン」でDevCycleのツールを有効にしてください。
  4. 必要に応じて、ツールを使うようモデルに依頼してください。
  5. 別のAIモデルに切り替えて、同じMCP接続を再利用してください。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
DevCycleを使ってこのタスクを手伝ってもらえますか?
DevCycle
はい、読みました。
DevCycleで調べた結果をお伝えします。

よくある質問

DevCycle MCPサーバーは何に使いますか?

DevCycleは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでDevCycle MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでDevCycleを利用できます。

TypingMindでDevCycle MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。DevCycleを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

DevCycle MCPをTypingMindに接続するにはどうすればよいですか?

ホストされているDevCycleのMCPサーバーURLを追加すると、TypingMindに接続できます。TypingMindのワークスペースから利用できるリモートMCP接続が必要な場合に便利です。

TypingMindでDevCycle MCPのどのようなツールを利用できますか?

DevCycleはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

DevCycle MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。DevCycleで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇