Documentation

Lexnus MCP Server

Lexnus is legal policy infrastructure. The Lexnus MCP server exposes that policy layer to AI clients over the Model Context Protocol, so an assistant can draft a contract from your approved clauses, analyse a counterparty draft against your playbook, and send a reviewed contract for signature — all inside your Lexnus account, under your token, and against your rules.

At a glance

Server URLhttps://app.lexnus.com/mcp
TransportStreamable HTTP. Stateless — every call is authenticated independently.
ProtocolModel Context Protocol. Server identifies as lexnous, version 1.0.0.
AuthenticationOAuth 2.1 authorisation code flow, or a personal access token issued in Lexnus.
Scopeslexnous:read, lexnous:write, enforced on personal access tokens. An OAuth token carries the user's own authority, bounded by their Lexnus role. See Authentication and scopes.
Tools23. Twelve read, eleven write. Full list below.
Tool manifestGET https://app.lexnus.com/mcp/tools returns JSON Schema for every tool.
Data reachableOnly the account the token belongs to. Never another customer's data.
Outbound emailOnly for e-signature, and only after the human ticks a server-issued confirmation box.
AuditEvery write is recorded to an append-only log: actor, account, workspace, entity, operation, and before-and-after changes, stamped with the MCP channel. Reads emit a tracing span rather than an audit row.
HostingEU only. Clever Cloud, France. Backups replicated to OVHcloud, Germany.
OperatorPrecisely (Lexnus). Sweden.

The server URL is also shown inside the product, under Integrations → Connect via MCP. Copy it from there if your account runs on a different host.

What the server does

Lexnus holds three things for an organisation: a clause library of approved language, playbooks that define which clauses belong in which contract type, and rules that decide whether a given contract complies. The MCP server lets an AI client use all three.

There are four workflows.

1

Draft a new contract

The client maps a plain-language request ("I need an NDA for a Swedish supplier") to a published playbook, opens an assembly session, and answers the playbook's fields one at a time. Lexnus renders the document server-side from approved clauses. The model never writes the final legal text — it collects field values and Lexnus does the substitution.

2

Analyse a contract

The client passes a contract into Lexnus, which runs it against the matching playbook and returns a verdict per rule: compliant, violated, gap, or needs review. Each finding carries the rule that fired, the excerpt that triggered it, the reason, a risk level, and whether the rule blocks signature. The judgement is made by Lexnus's rule engine, not by the model.

3

Handle a counterparty revision

When a redline comes back, the client adds it as a new version of the existing contract. Lexnus parses tracked changes, diffs clauses and field values against the last generated version, and re-runs analysis. It reports untracked changes separately — edits made with revision tracking switched off.

4

Send for signature

Once analysis is clean, the client can send the contract through the account's connected e-signature provider and track its status. This is the only tool group that reaches outside Lexnus, and it is the most heavily gated. See Security model.

Connecting a client

Any MCP-compatible client can connect. Three setups cover most cases.

Claude.ai, ChatGPT, and other hosted clients

Add a custom connector pointing at the server URL. The client discovers the OAuth endpoints, registers itself, and opens a browser window where the user signs in to Lexnus and approves the connection. No token is copied by hand. Read the scope note below before treating that consent screen as a restriction.

https://app.lexnus.com/mcp

Claude Desktop, Cursor, VS Code

These clients can use the same OAuth flow. To use a personal access token instead, create one in Lexnus under Account Settings → Developers, then add this to the client's MCP configuration:

{ "mcpServers": { "lexnous": { "type": "http", "url": "https://app.lexnus.com/mcp", "headers": { "Authorization": "Bearer YOUR_TOKEN_HERE" } } } }

Scripts and CI

Use a personal access token. Scope it to lexnous:read unless the pipeline genuinely needs to write. OAuth is for interactive clients where a browser redirect is available.

Authentication and scopes

OAuth 2.1

An unauthenticated request returns 401 with a WWW-Authenticate header pointing at the discovery document. The client then follows the standard flow. Lexnus implements the relevant RFCs so no client-specific configuration is needed:

EndpointPurpose
GET /.well-known/oauth-authorization-serverAuthorisation server metadata (RFC 8414)
GET /.well-known/oauth-protected-resourceProtected resource metadata (RFC 9728)
POST /oauth/registerDynamic client registration (RFC 7591)
GET /oauth/authorizeAuthorisation endpoint — user signs in and consents here
POST /oauth/tokenToken endpoint

