LexQ CLI and MCP server

LexQ CLI and MCP server

lexq-cli•bylexq-io

A CLI that also runs as an MCP server, giving MCP-compatible agents a way to manage LexQ decision rules and deployments.

License: Apache-2.0•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Exposes LexQ tools to MCP clients over a local stdio server or a hosted Streamable HTTP endpoint using one set of tool definitions.
  • •Lets agents manage policy groups, versions, rules, and facts, run simulations and replays, deploy versions, and read execution history.
  • •Marks destructive tool calls so MCP clients can ask for confirmation before running them.
  • •Serves two MCP protocol revisions from the same tool definitions.

BEST FOR

  • •Engineering teams that want agents to manage and deploy business rules without an application release.
  • •Teams that want AI agents to test rule changes against data before shipping them.

ABOUT LEXQ-CLI

LexQ CLI and MCP server is cataloged as an MCP server attributed to lexq-io. A CLI that also runs as an MCP server, giving MCP-compatible agents a way to manage LexQ decision rules and deployments. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Apache-2.0. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for LexQ CLI and MCP server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does the LexQ MCP server require a local installation?

No; there is a hosted Streamable HTTP endpoint, and the CLI can also run as a local MCP server over stdio.

How does the server authenticate clients?

OAuth 2.1 authentication is handled automatically by the MCP client for the remote endpoint.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 2b0578c520c8 · 采集于 2026-11-13 13:16:44 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

LexQ CLI

The Decision Operations Platform for engineering teams. CLI and MCP server for LexQ. Move business rules out of your deploy pipeline, prove every change with Impact Simulation, and ship without a git push.

Website · Docs · Console · MCP Registry

npm License


Why LexQ?

Your business rules, such as pricing, promotions, fee logic, and eligibility checks, change often. But every change ships through the same PR → review → staging → deploy cycle as your core application code, so even a small change waits for the next release.

LexQ keeps those rules out of your code. Your service calls the LexQ API to evaluate them. You change rules in a visual console or through this CLI, test each change with Impact Simulation against past executions or a dataset you upload, and deploy them without an application release.

Every decision leaves a full audit trail.

Install

npm install -g @lexq/cli

Or run without installing:

npx @lexq/cli

Requires Node.js 22+.

Quick Start

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

# 2. Verify
lexq auth whoami

# 3. Start from a domain template — provisions facts, sample rules, and a policy group
lexq domain-templates list
lexq domain-templates apply --template ECOMMERCE
# Returns: policyGroupId, policyVersionId, factsCreated, rulesCreated

# 4. Test a rule against your data before shipping
lexq analytics dry-run --version-id <VERSION_ID> --debug \
  --json '{"facts":{"loyaltyTier":"PLATINUM","purchaseSubtotalUsd":150}}'

# 5. 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"

For AI Agents

Claude, Cursor, and other MCP-compatible agents can use the Model Context Protocol to manage policy groups, versions, rules, and facts, run simulations and replays, deploy versions, and read execution history.

Approval happens in your MCP client, which decides which tool calls you confirm. A tool is marked as destructive when it deletes, overwrites, or cancels something, changes live traffic, cannot be undone, or counts toward your plan's usage, so a client can ask you before running it.

Claude.ai (cloud, no install)

  1. Customize → Connectors → + Add → Add custom connector
  2. Name it, enter https://mcp.lexq.io, and choose Sign in now
  3. On the LexQ page that opens, sign in and generate a new API key for MCP, or choose I already have an API key and paste an existing one
  4. The tools are now available in every conversation

Remote (Streamable HTTP)

For any MCP client that supports remote servers:

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

OAuth 2.1 authentication is handled automatically by your client.

Local (stdio)

Run LexQ CLI as a local MCP server:

lexq serve --mcp

Claude Desktop

Add to 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"
      ]
    }
  }
}

Prerequisite: lexq auth login must have been run once to store an API key in ~/.lexq/config.json, or LEXQ_API_KEY must be set in the client's environment block.

