Docs menu

Get started

Install LexLint in Claude Code

One plugin carries four skills and the server, on the desktop and in cloud sessions.

Two commands: add the marketplace, then install the plugin from it.

claude plugin marketplace add ungovr/lexlint
claude plugin install lexlint@lexlint

Install the plugin. It carries the whole client: four skills, /lexlint:lexlint that runs the loop and /lexlint:lexlint-key, /lexlint:lexlint-upload and /lexlint:lexlint-feedback beside it, and mcp.lexlint.io already configured. The bundle holds no executables: four skills, the merge script the loop runs with python3, and the schema, all of them readable before you run anything.

Restart your session afterwards. Plugins load at process start, and a /clear is not a restart. Then run /lexlint:lexlint in any repository, or just ask for a lint.

No key yet? Run /lexlint:lexlint-key: it hands you a sign-in link for a free one, takes the key you paste back, and puts it where your next session will read it: on Claude Code that is the env block of your user settings file, chmod 600, and never a file that gets committed. The plugin reads the value from UNGOVR_API_KEY at process start rather than holding a copy of its own, so the key is never written into the server registration, and a key exported into an already-running session is read by nothing.

On Claude Code for the web, install from the repository

A cloud session at https://claude.ai/code has no terminal to type the command into, and /plugin is one of the commands that only runs in the terminal. So the repository carries the install instead. Commit this as .claude/settings.json and every cloud session on that repository starts with LexLint already installed:

{ "extraKnownMarketplaces": { "lexlint": { "source": { "source": "github", "repo": "ungovr/lexlint" } } }, "enabledPlugins": { "lexlint@lexlint": true } }

Then open the cloud environment's network access and add mcp.lexlint.io to its allowed domains. This is the step to get right, because skipping it fails late rather than loudly: the default access tier reaches GitHub, which is why the marketplace fetch above succeeds, but it does not reach us, so the plugin installs cleanly and then every tool call cannot connect. A custom allowlist with this one host added is enough; opening the environment to any domain is not necessary.

Set UNGOVR_API_KEY as an environment variable on that same cloud environment. Each session copies those values into ordinary environment variables at startup, which is where the plugin's server configuration reads the key from. If it is missing, nothing breaks silently: check_access still answers and reports the key as absent, the law lookups answer up to a daily limit, and the tools that need a key refuse with the sign-in link and the steps attached to the refusal.

Committing a project .mcp.json works too, and registers the server on its own without the skills. Worth knowing that a cloud session cannot show the trust prompt a terminal session shows for project servers, so it loads them without asking. The same three settings apply to a session started from the desktop app or an IDE extension, which otherwise behave like the CLI.

Or the tools on their own, without the plugin

This registers the server and nothing else: no skills, and no lexlint.yml loop. Keep the single quotes: they leave ${UNGOVR_API_KEY:-} for Claude Code to fill in each time it connects, so the key is read from your environment and never written into the config. With no key yet the header goes out empty, which is enough to connect: the law lookups answer up to a daily limit, and check_access reports how many are left and names the ways to get a key.

claude mcp add --transport http -s user lexlint \ https://mcp.lexlint.io/mcp \ --header 'X-API-Key: ${UNGOVR_API_KEY:-}'

The header decides how the server treats you. With it, the server reads the header as your key, and while it is empty a tool that needs a key answers with the steps to get one. Registered with no X-API-Key header at all, which is also how a plugin installed from a directory connects, Claude Code signs in instead. The server lists its tools, and get_law and resolve_domain_jurisdiction answer without an account up to the same daily limit. A lint tool, or a lookup past that limit, answers that sign-in is needed: run /mcp, choose lexlint, sign in through ungovr.org, then run the step again.