Access tokens expire after 15 minutes. Refresh tokens expire after 7 days. Clients refresh automatically. The consent screen names the scopes in plain language: "Read your contracts and playbooks" and "Create and modify contracts and playbooks".

Personal access tokens

A token is 24 bytes of cryptographic randomness, prefixed pat_. Lexnus stores only its SHA-256 hash — the raw value is shown once at creation and is never retrievable afterwards. Tokens carry an owner, an account, a scope set, and an optional expiry. New tokens default to lexnous:read. Creation, use, and revocation are all audited, and the token hash is deliberately excluded from the audit payload.

Scopes

ScopeGrants
lexnous:readRead contracts, clauses, playbooks, rules, obligations, analysis results, and signing status.
lexnous:writeCreate and modify contracts, run assembly, add versions, and operate the signing tools.

Scope is checked in-process at the top of every write tool, against the authenticated principal on the request — not in the tool description, and not in the client. A personal access token that lacks lexnous:write gets an error from every write tool, every time. New tokens default to lexnous:read.

Scopes constrain personal access tokens, not OAuth sessions. An OAuth access token is an ordinary Lexnus session token. It carries no scope claim, so the scope check treats it as holding the user's full authority, bounded by that user's Lexnus role rather than by the scope strings shown at consent. This is the same trust model the rest of the API applies to a signed-in browser session.

The practical consequence for a reviewer: ticking only the read scope on the OAuth consent screen does not produce a read-only connection. If you need a connection that cannot write, issue a personal access token scoped to lexnous:read and configure the client with that token. To bound an OAuth connection instead, bound the user — connect it as a Lexnus account whose role has only the access you are willing to grant.

Revocation

Revoke a personal access token from Account Settings → Developers. Revoke an OAuth grant from the connected-applications list. Revocation takes effect on the next call. Deactivating a user cuts off everything issued to them.

Tool reference

Twenty-three tools. Write means the tool enforces lexnous:write before it does anything.

Drafting

ToolScopeWhat it does
lexnus_resolve_playbookReadMaps a plain-language drafting intent to a published playbook, and returns the fields that need answering.
lexnus_get_playbook_clausesReadReturns the ordered clause structure of a playbook with placeholders intact.
lexnus_get_playbook_rulesReadReturns every policy rule for a playbook, with conditions and escalation type.
lexnus_check_rule_violationsReadValidates a collected field map against the playbook's rules before assembly.
lexnus_start_assemblyWriteOpens an assembly session for a playbook.
lexnus_get_required_fieldsReadReturns the fields still outstanding on a session.
lexnus_answer_session_fieldWriteStores one field answer on a session.
lexnus_generate_documentWriteFinalises the session and returns a link to the contract in Lexnus, or a single-use DOCX download valid for 15 minutes.

Analysis and review

ToolScopeWhat it does
lexnus_ingest_contractWritePersists a contract shared in chat and returns ranked playbook suggestions.
lexnus_analyse_documentReadRuns a structured playbook analysis on a contract already in Lexnus. Returns immediately; the client polls for the result.
lexnus_get_analysis_resultReadFetches verdicts, confidence scores, and remediation suggestions.
lexnus_get_analysis_findingsReadPer-rule detail: rule name, contract excerpt, reason, risk level, blocking status.
lexnus_answer_fieldWriteSubmits one field value for an imported contract awaiting field data.
lexnus_search_clause_libraryReadSearches the account's approved clause library by keyword and category.
lexnus_list_obligationsReadLists obligations across a workspace — payments, deliveries, notices, renewals.

Contracts and versions

ToolScopeWhat it does
lexnus_create_contractWriteCreates an empty contract record in a workspace.
lexnus_save_versionWriteSnapshots the contract as a new version, tagged as agent-initiated.
lexnus_upload_versionWriteAdds a counterparty revision as a new version. Parses tracked changes, diffs clauses and fields, queues re-analysis.

Signature

ToolScopeWhat it does
lexnus_get_signing_auth_methodsReadLists the identification methods the connected provider supports, including qualified electronic signatures under eIDAS.
lexnus_send_for_signatureWriteSends a reviewed contract for signature. Gated — see below.
lexnus_get_signing_statusReadReads overall and per-party signing status with timestamps.
lexnus_cancel_signing_requestWriteWithdraws an in-flight signing request. Gated.
lexnus_remind_signing_partiesWriteRe-sends the invitation to parties who have not signed. Gated.

Security model

The account boundary