Registry

The server is listed on the official MCP Registry as io.lexq/lexq. Clients that browse the registry find both the npm package and the hosted endpoint in that one entry.

Protocol Support

The local stdio server and the hosted Streamable HTTP endpoint both serve two MCP revisions from one set of tool definitions, so a client sees the same tools either way.

RevisionHow a client reaches it
2026-07-28A per-request _meta envelope. No handshake.
2025-11-25The initialize handshake.

There is nothing to configure. The server answers in whichever revision the opening message used, so a client can move to 2026-07-28 on its own schedule and one that has not moved keeps working.

AI Agent Skills

LexQ CLI ships with AI Agent Skills: structured documentation that tells agents how to use each tool.

Each SKILL.md starts with name and description frontmatter in the Agent Skills format. An agent that loads skills reads those two fields at startup and opens a skill when a task matches its description.

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, Impact Simulation, compare
├── lexq-execution/SKILL.md    History, stats, failure logs, provenance, replay, latency profile
└── lexq-recipes/SKILL.md      End-to-end recipes

CLAUDE.md                      Claude Code entry point, imports AGENTS.md
AGENTS.md                      Universal agent guide (Cursor, Windsurf, Gemini CLI, Cline)
CONTEXT.md                     Platform architecture & glossary

After installing @lexq/cli, agents can read skills from:

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

Commands

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 | reorder
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 | unregistered
lexq domain-templates      list | preview | apply
lexq deploy                publish | live | rollback | undeploy | history | detail | overview | deployable | diff | schedule | unschedule | schedules
lexq analytics             dry-run | dry-run-compare | requirements
lexq analytics simulation  start | status | list | cancel | export
lexq analytics dataset     upload | template
lexq profile               <groupId> — per-rule latency profile
lexq history               list | get | stats
lexq replay                decision | start | list | get | cancel
lexq logs                  list | get
lexq provenance            get | reveal-audits
lexq webhook-subscriptions list | get | save | delete | test

Global Options

FlagDescription
--format <json|table>How results are printed (default: json)
--api-key <key>Override stored API key
--base-url <url>Override API base URL
--dry-runPreview the HTTP request without executing
--verboseShow request/response details
--no-colorDisable colored output

--format only changes how results are printed. A command that writes a file, such as lexq facts export, chooses the file's format with --as csv or --as json.

Configuration

Config is stored at ~/.lexq/config.json:

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

The file holds an API key in plain text. It is saved with mode 0600 inside a 0700 directory, so only its owner can read it. If an older version created it with looser permissions, the CLI tightens them the next time it saves the file.

Environment variables

These are read by the MCP server (lexq serve --mcp) and take precedence over the stored config. They let an editor or CI target an environment through the client's own config block, without writing to ~/.lexq/config.json. CLI commands use --api-key and --base-url instead.

VariableOverrides
LEXQ_API_KEYapiKey
PARTNER_BASE_URLbaseUrl

Development

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
pnpm build                      # Bundle to dist/

Checks that guard a stated fact against the thing that owns it. All of them run in CI.

pnpm enums:check                # Generated enums match the engine contract
pnpm prose:check                # Numbers and code tables in prose match the contract
pnpm ab-key:check               # Tool descriptions still name the A/B traffic key
pnpm surface:check              # Nothing internal reached a public file
pnpm registry:check             # server.json agrees with package.json and src/mcp/server-info.json
pnpm schemas:check              # tools/list matches the recorded snapshot (needs a build)
pnpm test:fact-key              # Fact key grammar
pnpm test:decimals              # Metric precision display
pnpm test:export-format         # Export byte fidelity
pnpm protocol:check             # README matches the revisions the server serves

Security

Report a vulnerability through GitHub's private reporting form. The policy, including what is in scope, is in SECURITY.md.

License

Apache-2.0

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for LexQ CLI and MCP server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/lexq-cli)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools