Skip to main content
Glama

LexQ CLI

エンジニアリングチームのための意思決定プラットフォーム LexQ 用のCLIおよびMCPサーバー — ビジネスルールをデプロイパイプラインから切り離し、シミュレーションですべての変更を検証し、git pushなしでリリースを実現します。

ウェブサイト · ドキュメント · コンソール

npm ライセンス


LexQを選ぶ理由

価格設定、プロモーション、手数料ロジック、資格チェックといったビジネスルールは頻繁に変更されます。しかし、その変更のたびに、コアアプリケーションコードと同じ「PR作成 → レビュー → ステージング → デプロイ」というサイクルを経る必要があります。たった1行の割引ルールを変更するのに2週間もかかることがあります。

これはプロセス上の問題ではなく、アーキテクチャの問題です。毎週変更されるビジネスロジックが、四半期ごとにリリースされるコードの中に存在すべきではありません。

LexQはこの2つを分離します。 ルールはアプリケーションの外側に存在します。ビジュアルコンソールまたはこのCLIを通じてルールを変更します。実際の実行データを用いたバッチシミュレーションですべての変更を検証し、コードベースに触れることなくデプロイを行います。

すべての意思決定には完全な監査証跡が残ります。

Related MCP server: @run-iq/mcp-server

インストール

npm install -g @lexq/cli

またはインストールせずに実行する場合:

npx @lexq/cli

Node.js 18以上が必要です。

クイックスタート

# 1. Authenticate
lexq auth login
# Enter your API key (create one at console.lexq.io → Management → API Keys)

# 2. Verify
lexq auth whoami

# 3. Create a policy group
lexq groups create --json '{"name":"my-policy","priority":0}'

# 4. Create a draft version
lexq versions create --group-id <GROUP_ID> --json '{"commitMessage":"v1"}'

# 5. Add a rule
lexq rules create --group-id <GROUP_ID> --version-id <VERSION_ID> --json '{
  "name": "VIP Discount",
  "priority": 0,
  "condition": {
    "type": "SINGLE",
    "field": "customer_tier",
    "operator": "EQUALS",
    "value": "VIP",
    "valueType": "STRING"
  },
  "actions": [{
    "type": "DISCOUNT",
    "parameters": {"method":"PERCENTAGE","rate":10,"refVar":"payment_amount"}
  }]
}'

# 6. Test against your data before shipping
lexq analytics dry-run --version-id <VERSION_ID> --debug --mock \
  --json '{"facts":{"customer_tier":"VIP","payment_amount":100000}}'

# 7. Deploy
lexq deploy publish --group-id <GROUP_ID> --version-id <VERSION_ID> --memo "v1"
lexq deploy live --group-id <GROUP_ID> --version-id <VERSION_ID> --memo "Initial deploy"

AIエージェント向け — 63のMCPツール

LexQはAIネイティブに設計されています。ポリシーエンジンAPI全体(63のツールすべて)がModel Context Protocolを通じて公開されています。Claude、Cursor、その他のMCP互換エージェントは、本番環境への適用前に人間の承認を得た上で、自律的にルールの作成、シミュレーション、デプロイを行うことができます。

Claude.ai (クラウド — インストール不要)

  1. 設定 → コネクタ → カスタム統合を追加

  2. 以下を入力: https://mcp.lexq.io

  3. LexQアカウントでサインインし、APIキーを選択

  4. 完了 — すべての会話で63のツールが利用可能になります

リモート (ストリーミング可能なHTTP)

リモートサーバーをサポートするMCPクライアントの場合:

{
  "mcpServers": {
    "lexq": {
      "url": "https://mcp.lexq.io"
    }
  }
}

OAuth 2.1認証はクライアントによって自動的に処理されます。

ローカル (stdio)

LexQ CLIをローカルMCPサーバーとして実行する場合:

lexq serve --mcp

Claude Desktop

claude_desktop_config.json に追加:

{
  "mcpServers": {
    "lexq": {
      "command": "npx",
      "args": [
        "-y",
        "@lexq/cli",
        "serve",
        "--mcp"
      ]
    }
  }
}

VS Code / Cursor