Every call carries an authenticated principal: a user, an account, and a scope set. Tools resolve the account from that principal, never from a tool argument. A token cannot name a different account and be served its data. Workspace-scoped tools additionally check that the caller is a member of the workspace. Cross-account access is prevented by construction, and covered by tests.

The model cannot approve its own actions

Three tools reach a counterparty by email: sending for signature, cancelling a signing request, and reminding parties. All three are gated server-side, not by a convention written into the tool description.

On the first call, the tool returns before touching the signing provider. It hands back an input request that the client must put to the human, who ticks an explicit confirmation box. Only a retry carrying an accepted response gets past the gate. A client that ignores the request never reaches the provider. A client that cannot ask a human never reaches the provider. The model cannot satisfy the gate on its own, because the response is authored by the client's user interface rather than generated as tool arguments — and an empty form does not count as approval.

This matters for a specific risk: a contract is untrusted text. Text inside a document cannot cause Lexnus to email anyone, because no path to the provider exists that a human has not individually confirmed.

The signing gate is fail-closed

Sending a contract version that was never analysed fails with not_evaluated. Sending one with live blocking violations fails with sign_blocked. Recipient resolution runs as its own step: if the caller supplied no signatories, the server asks the user directly rather than accepting a recipient the model chose. Errors are not retryable states here — they mean the review is not finished.

Generation is server-side

The model does not author final contract text. It collects field values; Lexnus substitutes them into approved clauses and renders the document. Clause language comes from the customer's published library. This is the point of the integration: the model supplies language intelligence, Lexnus supplies policy authority.

Audit trail

Lexnus keeps one append-only audit log across the whole product, and MCP writes land in it alongside everything else. Rows are never updated or deleted, and there is no retention job that removes them. Each row carries the actor and the account, the workspace, the channel the action arrived through, the entity touched, the operation performed, a trace identifier that links the whole causal chain, and a payload holding the before-and-after changes.

Two limits worth knowing before you rely on this log:

  • Writes are audited; reads are not. Audit rows are emitted by the underlying services when they mutate data, so the eleven write tools produce them. A read tool emits a tracing span, not an audit row. If your requirement is a durable record of every read an AI client performed, this log does not meet it today.
  • Rows are not labelled with the individual tool. MCP actions are recorded with the channel mcp and the action kind mcp_tool, under a generic action name. The specific tool name is on the tracing span, which is operational telemetry rather than a retained audit record.

Contract versions written over MCP are separately marked at the record level: a version added by an AI client is stored with an agent-initiated flag and an agent source, so the contract's own version history distinguishes AI-made changes from human ones.

Because the channel is recorded, an administrator can separate what arrived over MCP from what someone did in the web application. Every tool call — read or write — emits a tracing span named for the tool, for operational review.

Rate limiting

MCP traffic is rate limited per account, separately from browser and direct API traffic. The default is 5 requests per second sustained with a burst of 20. A runaway agent is throttled at the account boundary and cannot degrade the service for anyone else.

Transport and storage

TLS in transit. AES-256 at rest. Contract files replicated to the backup region as sealed ciphertext. The MCP endpoint sits behind the same authentication middleware as the rest of the Lexnus API — an unauthenticated request never reaches the protocol layer.

Data handling and residency

Where Lexnus processes data

Lexnus runs on EU-sovereign infrastructure. There is no US CLOUD Act exposure. These are the sub-processors that handle customer content:

ServiceProviderLocation
Hosting, database, object storageClever CloudFrance
Encrypted replication and backupOVHcloudGermany
Transactional emailSweegoFrance / Netherlands
Monitoring and observabilityBetter StackCzech Republic
AI / LLM (default provider)Mistral AIFrance
Electronic signature (optional)ScriveEurope

Contract text sent to the default LLM provider is not used to train that provider's models. The full list, including optional sub-processors, is in the Data Processing Addendum.

Where your MCP client processes data

State this plainly, because it is the part reviewers most often miss. When you connect an AI client to Lexnus, contract text travels through that client. Claude, ChatGPT, or whatever you connect is your own arrangement with that vendor, under your contract with them — Lexnus is not their controller and does not appoint them as a sub-processor. Review that vendor on its own terms alongside this one.

Lexnus's obligations start at the server URL. Everything reached through a Lexnus tool call stays inside the infrastructure described above.

