Skip to main content
Glama
Unleash MCP (Feature Toggle)

Unleash MCP (Feature Toggle)

by cuongtl1992

MCPサーバーの解放

Unleash Feature Toggle システムと統合する Model Context Protocol (MCP) サーバー実装。

概要

このプロジェクトは、モデルコンテキストプロトコル(MCP)を用いて、LLMアプリケーションとUnleash機能フラグシステム間の橋渡しを行います。これにより、AIアプリケーションは以下のことが可能になります。

  1. Unleashから機能フラグのステータスを確認する

  2. 機能フラグ情報をLLMに公開する

  3. 機能フラグを作成する

  4. 機能フラグの更新

  5. すべてのプロジェクトを一覧表示する

Related MCP server: OpsLevel MCP

目次

要件

  • Node.js (v18以上)

  • TypeScript (v5.0 以上)

  • Unleash サーバーインスタンスへのアクセス

インストール

# Install dependencies
npm i

建築

Unleash MCP サーバーは、LLM アプリケーションと Unleash 機能フラグ システム間のブリッジとして機能します。

+----------------+      +-------------------+      +----------------+
|                |      |                   |      |                |
|  LLM App       | <--> |  Unleash MCP      | <--> |  Unleash API   |
|  (MCP Client)  |      |  Server           |      |  Server        |
|                |      |                   |      |                |
+----------------+      +-------------------+      +----------------+

発達

プロジェクト構造

unleash-mcp-server/
├── src/
│   ├── index.ts              # Main entry point
│   ├── server.ts             # Server implementation
│   ├── config.ts             # Configuration handling
│   ├── transport/            # MCP transport implementations
│   │   ├── http.ts           # HTTP/SSE transport
│   │   └── stdio.ts          # STDIO transport
│   ├── unleash/              # Unleash API client implementations
│   │   ├── unleash-client.ts # Main Unleash client
│   │   ├── get-feature-flag.ts
│   │   └── get-all-projects.ts
│   ├── resources/            # MCP resource implementations
│   │   ├── flags.ts          # Feature flag resources
│   │   └── projects.ts       # Project resources
│   ├── tools/                # MCP tool implementations
│   │   ├── get-flag.ts       # Get feature flag tool
│   │   └── get-projects.ts   # Get projects tool
│   └── prompts/              # MCP prompt implementations
│       ├── flag-check.ts     # Check single flag
│       └── batch-flag-check.ts # Check multiple flags
├── tests/                    # Tests
└── package.json              # Project configuration

コーディング標準

  • 命名規則:

    • ファイル: kebab-case.ts を使用します (例: feature-flag.ts )

    • クラス: PascalCase を使用する (例: UnleashClient )

    • 関数/メソッド: キャメルケースを使用する (例: getFlagStatus )

    • インターフェース/型: PascalCase を使用する (例: FeatureFlagConfig )

  • 輸入品:

    • ローカルファイルをインポートするときは常に .js 拡張子を含める

    • インポートの順序に従う: Node.js 組み込み → 外部依存関係 → ローカルインポート

    • デフォルトのエクスポートではなく名前付きエクスポートを使用する

  • ドキュメント:

    • パブリック関数、クラス、インターフェースには JSDoc コメントを使用する

    • 複雑なロジックをインラインコメントで文書化する

建物

# Compile TypeScript
npm run build

# Run the server
npm start

テスト

# Run tests
npm test

検査

# MCP stdio inspect
npm run build
npx @modelcontextprotocol/inspector node dist/index.js

# MCP sse inspect
npm start
npx @modelcontextprotocol/inspector

使い方

Claude または Cursor 構成の場合:

{
  "mcpServers": {
    "unleash": {
      "command": "npx",
      "args": [
        "-y",
        "unleash-mcp"
      ],
      "env": {
        "UNLEASH_URL": "YOUR_UNLEASH_END_POINT",
        "UNLEASH_API_TOKEN": "YOUR_UNLEASH_API_TOKEN",
        "MCP_TRANSPORT": "stdio",
        "MCP_HTTP_PORT": 3001
      }
    }
  }
}

