Legito MCP Server

Connect your favourite AI assistant (Claude, ChatGPT, Cursor, …) directly to your Legito workspace and let it work with your documents, object records, templates, and agents in natural language.


Table of Contents

  1. What is MCP?
  2. Endpoint
  3. Authentication
  4. Client Configuration
  5. Available Tools

1. What is MCP?

The Model Context Protocol (MCP) is an open standard, originally introduced by Anthropic, that lets AI assistants connect to external systems through a uniform interface. Instead of manually copying data between Legito and your AI assistant, the assistant can read from and act on your Legito workspace on its own.

You can think of MCP as a universal adapter for AI tools:

In practice this means you can ask your AI assistant things like:

…and the assistant will use the Legito MCP server to actually do it.


2. Endpoint

The Legito MCP server is exposed over HTTP using the Streamable HTTP transport.

URL
MCP endpoint https://<your-legito-host>/mcp
EMEA https://emea.legito.com/mcp
US https://us.legito.com/mcp
APAC https://apac.legito.com/mcp

Replace <your-legito-host> with the hostname of your Legito instance (e.g. your custom domain or regional deployment). All other endpoints (OAuth, discovery) live on the same host and are configured automatically by your MCP client.


3. Authentication

Authentication uses OAuth 2.1 with PKCE — the same standard used by major SaaS platforms. You do not need to copy API keys, generate tokens manually, or share your password with the AI client.

How a connection is established

  1. You add Legito to your MCP client by entering the MCP URL above.
  2. The client opens a Legito sign-in page in your browser.
  3. You log in with your normal Legito credentials (including SSO / 2FA if configured) and pick the workspace the assistant should use.
  4. Legito issues a short-lived access token to the client and a refresh token that lets it stay connected without re-prompting you.
  5. From this point on, every action the assistant performs is executed under your user identity, in the workspace you selected.

Security principles

The first time a new client connects, it registers itself automatically (dynamic client registration) — no manual app registration in Legito is required.


4. Client Configuration

Most MCP-capable clients let you add a remote MCP server by URL. The common parameters are:

Below are working configurations for the most popular clients. Where a client offers both UI-based and config-file setup, the UI route is the simplest.

Claude Desktop / Claude.ai

Claude.ai (web) — go to Settings → Connectors → Add custom connector:

Click Connect, log in to Legito in the popup, and the connector becomes available in any new chat.

Claude Desktop (macOS / Windows) — open Settings → Connectors → Add custom connector and enter the same URL. Restart Claude Desktop if the tools don't appear immediately.

Claude Code

Claude Code is Anthropic's CLI assistant. Add Legito as an MCP server with a single command:

claude mcp add --transport http legito https://<your-legito-host>/mcp

By default the server is added to the current project (local scope). To make it available across all your projects, add --scope user:

claude mcp add --transport http --scope user legito https://<your-legito-host>/mcp

The first time you use the server, run /mcp inside Claude Code and choose Authenticate for legito — Claude Code opens your browser to log in to Legito. You can verify the connection at any time with claude mcp list.

ChatGPT

ChatGPT supports remote MCP servers as custom connectors (available to Pro/Plus users, via SSE or streaming HTTP).

Open Settings → Apps & Connectors → Advanced settings → Developer Mode and toggle it on, then go back to Settings → Apps & Connectors → Create:

After saving, ChatGPT opens your browser to log in to Legito. Once connected, enable the Legito connector from the tools menu (+ icon) at the start of a conversation to make its tools available to the model.

Cursor

Open Settings → Cursor Settings → MCP → Add new MCP Server and use the JSON form:

{
  "mcpServers": {
    "legito": {
      "type": "http",
      "url": "https://<your-legito-host>/mcp"
    }
  }
}

Cursor will open your browser for OAuth login the first time the server is used.

VS Code (GitHub Copilot Chat)

Add an entry to .vscode/mcp.json in your workspace (or the global MCP settings):

{
  "servers": {
    "legito": {
      "type": "http",
      "url": "https://<your-legito-host>/mcp"
    }
  }
}

Then enable the server from the MCP: List Servers command. VS Code handles the OAuth flow automatically.

Windsurf

In Windsurf, open Settings → MCP Servers → Add Server:

{
  "mcpServers": {
    "legito": {
      "serverUrl": "https://<your-legito-host>/mcp"
    }
  }
}

Other clients

Any MCP client that supports the Streamable HTTP transport with OAuth 2.1 can connect to Legito. The minimum configuration is the URL https://<your-legito-host>/mcp; the client will discover OAuth metadata automatically from /.well-known/oauth-authorization-server and /.well-known/oauth-protected-resource.


5. Available Tools

Once connected, your AI assistant gets access to the following tools. You don't normally need to call them by name — the assistant picks the right ones based on what you ask. The list below describes what each tool does, in the order they will typically be used in real conversations.

Documents

get_documents

Search and list documents in your workspace. Supports filtering by time period (last week / month / year, or custom date range), workflow stage (Draft, Signed, …), full-text search (document names, party names, signatory emails), template, labels, assignee, and many system or custom property values (total value, signing/expiration/payment/delivery dates, last modified, priority, etc.).

get_document_record_properties

