Skip to main content
Glama
Unleash MCP (Feature Toggle)

Unleash MCP (Feature Toggle)

by cuongtl1992

MCP 서버 해제

Unleash Feature Toggle 시스템과 통합되는 MCP(Model Context Protocol) 서버 구현입니다.

개요

이 프로젝트는 모델 컨텍스트 프로토콜(MCP)을 사용하여 LLM 애플리케이션과 Unleash 피처 플래그 시스템을 연결합니다. 이를 통해 AI 애플리케이션은 다음과 같은 작업을 수행할 수 있습니다.

  1. Unleash에서 기능 플래그 상태 확인

  2. LLM에 기능 플래그 정보 공개

  3. 기능 플래그 생성

  4. 기능 플래그 업데이트

  5. 모든 프로젝트 나열

Related MCP server: OpsLevel MCP

목차

요구 사항

  • Node.js(v18 이상)

  • TypeScript(v5.0 이상)

  • Unleash 서버 인스턴스에 액세스

설치

지엑스피1

건축학

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 )

    • 함수/메서드: camelCase를 사용하세요(예: 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 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.

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