貢献

貢献を歓迎します!お気軽にプルリクエストを送信してください。

プロジェクトを支援する

このプロジェクトが役に立つと思ったら、私にコーヒーをご馳走していただけると嬉しいです。

このプロジェクトの開発をサポートするには、上記の QR コードをスキャンするか、ここをクリックしてください。

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細については LICENSE ファイルを参照してください。

Available Tools

21 tools
addFeatureTagC

Add a tag to a feature flag

Inputs: featureName (required), tagType (required), tagValue (required).

addStrategyC

Add a strategy to a feature flag in a specific environment

Inputs: environment (required), featureName (required), projectId (required), strategyName (required), +2 more.

archiveFlagC

Archive a feature flag in a specific project

Inputs: featureName (required), projectId (required).

createFlagC

Create a new feature flag in an Unleash project

Inputs: name (required), project (required), description, impressionData, +1 more.

deleteStrategyC

Delete a strategy configuration from a feature flag in the specified environment

Inputs: environment (required), featureName (required), projectId (required), strategyId (required).

disableFlagC

Disables a feature flag in the specified environment

Inputs: environment (required), featureName (required), projectId (required).

enableFlagC

Enables a feature flag in the specified environment

Inputs: environment (required), featureName (required), projectId (required).

getEnvironmentsB

Get a list of all environments configured in Unleash

getFeatureTagsC

Get a list of all tags for a specific feature

Inputs: featureName (required).

getFeatureTypesB

Get a list of all feature types with their descriptions and lifetimes

getFlagC

Get detailed information about a feature flag

Inputs: flagName (required).

getProjectFeatureC

Get detailed information about a feature flag in a specific project

Inputs: featureName (required), projectId (required).

getProjectFeaturesC

Get all features for a specific project from the Unleash repository

Inputs: projectId (required).

getProjectsB

Get a list of all projects

listFlagsB

Get a list of all feature flags

markFeaturesStaleC

Marks features as stale or not stale in the specified project

Inputs: features (required), projectId (required), stale (required).

patchFlagB

Modify specific properties of an existing feature flag in an Unleash project using JSON Patch operations

Inputs: featureName (required), patches (required), projectId (required).

setStrategySortOrderC

Set the sort order of strategies for a feature flag in a specific environment

Inputs: environment (required), featureName (required), projectId (required), strategyIds (required).

updateFlagC

Update an existing feature flag in an Unleash project

Inputs: featureName (required), projectId (required), archived, description, +3 more.

updateStrategyC

Update a strategy configuration for a feature flag in the specified environment

Inputs: environment (required), featureName (required), name (required), projectId (required), +3 more.

validateFeatureNameC

Validate if a feature flag name is valid and available for use

Inputs: featureName (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 21 tools

    Disambiguation4/5

    Most tools have distinct purposes, but there is some overlap between getFlag and getProjectFeature, and between updateFlag and patchFlag, which could cause minor confusion. However, descriptions clarify the differences (e.g., project-specific vs. general, full update vs. partial patch), so misselection is unlikely.

    Naming Consistency4/5

    Tool names generally follow a consistent verb_noun pattern (e.g., createFlag, deleteStrategy, getProjects), with minor deviations like addFeatureTag (noun_verb) and markFeaturesStale (verb_adjective_noun). The naming is readable and mostly predictable, though not perfectly uniform.

    Tool Count3/5

    With 21 tools, the count is on the higher side for a feature toggle server, bordering on heavy. While it covers many operations, it might feel overwhelming or redundant, such as having both listFlags and getProjectFeatures for listing features.

    Completeness5/5

    The tool set provides comprehensive CRUD and lifecycle coverage for feature flags, including creation, retrieval, updating, archiving, enabling/disabling, and strategy management. It also includes utility functions like validation and environment/project listing, leaving no obvious gaps for the domain.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers