Connect agents with MCP

Beta

This feature is in beta. For now it is available only to some users. We will release it gradually to more accounts once testing ends. If you want to use it, ask your JAAK contact for access.

Description

The JAAK MCP server lets an AI agent use Electronic Signature and KYC validations on behalf of your company. The agent connects with MCP (Model Context Protocol) and loads only the tools of the toolset you choose.

There are two ways to log in:

  • API key: an administrator creates the key in the JAAK Platform and the agent sends it with every request.
  • Google login: the person signs in with their Google account and JAAK issues a temporary access for that person's user and company.

Server address

In this guide, https://<host-mcp> is the address of the JAAK MCP server for your environment. Your JAAK contact gives it to you. Each environment (production and sandbox) has its own address.

Toolsets

Each toolset has its own URL. Connect the agent only to the toolsets it needs. It loads fewer tools and the key can have fewer scopes.

URLToolsScope needed
https://<host-mcp>/mcp/signa-templatessigna_list_templates, signa_get_template, signa_create_template_from_markdownsigna:templates:read to read, signa:templates:write to create
https://<host-mcp>/mcp/signa-sendsigna_send_template, signa_create_submission, signa_add_signer, signa_send_for_signaturesigna:send
https://<host-mcp>/mcp/signa-trackingsigna_get_submission_status, signa_list_submissions, signa_download_signed_docsigna:read
https://<host-mcp>/mcp/kyckyc_validate_curp, kyc_validate_rfckyc:validate
https://<host-mcp>/mcpEvery toolThe scope of each tool

The tool list (tools/list) shows only the tools that the scopes of the key allow. If the agent calls a tool it cannot see, the server answers a missing scope <scope> error.

Scopes

ScopeWhat it allows
signa:templates:readSee the signing templates of the company
signa:templates:writeCreate, change and delete templates
signa:sendCreate signature requests, add signers, send, resend and cancel
signa:readRead the status of requests, download signed documents and see the audit trail
kyc:validateValidate CURP and RFC

Each key and each login acts as the user and company it belongs to. It never sees data of another company.

Connect with an API key

1. Create the key

Only users with the role Owner, Administrator or Manager can create keys.

  1. Log in to the JAAK Platform.
  2. Go to Ajustes (Settings) and open API keys.
  3. Create a new key: type a name, choose the scopes and the expiry (1 to 365 days).
  4. Copy the key and store it. It is shown only once.

Give each key only the scopes the agent needs. To revoke a key, use the revoke action in the same list. The key stops working at once on the server that revokes it and within one minute on the others.

2. Configure the client

The agent sends the key in the Authorization header:

Authorization: ApiKey <your-key>

Authorization: Bearer <your-key> is also accepted.

Claude Code:

claude mcp add --transport http jaak-signa-send https://<host-mcp>/mcp/signa-send \
  --header "Authorization: ApiKey <your-key>"

Generic MCP configuration (the client JSON file):

{
  "mcpServers": {
    "jaak-signa-send": {
      "type": "http",
      "url": "https://<host-mcp>/mcp/signa-send",
      "headers": {
        "Authorization": "ApiKey ${JAAK_MCP_KEY}"
      }
    },
    "jaak-signa-tracking": {
      "type": "http",
      "url": "https://<host-mcp>/mcp/signa-tracking",
      "headers": {
        "Authorization": "ApiKey ${JAAK_MCP_KEY}"
      }
    }
  }
}

Keep the key in an environment variable (JAAK_MCP_KEY). Do not write it in files that go to a repository.

Connect with Google login

With this method you do not copy any key. The MCP client must support OAuth 2.1, as Claude Code does.

  1. Add the server without an authorization header:

    claude mcp add --transport http jaak-signa-tracking https://<host-mcp>/mcp/signa-tracking
    
  2. In Claude Code, run /mcp, choose the server and select Authenticate.

  3. The browser opens the Continuar con Google (Continue with Google) screen. Sign in with the Google account of your JAAK user.

  4. JAAK shows an approval screen with the application name and the scopes it asks for. Click Aprobar (Approve).

  5. The browser returns to the client and the connection is ready.

How it works:

  • The Google account must match an existing JAAK user. JAAK does not create users. If there is none, the screen shows a clear error.
  • The agent receives the scopes your role allows, reduced to the ones the application asked for. The roles Owner, Administrator and Manager can grant all five scopes. Other roles receive only signa:templates:read and signa:read.
  • The access lasts 1 hour and the client renews it by itself. The whole session lasts 30 days. After that, log in again.
  • If your user is suspended or deleted, or your company is suspended, the client cannot renew the access.
  • Each login appears in the API keys list with the name Google: <application>. An administrator can revoke it there.

Create a template with tags

The signa_create_template_from_markdown tool creates a template from a Markdown text with these tags:

TagWhat it does
{{key}}A data value filled in when you send. Example: {{empresa.razon_social}}.
{{key|fecha}}A date value. It is sent as an ISO date (YYYY-MM-DD) and the document shows it in Spanish, for example 21 de noviembre de 2026.
{{firma:ROLE}}A signature box for the signer with that role. Example: {{firma:EL CLIENTE}}.

Rules:

  • The key uses lowercase letters, digits, underscores and dots, and starts with a letter. A key can repeat in the document. You send one value and it fills every place.
  • fecha is the only filter.
  • The ROLE is text without { or }, 1 to 60 characters. A role can repeat.
  • The template needs at least one {{firma:ROLE}} tag.
  • Any other tag form is rejected when the template is saved.

Example:

# Services contract

Between {{empresa.razon_social}} and {{cliente.nombre}} (RFC {{cliente.rfc}}),
signed on {{contrato.fecha|fecha}}.

{{firma:EL PRESTADOR}}

{{firma:EL CLIENTE}}

After you create the template, send it with signa_send_template. Give the templateId, the values in templateValues (one entry per key, for example {"empresa.razon_social": "Acme SA"}) and the signers in submitters. The role of each signer must match a {{firma:ROLE}} tag. If the value of a key is missing, the server answers with an error that names the key.

Errors

ResponseMeaningWhat to do
401The key is missing, invalid, expired or revoked. The WWW-Authenticate header says where to start the Google login.Check the key or create a new one. With OAuth, authenticate again.
403 with missing scope <scope>The key does not have the scope that the tool needs.Create a key with that scope, or connect to the toolset that matches.
403 with route not allowed for MCP API keysThe tool tried an operation that MCP keys do not allow.Use one of the tools in the list of this guide.
503 with MCP API key could not be verifiedJAAK could not verify the key at that moment.Try again in a few minutes.

The tools return server errors as a tool error result, with the same text.