Skip to main content
Glama

LexPact MCP Server

Exposes the LexPact contract generation API to Claude Desktop (or any MCP client) as three tools: list_contract_templates, generate_contract, get_contract. Thin proxy only — all validation and generation happens server-side at https://lexpact.co.uk/api/v1, so structured, LLM-actionable error messages reach Claude unchanged.

Setup

  1. Get an API key at lexpact.co.uk/dashboard/api-keys.

  2. Install dependencies:

    cd mcp-server
    npm install
  3. Add to your Claude Desktop config (claude_desktop_config.json — Settings → Developer → Edit Config):

    {
      "mcpServers": {
        "lexpact": {
          "command": "node",
          "args": ["/absolute/path/to/mcp-server/index.js"],
          "env": {
            "LEXPACT_API_KEY": "lp_live_your_key_here"
          }
        }
      }
    }
  4. Restart Claude Desktop. Ask it to draft a contract — it will call list_contract_templates and generate_contract as needed.

Related MCP server: cfr-compliance-mcp

Environment variables

Var

Required

Purpose

LEXPACT_API_KEY

Yes

Your LexPact API key.

LEXPACT_API_BASE_URL

No

Override the API base URL (defaults to https://lexpact.co.uk/api/v1) — useful for testing against a local dev server.

Manual test

LEXPACT_API_KEY=lp_live_... node index.js

Then connect any MCP client (e.g. the MCP Inspector: npx @modelcontextprotocol/inspector node index.js).

Available Tools

3 tools
generate_contractGenerate a contractA

Generate a UK jurisdiction-aware contract (nda, service_agreement, freelance_agreement, recruiter_terms_of_business, or ir35_agreement). Collect all required fields through conversation before calling — never invent party names, addresses, dates, or amounts. On a validation error, read error.suggestion in the response and fix the request yourself.

NameRequiredDescriptionDefault
feeNoRecruitment fee terms — recruiter_terms_of_business only.
partiesYesExactly two parties, in order: party_a first, then party_b.
paymentNoPayment terms — shape depends on contract_type (service_agreement/freelance_agreement/ir35_agreement). Call list_contract_templates for the exact fields.
nda_typeNonda only.
custom_termsNoOptional free-text extension, e.g. { additional_clauses: "..." }.
deliverablesNoservice_agreement only — required for that type.
ip_ownershipNoservice_agreement only.
jurisdictionYesGoverning jurisdiction.
contract_typeYesWhich contract to generate. Call list_contract_templates if unsure which fields each type needs.
output_formatNoDefault markdown. pdf returns a 1-hour signed download URL instead.
scope_of_workYesPlain-English description of what this contract covers.
effective_dateYesContract start date, YYYY-MM-DD.
duration_monthsNonda only.
jurisdiction_otherNoRequired only when jurisdiction is INTERNATIONAL.
kill_fee_percentageNofreelance_agreement only.
substitution_clauseNoir35_agreement only.

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full burden. It usefully discloses that requests can fail validation and that error.suggestion should be honored, and it forbids fabricating party data. But it omits key behavioral facts: whether the contract is persisted and retrievable via get_contract, whether generation is idempotent, the cost or latency, and any auth or rate-limit expectations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each carrying distinct load: what is generated, what must be collected before calling, and how to recover from validation failure. It is front-loaded with the tool purpose and contains no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 16-parameter tool with nested objects, five enums, and no annotations or output schema, the description covers purpose, a data-fabrication prohibition, and error handling, but leaves the return value undocumented (though the schema notes pdf returns a 1-hour signed URL) and says nothing about persistence or follow-up retrieval. It is adequate but not complete for a tool of this complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the schema already documents conditional fields such as nda_type, deliverables, and fee, so the baseline is 3. The description adds only marginal meaning: the type enumeration is repeated and 'never invent party names, addresses, dates, or amounts' implies that certain fields must be sourced from the user rather than inferred, but no field-level format or dependency detail is added.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Generate a ... contract') and enumerates all five supported contract types, so the agent knows precisely what this tool produces. It does not explicitly name the siblings list_contract_templates or get_contract, so the distinction from them is only implied by the verb.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a firm precondition ('Collect all required fields through conversation before calling — never invent party names, addresses, dates, or amounts') and an error-recovery rule, which are genuinely useful usage constraints. However, it never says when to use this tool versus list_contract_templates or get_contract, leaving alternative routing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_contractGet a previously generated contractA

Retrieve a contract by id. Returns status "processing" while generation is still running (call again in about 30 seconds) and "completed" with the contract once done. content_markdown is always populated regardless of the original output_format — PDF URLs are only returned once, inline, by generate_contract.

NameRequiredDescriptionDefault
idYesThe contract id returned by generate_contract.

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden and does real work: it discloses the asynchronous polling pattern, the two status values, and a non-obvious gotcha that PDF URLs are one-shot artifacts from generate_contract and are not re-retrievable here. That last point is exactly the kind of trap an agent would otherwise fall into. It omits error/not-found behavior and any permission or retention notes, which keeps it off a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences, front-loaded with the verb and resource before the polling detail and the PDF caveat. No filler, no restatement of the title, and each sentence contributes a distinct fact.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description must explain return values, and it does: status values, content_markdown always populated, and the absence of PDF URLs. That covers what an agent needs to interpret the response. The remaining gap is failure behavior for an invalid or expired id, which is minor but not nothing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for the single parameter, and the schema already says the id is the one 'returned by generate_contract.' The description's 'by id' restates that rather than adding format, prefix, or validity detail. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Retrieve a contract by id.' It also draws the boundary against the sibling generate_contract by noting that PDF URLs are produced inline there and not here, so an agent can tell the read path from the write path without opening either schema. It stops short of naming list_contract_templates, so the sibling differentiation is partial rather than exhaustive.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete usage context: this is the follow-up call to generate_contract, and while status is 'processing' the caller should poll again in about 30 seconds. That is actionable invocation guidance. It offers no when-not guidance (e.g., what to do on an unknown or expired id, or how long to keep polling), so it is clear context without exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_contract_templatesList LexPact contract templatesA

List the 5 contract types LexPact can generate, their required/optional fields, and party role labels. Call this first if you don't already know the field requirements for a contract_type.

NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries the full burden, and it does disclose the returned content shape (contract types, field requirements, role labels) in place of a missing output schema. The word "List" implies a non-mutating enumeration, but read-only safety, determinism, and whether the result is static or configurable are not stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with zero filler: the first states what is returned, the second states when to call it. The ordering is front-loaded with the payload description and ends on the actionable call-first rule.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description compensates by enumerating the three things the response contains, which is exactly what an agent needs to decide whether calling this resolves its unknown field requirements. For a zero-parameter discovery tool, nothing material is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, which is the baseline case where no parameter explanation is required. Nothing in the description conflicts with the empty schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

"List the 5 contract types LexPact can generate" gives a specific verb and resource, and it goes further by naming what each entry contains (required/optional fields, party role labels). This is unambiguously distinct from the siblings generate_contract and get_contract, which act on contracts rather than enumerating templates.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The clause "Call this first if you don't already know the field requirements for a contract_type" gives explicit sequencing and a clear triggering condition, which is the main routing decision an agent faces here. It does not explicitly contrast with the sibling tools, so it stops short of full alternative routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv1.0.0
    • First observedgenerate_contract
    • First observedget_contract
    • First observedlist_contract_templates

TDQS

A3.9/5.0

Scored across 3 tools

Disambiguation5/5

Each tool targets a distinct phase of the lifecycle: discovery (list_contract_templates), creation (generate_contract), and retrieval (get_contract). The descriptions explicitly sequence them ('call this first', 'retrieve by id'), leaving no plausible misselection.

Naming Consistency5/5

All three tools follow a strict verb_noun snake_case pattern (list_/generate_/get_ + contract object). Terminology is stable across names and descriptions.

Tool Count4/5

Three tools is on the lean side, but each covers a necessary step and the server's scope is deliberately narrow (contract generation only). No tool feels redundant or padded.

Completeness3/5

The create-and-poll workflow is covered, but there is no way to list existing contracts, re-fetch a PDF URL after the initial generate response, or update/cancel a contract. Agents that lose the generate response or need an inventory are left with dead ends.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    B
    maintenance
    A production-quality MCP server that exposes the official eCFR API as structured tools for AI-driven contract compliance, enabling retrieval of relevant Code of Federal Regulations by clauses extracted from contracts.
    8
    -
  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables MCP clients to search and retrieve contract intelligence over public contract data, with agent skills for precedent lookup, negotiation checks, and risk flagging, all with verification and citations.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to create and manage contract templates, draft agreements by filling in template variables and signers, send documents out for legally binding e-signature, and track signer status as signatures come in. It runs as a hosted remote server, so there is nothing to install or self-host.
    MIT