LexQ
LexQ CLI
エンジニアリングチームのための意思決定プラットフォーム LexQ 用のCLIおよびMCPサーバー — ビジネスルールをデプロイパイプラインから切り離し、シミュレーションですべての変更を検証し、git pushなしでリリースを実現します。
LexQを選ぶ理由
価格設定、プロモーション、手数料ロジック、資格チェックといったビジネスルールは頻繁に変更されます。しかし、その変更のたびに、コアアプリケーションコードと同じ「PR作成 → レビュー → ステージング → デプロイ」というサイクルを経る必要があります。たった1行の割引ルールを変更するのに2週間もかかることがあります。
これはプロセス上の問題ではなく、アーキテクチャの問題です。毎週変更されるビジネスロジックが、四半期ごとにリリースされるコードの中に存在すべきではありません。
LexQはこの2つを分離します。 ルールはアプリケーションの外側に存在します。ビジュアルコンソールまたはこのCLIを通じてルールを変更します。実際の実行データを用いたバッチシミュレーションですべての変更を検証し、コードベースに触れることなくデプロイを行います。
すべての意思決定には完全な監査証跡が残ります。
Related MCP server: @run-iq/mcp-server
インストール
npm install -g @lexq/cliまたはインストールせずに実行する場合:
npx @lexq/cliNode.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 (クラウド — インストール不要)
設定 → コネクタ → カスタム統合を追加
以下を入力:
https://mcp.lexq.ioLexQアカウントでサインインし、APIキーを選択
完了 — すべての会話で63のツールが利用可能になります
リモート (ストリーミング可能なHTTP)
リモートサーバーをサポートするMCPクライアントの場合:
{
"mcpServers": {
"lexq": {
"url": "https://mcp.lexq.io"
}
}
}OAuth 2.1認証はクライアントによって自動的に処理されます。
ローカル (stdio)
LexQ CLIをローカルMCPサーバーとして実行する場合:
lexq serve --mcpClaude 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グローバルオプション
フラグ | 説明 |
| 出力形式 (デフォルト: |
| 保存されたAPIキーを上書きする |
| APIベースURLを上書きする |
| 実行せずにHTTPリクエストをプレビューする |
| リクエスト/レスポンスの詳細を表示する |
| カラー出力を無効にする |
設定
設定は ~/.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 listpnpm 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ライセンス
This server cannot be deployed
Maintenance
Related MCP Connectors
63 MCP tools for loyalty programs, rewards, and member operations with HITL approval.
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
100+ MCP tools for AI agents: content metadata, trade intelligence, business-expertise analysis.
Related MCP Servers
AlicenseCqualityDmaintenanceProvides unified access to 100+ MCP tools from the marketplace plus custom MCPs through a single gateway with search and execute capabilities.29 npm23MIT
@run-iq/mcp-serverofficial
AlicenseNot gradedqualityDmaintenanceMCP server exposing a parametric policy engine for evaluating, simulating, and managing rules, with dynamic plugin support for domain-specific calculations.8 npm1MIT- AlicenseNot gradedqualityBmaintenanceProvides portable working rules and tooling instructions as MCP resources, ensuring consistent agent behavior across clients.MIT
- FlicenseAqualityCmaintenanceMCP server for SAP SuccessFactors that provides 52 tools across 15 categories for querying live data, generating business rules, validating imports, running analytics, comparing instances, auditing data, and building cutover checklists.52-