What the server does not do

  • It does not reach any account other than the token's.
  • It does not send email except through the e-signature provider, and only after human confirmation.
  • It does not return raw contract files to the client. Documents are returned as links into Lexnus, or as a single-use download valid for 15 minutes.
  • It does not write credentials to the audit log.
  • It does not accept an account or tenant identifier from the caller.

Limits and operations

Rate limit5 req/s sustained per account, burst 20 (MCP channel)
Access token lifetime15 minutes
Refresh token lifetime7 days
DOCX download linksSingle use, 15 minutes
Original-file attach linksSingle use, 7 days
AnalysisAsynchronous. Trigger, then poll for the result.
Session modelStateless. No server-side MCP session to hijack.

Analysis volume counts against the account's plan limits, the same as analyses run in the web application. Rate limits are configurable for enterprise accounts.

Reviewer checklist

If you are deciding whether to approve this server, these are the answers you are probably looking for.

Who can it reach? One account — the one the token belongs to. Account and workspace come from the authenticated principal, never from a tool argument.

Can it act without a human? It can read, draft, and analyse under a granted token. It cannot email a counterparty without a human ticking a confirmation box that the server itself issues.

Can we limit it to read-only? Yes, with a personal access token scoped to lexnous:read — all eleven write tools reject it. Not by unticking the write scope at OAuth consent, which does not restrict the resulting token.

Is there a record? For writes, yes — append-only, with actor, account, entity, operation, and before-and-after changes, stamped as MCP. Reads leave a tracing span, not an audit row.

Can we turn it off? Yes. Revoke the token or the OAuth grant in Lexnus. Effective on the next call.

Where does data go? EU only on the Lexnus side. Through your chosen AI client on the other side — review that vendor separately.

Who do we ask? security@lexnus.com for security review, DPAs, and sub-processor questions.

Frequently asked questions

Can an AI client using this server see another customer's contracts?

No. Every tool resolves the account from the authenticated token, not from a tool argument. There is no parameter a caller can set to reach a different account. Cross-account isolation is enforced in code and covered by tests.

Can the AI send a contract to a counterparty on its own?

No. Sending for signature, cancelling a signing request, and sending reminders are gated server-side. The first call returns without contacting the signing provider and asks the client to put an explicit confirmation to the user. Only a retry carrying an accepted response proceeds. A client that cannot ask a human never reaches the provider.

Can we grant read-only access?

Yes, by issuing a personal access token scoped to lexnous:read and configuring the client with it. Every write tool checks the scope on the authenticated principal before doing anything and returns an error if it is missing. Note that unticking the write scope on the OAuth consent screen does not achieve this: an OAuth access token is an ordinary session token with no scope claim, so it passes every scope check and is bounded by the user's Lexnus role instead. To restrict an OAuth connection, restrict the user it is connected as.

What is logged, and can we see it?

Every write: the actor, account, workspace, the entity touched, the operation, a trace identifier, and the before-and-after changes. Calls made over MCP are stamped with the MCP channel, so you can separate AI activity from web activity. The log is append-only — rows are never updated or deleted, and no retention job removes them. Two limits: read tools emit a tracing span rather than an audit row, so reads are not durably recorded; and rows carry a generic MCP action name rather than the individual tool, which appears only on the span. Contract versions added over MCP are separately flagged as agent-initiated in the version history.

Where is our contract data processed?

On the Lexnus side, in the EU: hosting in France, encrypted backups in Germany, default LLM processing in France. No US CLOUD Act exposure. On the client side, contract text travels through the AI vendor you connect, under your own contract with them. Review that vendor separately.

Is contract text used to train AI models?

Not by Lexnus, and not by the default LLM provider. Personal data is not provided for the purpose of training or improving that provider's models. Whether your own AI client trains on what passes through it is governed by your agreement with that vendor.

How do we revoke access?

Revoke the personal access token under Account Settings → Developers, or revoke the OAuth grant from the connected applications list. Revocation takes effect on the next call. Deactivating a user cuts off every token issued to them.

Does the AI write the contract text?

No. The model collects field values and drives the conversation. Lexnus substitutes those values into clauses from your approved library and renders the document server-side. The model does not author the final legal language, and analysis verdicts come from the rule engine, not from the model.

Which AI clients are supported?

Any client that speaks the Model Context Protocol. Claude.ai, Claude Desktop, ChatGPT, Cursor, and VS Code are tested. MCP is an open standard and the server is not exclusive to one AI provider. A JSON Schema manifest is also published at /mcp/tools for clients that mirror tools as function-calling definitions.

Security questions, DPAs, and sub-processor requests: security@lexnus.com.