lexq-cliSAFE
The Decision Operations Platform for engineering teams. CLI and MCP server for LexQ
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
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](https://lexq.io) · [Docs](https://docs.lexq.io) · [Console](https://console.lexq.io) · [MCP Registry](https://registry.modelcontextprotocol.io)
[](https://www.npmjs.com/package/@lexq/cli) [](LICENSE)
Why LexQ?
Your business rules — pricing, promotions, fee logic, eligibility checks — change often. But every change ships through the same PR → review → staging → deploy cycle as your core application code. A one-line discount rule takes two weeks.
This is an architectural problem, not a process problem. Business logic that changes weekly shouldn't live in code that ships quarterly.
LexQ separates the two. Rules live outside your application. You change them in a visual console or through this CLI. You prove every change with Impact Simulation against real execution data. You deploy without touching your codebase.
Every decision leaves a full audit trace.
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 --debug \
--json '{"facts":{"loyaltyTier":"PLATINUM","purchaseSubtotalUs2eb7efcdf45bOBSERVED · 2026-10-11Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add cli --env LEXQ_API_KEY=${LEXQ_API_KEY} -- npx -y @lexq/[email protected] serveExposed tools (77)
43 read · 29 write · 5 destructive. Blast radius: 5 tools can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
lexq_ab_test_adjust | read | |
lexq_ab_test_start | write | |
lexq_ab_test_stop | write | |
lexq_dataset_template | read | |
lexq_dataset_upload | write | |
lexq_deploy_deployable | write | |
lexq_deploy_detail | write | |
lexq_deploy_diff | write | |
lexq_deploy_history | write | |
lexq_deploy_live | write | |
lexq_deploy_overview | write | |
lexq_deploy_publish | write | |
lexq_deploy_rollback | write | |
lexq_deploy_schedule | write | |
lexq_deploy_schedules | write | |
lexq_deploy_undeploy | write | |
lexq_deploy_unschedule | write | |
lexq_domain_templates_apply | write | |
lexq_domain_templates_list | read | |
lexq_domain_templates_preview | read | |
lexq_dry_run | write | |
lexq_dry_run_compare | write | |
lexq_facts_action_metadata | read | |
lexq_facts_create | write | |
lexq_facts_delete | destructive | |
lexq_facts_export | read | |
lexq_facts_list | read | |
lexq_facts_unregistered | read | |
lexq_facts_update | write | |
lexq_groups_create | write | |
lexq_groups_delete | destructive | |
lexq_groups_get | read | |
lexq_groups_list | read | |
lexq_groups_reorder | read | |
lexq_groups_update | write | |
lexq_history_get | read | |
lexq_history_list | read | |
lexq_history_stats | read | |
lexq_logs_action | read | |
lexq_logs_bulk_action | read | |
lexq_logs_get | read | |
lexq_logs_list | read | |
lexq_pii_reveals_list | read | |
lexq_profile_overview | read | |
lexq_profile_rule | read | |
lexq_provenance_get | read | |
lexq_replay_cancel | read | |
lexq_replay_decision | read | |
lexq_replay_export | read | |
lexq_replay_list | read | |
lexq_replay_start | write | |
lexq_replay_status | read | |
lexq_requirements | read | |
lexq_rules_create | write | |
lexq_rules_delete | destructive | |
lexq_rules_get | read | |
lexq_rules_list | read | |
lexq_rules_reorder | read | |
lexq_rules_toggle | read | |
lexq_rules_update | write | |
lexq_simulation_cancel | read | |
lexq_simulation_export | read | |
lexq_simulation_list | read | |
lexq_simulation_start | write | |
lexq_simulation_status | read | |
lexq_versions_clone | read | |
lexq_versions_create | write | |
lexq_versions_delete | destructive | |
lexq_versions_get | read | |
lexq_versions_list | read | |
lexq_versions_update | write | |
lexq_webhook_subscriptions_delete | destructive | |
lexq_webhook_subscriptions_get | read | |
lexq_webhook_subscriptions_list | read | |
lexq_webhook_subscriptions_save | write | |
lexq_webhook_subscriptions_test | read | |
lexq_whoami | read |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- declared (4 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (4)
lexq_facts_delete, lexq_groups_delete, lexq_rules_delete, lexq_versions_delete, lexq_webhook_subscriptions_delete
.prettierignore
const baseUrl = `http://127.0.0.1:${port}/`;@modelcontextprotocol/server, cli-table3, commander, dedent, zod, @eslint/js, @modelcontextprotocol/client, @types/node
Gates applied: no_behavioural_pass.
2eb7efcdf45bfull audit observations/trust-audit/mcp-server/lexq-io__lexq-cli.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-11 | 2eb7efcdf45b | SAFE | B | 89 | first audit |
Questions
What is the lexq-cli MCP server?
The Decision Operations Platform for engineering teams. CLI and MCP server for LexQ
What tools does lexq-cli expose?
77 in total: 43 read-only, 29 that write, and 5 that can delete or overwrite (lexq_facts_delete, lexq_groups_delete, lexq_rules_delete, lexq_versions_delete, lexq_webhook_subscriptions_delete). Every one is listed on this page with its risk.
Is lexq-cli safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B. Separately from the audit: 5 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does lexq-cli need?
It reads LEXQ_API_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does lexq-cli run?
It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on npm as @lexq/cli at 1.1.2.
How current is this page?
The grade is for one exact copy of the source (2eb7efcdf45b), read on 2026-10-11. The repository is watched and re-audited when it changes.