Integrate with AI Agents using MCP

1

Introduction

DocuSeal provides an MCP server that allows AI agents and automation systems to interact with DocuSeal using the Model Context Protocol. With MCP, AI systems can:

  • Search document templates by name
  • Create new document templates from PDF files
  • Send documents for electronic signature
  • Search and track signed or pending documents

This enables AI-native document workflows where document signing is fully automated and driven by AI agents without manual intervention.

What is MCP

MCP (Model Context Protocol) is an open standard that allows AI systems to call tools exposed by external services. Instead of manually coding API integrations, AI agents can automatically discover the tools that DocuSeal exposes and use them directly in workflows.

This means an AI system connected to the DocuSeal MCP server can understand what actions are available, what parameters each action requires, and execute them on behalf of users.

MCP Endpoint

AI systems connect to the following endpoint to discover available tools and execute actions:

For self-hosted DocuSeal, replace docuseal.com with your own domain.

https://docuseal.com/mcp
2

Authentication

Authentication depends on the deployment type: self-hosted DocuSeal or DocuSeal Cloud.

Self-Hosted DocuSeal

Self-hosted installations authenticate using an MCP token. To create a token, go to Settings > MCP Server in your DocuSeal instance and click "New Token".

The token is included in the request header:

Authorization: Bearer YOUR_DOCUSEAL_MCP_TOKEN

DocuSeal Cloud

DocuSeal Cloud uses OAuth2 client credentials. To request credentials, contact the DocuSeal team at support@docuseal.com. Once approved, you will receive a client_id and client_secret.

Use these credentials to obtain an access token by sending a POST request to https://docuseal.com/oauth/token.

POST https://docuseal.com/oauth/token
{
  "grant_type": "client_credentials",
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET"
}

Requesting MCP Access

MCP access for DocuSeal Cloud must be requested. Contact the DocuSeal team at support@docuseal.com and provide:

  • Company or project name
  • Integration use case
  • Expected usage

Once approved, you will receive OAuth credentials to authenticate with the MCP endpoint.

3

Client Configuration

The DocuSeal MCP server works with any MCP-compatible client. Below are configuration examples for the most popular clients.

Claude Desktop / Cursor / VS Code

Add the following configuration to your MCP client settings file. Replace YOUR_DOCUSEAL_MCP_TOKEN with the token from your DocuSeal MCP Server settings page.

For self-hosted DocuSeal, replace docuseal.com with your own domain.

MCP Client Configuration
{
  "mcpServers": {
    "docuseal": {
      "type": "http",
      "url": "https://docuseal.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_DOCUSEAL_MCP_TOKEN"
      }
    }
  }
}
4

Available Tools

The DocuSeal MCP server exposes the following tools:

Tool Description
search_templates Search document templates by name.
create_template Create a template from a PDF. Provide a URL or base64-encoded file content.
send_documents Send a document template for signing to specified submitters.
search_documents Search signed or pending documents by submitter name, email, phone, or template name.

search_templates

Search document templates by name. Returns a list of matching templates with their IDs and names.

Parameters:

Name Type Required Description
q string Yes Search query to filter templates by name
limit integer No The number of templates to return (default 10, max 100)
Example Tool Call
{
  "name": "search_templates",
  "arguments": {
    "q": "NDA"
  }
}
Example Response
[
  {
    "id": 12,
    "name": "Non-Disclosure Agreement"
  },
  {
    "id": 8,
    "name": "NDA - Mutual"
  }
]

create_template

Create a new document template from a PDF file. You can provide either a URL to the file or base64-encoded file content. Signature and form fields are automatically detected.

Parameters:

Name Type Required Description
url string No* URL of the document file to upload
file string No* Base64-encoded file content
filename string No Filename with extension (required when using file)
name string No Template name (defaults to filename)

* Either url or file must be provided.

Example Tool Call
{
  "name": "create_template",
  "arguments": {
    "url": "https://example.com/contract.pdf",
    "name": "Sales Agreement"
  }
}
Example Response
{
  "id": 15,
  "name": "Sales Agreement",
  "edit_url": "https://docuseal.com/templates/15/edit"
}

send_documents

Send a document template for signing to specified submitters. Each submitter receives an email with a link to sign the document.

Parameters:

Name Type Required Description
template_id integer Yes Template identifier
submitters array Yes List of submitters (signers). Each submitter can have: email, name, phone
Example Tool Call
{
  "name": "send_documents",
  "arguments": {
    "template_id": 12,
    "submitters": [
      {
        "email": "john@example.com",
        "name": "John Doe"
      }
    ]
  }
}
Example Response
{
  "id": 42,
  "status": "pending"
}

search_documents

Search signed or pending documents by submitter name, email, phone, or template name. Returns a list of submissions with their status and submitter details.

Parameters:

Name Type Required Description
q string Yes Search by submitter name, email, phone, or template name
limit integer No The number of results to return (default 10, max 100)
Example Tool Call
{
  "name": "search_documents",
  "arguments": {
    "q": "john@example.com"
  }
}
Example Response
[
  {
    "id": 42,
    "template_name": "Non-Disclosure Agreement",
    "status": "completed",
    "submitters": [
      {
        "email": "john@example.com",
        "name": "John Doe",
        "status": "completed"
      }
    ],
    "documents_url": "https://docuseal.com/submissions/42"
  }
]
5

Error Responses

When a tool call fails, the response includes isError: true and a message describing the problem. Below are the possible error messages:

Tool Error Message Cause
create_template Provide either url or file Neither url nor file parameter was provided
send_documents Template not found The template_id does not match any template. Use search_templates to find the correct ID
send_documents Template has no fields The template has no form fields. Open the template in DocuSeal and add fields before sending
send_documents No valid submitters provided The submitters array is empty or contains no valid entries
6

Example AI Prompts

The following natural language prompts demonstrate how AI agents can use DocuSeal MCP tools:

  • "Find my NDA template and send it to john@example.com for signing."
  • "Create a new template from this PDF: https://example.com/contract.pdf"
  • "Send the sales agreement to jane@example.com and bob@example.com."
  • "Show me all pending documents sent to @acme.com."
  • "Check if the NDA sent to john@example.com has been signed."
7

Troubleshooting

Authentication errors

Verify that your MCP token or OAuth credentials are correct. For self-hosted DocuSeal, ensure the token was created in Settings > MCP Server. For DocuSeal Cloud, check that your OAuth access token has not expired.

Template not found

The template_id passed to send_documents must be a valid template ID. Use search_templates first to find the correct ID.

Template has no fields

A template must have at least one field (e.g., signature, text, date) before it can be sent for signing. Open the template in DocuSeal and add the required fields.

Connection issues with self-hosted DocuSeal

Make sure your DocuSeal instance is accessible from the MCP client. The MCP endpoint must be reachable over HTTPS at https://YOUR_DOMAIN/mcp.

8

Compatibility

The DocuSeal MCP server works with any MCP-compatible client, including:

  • Claude.ai
  • Claude Desktop
  • ChatGPT
  • Cursor
  • Windsurf
  • VS Code
  • Claude Code
  • Any other MCP-compatible AI agent or client

If you are building AI-powered systems that handle contracts, agreements, or any documents that require signatures, integrate the DocuSeal MCP server to automate your document signing workflows end to end.

Learn more:

REST API Reference