.vscode/mcp.json:

{
  "servers": {
    "lexq": {
      "command": "npx",
      "args": [
        "-y",
        "@lexq/cli",
        "serve",
        "--mcp"
      ]
    }
  }
}

前提条件: APIキーを ~/.lexq/config.json に保存するために、一度 lexq auth login を実行しておく必要があります。

AIエージェントスキル

LexQ CLIにはAIエージェントスキルが同梱されています。これは、エージェントがツールを「何ができるか」だけでなく「どのように使うか」を理解するための構造化されたドキュメントです。

skills/
├── lexq-shared/SKILL.md       Core concepts, auth, workflow
├── lexq-groups/SKILL.md       Policy groups, conflict resolution, A/B testing
├── lexq-rules/SKILL.md        Condition syntax, action types, mutex
├── lexq-simulation/SKILL.md   Dry run, batch simulation, compare
├── lexq-execution/SKILL.md    Execution history, stats, failure logs
└── lexq-recipes/SKILL.md      End-to-end recipes

.claude/CLAUDE.md              Claude Code project context
AGENTS.md                      Universal agent guide (Cursor, Windsurf, Gemini CLI, Cline)
CONTEXT.md                     Platform architecture & glossary

@lexq/cli をインストールした後、エージェントは以下の場所からスキルを読み取ることができます:

node_modules/@lexq/cli/skills/
node_modules/@lexq/cli/AGENTS.md
node_modules/@lexq/cli/CONTEXT.md

コマンド

lexq auth                  login | logout | whoami
lexq status                API health check
lexq serve                 Run as MCP stdio server (--mcp)
lexq groups                list | get | create | update | delete
lexq groups ab-test        start | stop | adjust
lexq versions              list | get | create | update | delete | clone
lexq rules                 list | get | create | update | delete | reorder | toggle
lexq facts                 list | create | update | delete | action-metadata
lexq deploy                publish | live | rollback | undeploy | history | detail | overview | deployable | diff
lexq analytics             dry-run | dry-run-compare | requirements
lexq analytics simulation  start | status | list | cancel | export
lexq analytics dataset     upload | template
lexq history               list | get | stats
lexq integrations          list | get | save | delete | config-spec
lexq logs                  list | get | action | bulk-action
lexq webhook-subscriptions list | get | save | delete | test

グローバルオプション

フラグ

説明

--format <json|table>

出力形式 (デフォルト: json)

--api-key <key>

保存されたAPIキーを上書きする

--base-url <url>

APIベースURLを上書きする

--dry-run

実行せずにHTTPリクエストをプレビューする

--verbose

リクエスト/レスポンスの詳細を表示する

--no-color

カラー出力を無効にする

設定

設定は ~/.lexq/config.json に保存されます:

{
  "apiKey": "YOUR_API_KEY",
  "baseUrl": "https://api.lexq.io/api/v1/partners",
  "format": "json"
}

開発

git clone https://github.com/lexq-io/lexq-cli.git
cd lexq-cli
pnpm install
pnpm build
pnpm start -- groups list
pnpm typecheck                  # Type check
pnpm lint                       # ESLint
bash tests/e2e.sh               # CLI E2E tests (requires API key)
bash tests/test-engine-api.sh   # Engine API integration tests

ライセンス

Apache-2.0

A
license - permissive license
Not graded
quality - not tested
A
maintenance

Maintenance

Maintainers
Response time
2dRelease cycle
52Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server exposing a parametric policy engine for evaluating, simulating, and managing rules, with dynamic plugin support for domain-specific calculations.
    61
    1
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    The first full-featured MCP server for Adobe Experience Platform: 29 tools across schemas, datasets, profiles, segments, query service, and GDPR/CCPA privacy operations. Extends Adobe's read-only beta with production-grade write operations.
    426
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • 34 production API tools over one hosted MCP endpoint.

  • 100+ MCP tools for AI agents: content metadata, trade intelligence, business-expertise analysis.

  • Free MCP tools: the only MCP linter, health checks, cost estimation, and trust evaluation.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lexq-io/lexq-cli'

If you have feedback or need assistance with the MCP directory API, please join our Discord server