Show the current properties of a specific document — system properties (dates, total value, party names and emails), the document name, and any custom text properties defined in your workspace.

update_document_record_property

Update a property on an existing document — system fields (document name, signing/payment/delivery/expiration date, total value, party names and emails) or custom text/textarea properties. The assistant always shows you the current value and asks for confirmation before changing it.

Return a direct link that opens a document in the Legito Document Editor.

download_document

Get download links for a document in all available formats (PDF, DOCX, etc.) including any attachments.

archive_document

Soft-delete (archive) a document. The document is moved to the archive and can be restored later. The assistant always asks for confirmation first.

delete_document_record

Permanently delete a document record. The assistant always asks for confirmation first.

share_document

Share a document with a user or user group at one of the standard Legito permission levels: LIST (view in list only), READ (view content), COMMENT (add comments), EDIT (edit content), or MANAGE (full control including re-sharing).

change_document_owner

Change the owner of a document record. The assistant always asks for confirmation before applying the change.

change_document_workflow_stage

Move a document to a different workflow stage (e.g. Draft → In Review → Signed). The assistant first checks which transitions are available for that document and asks for confirmation before applying the change, since stage changes are permanent and may trigger notifications.

get_document_workflow_stages

Show the current workflow stage of a document and the stages it can be moved to next.

Object Records

get_objects

List all available object types in the workspace (e.g. Companies, Contacts, Projects) with their IDs. Used before creating or filtering object records to look up the object type ID by name.

get_object_records

Search and list object records in your workspace. Supports filtering by object type, full-text search (across property values), workflow stage, owner, date range (created/modified), and custom property values.

create_object_record

Create a new object record of a given object type. If only one object type exists, the assistant uses it automatically; if multiple types exist and the user didn't specify which one, the assistant asks first.

archive_object_record

Archive (soft-delete) an object record. The record is moved to the archive and can be restored later. The assistant always asks for confirmation first.

get_object_record_properties

Show the current property values of a specific object record, including property IDs needed for updating values.

update_object_record_property

Update a property on an object record. Object records use custom properties identified by numeric property ID (not system property names like documents). The assistant always calls get_object_record_properties first to discover the property ID, shows the current value, and asks for confirmation before changing it.

get_object_properties

List all custom property definitions (and their available choice values) for object records in the workspace, optionally filtered by object type.

share_object_record

Share an object record with a user or user group at one of the permission levels: view, edit, or manage.

change_object_record_owner

Change the owner of an object record. The assistant always asks for confirmation before applying the change.

change_object_record_workflow_stage

Move an object record to a different workflow stage. The assistant first checks which transitions are available and asks for confirmation before applying the change.

get_object_record_workflow_stages

Show the current workflow stage of an object record and the stages it can be moved to next.

Templates

get_template_suites

List the document templates (Template Suites) available in your workspace, optionally filtered by name. Used as a starting point when creating a new document.

get_template_suite_elements

List the fillable fields of a template — system names, descriptions, types (text, number, date, select, …), and available choices for select fields. Repeatable sections are detected automatically.

create_document

Create a new document from a template, pre-filling any fields you provided. Supports repeatable sections (e.g. multiple signatories). Returns a ready-to-open link to the new document so you can finish filling it in the Legito editor.

create_template_from_docx

Create a new Template Suite by uploading a .docx file. The file is imported in the background and opens in the Template Editor, ready to be turned into a smart template. Available in clients that support file uploads to MCP servers.

Workspace metadata

get_users

Search workspace users by name or email. Used to resolve a person's name to an ID before sharing a document or object record, or filtering by assignee/owner.

get_user_groups

List workspace user groups by name. Used to resolve a group name to an ID before sharing.

get_document_labels

List all labels (tags) defined in the workspace. Used before filtering documents by label.

get_document_properties

List all custom property definitions (and their available choice values) for documents in the workspace.

get_currencies

List all available currencies with their IDs. Used before setting currency-typed properties (custom currency or system total value).

Events & Analytics

get_event_types

List all available event types (document generated, downloaded, signed, etc.) with their values. Used before querying event counts.

get_event_count

Query event counts and activity statistics — how many times something happened, optionally filtered by event type, date range, or user.

AI Agents

AI Agents are reusable instructions that the assistant runs on demand or on a schedule (e.g. "every morning at 9 AM, summarise documents created yesterday").

get_agents

List the AI agents you have configured, including their prompts, schedule, and last/next run times.

create_agent

Create a new AI agent with a name, prompt (the task), and a frequency: manual, 15m, 1h, 6h, daily, or weekly. Daily and weekly agents can have a preferred time-of-day.

update_agent

Update an existing agent — name, prompt, frequency, preferred time, or enabled/disabled status.

delete_agent

Delete an agent and its full run history. Irreversible — the assistant always asks for confirmation.

run_agent

Trigger an immediate run of an agent and return its output, regardless of its normal schedule.

Knowledge base

search_knowledge_base

Search Legito's public documentation (how-to guides, glossary, feature descriptions). Used when you ask the assistant how something works in Legito, not just what exists in your workspace. Returns excerpts with links to the full articles.


If your MCP client supports it, hover over a tool name in the conversation to see its full schema and parameters — they are auto-generated and always reflect the current capabilities of your Legito instance.