Skip to content

MCP server for AI agents

The Model Context Protocol (MCP) is how AI assistants such as Claude Code, Cursor, VS Code and Codex use outside tools. Doxtly runs an MCP server, so you can connect an assistant with an access key and ask it in plain words: “generate the NDA for Fjordline Ferries and send it to Kari Solberg to sign”, “which packages are still waiting for a signature?”, “find the last five submissions of the contact form”.

The agent works through the same API as your integrations, with the key’s permissions and nothing more. It sees only the tools the key allows, works only with your organization’s records, and everything it does appears in the app as the key’s work.

The server’s address is the API’s address followed by /mcp:

https://api.doxtly.com/mcp

The agent signs in with an access key. Most clients send one header, so the key and its secret go together as a bearer token, joined by a colon:

Authorization: Bearer <API key>:<API secret>

The X-Api-Key and X-Api-Secret headers work too, as on every other request.

When you create a key, the dialog that shows its secret also shows the server’s address and the configuration for Claude Code and Cursor, with the key filled in, ready to copy.

  1. Create a key in Organization → Access keys and tick the permissions for what the agent should do (see Tools). A key that may only read is a good start.
  2. Add the server to your client with one of the configurations below.
  3. Ask the agent what it can do in Doxtly. It answers from the list of tools the key allows.

Run once in a terminal:

Terminal window
claude mcp add --transport http doxtly https://api.doxtly.com/mcp \
--header "Authorization: Bearer $DOXTLY_API_KEY:$DOXTLY_API_SECRET"

Or, for a project, put the server in .mcp.json and keep the key in environment variables:

{
"mcpServers": {
"doxtly": {
"type": "http",
"url": "https://api.doxtly.com/mcp",
"headers": {
"X-Api-Key": "${DOXTLY_API_KEY}",
"X-Api-Secret": "${DOXTLY_API_SECRET}"
}
}
}
}

A sales manager at Northbridge asks Claude Code: “Send Kari Solberg from Fjordline Ferries our mutual NDA to sign, with a 14-day deadline.” With a key that may read templates and create, change and send packages, the agent:

  1. calls list_templates with search[name] set to NDA and finds the Mutual NDA template;
  2. calls get_template_fields to learn that the template needs partner.name;
  3. calls create_and_send_package with the title, expiresInDays: 14, one document from the template with {"partner": {"name": "Fjordline Ferries AS"}}, and Kari Solberg as the party PARTNER;
  4. answers with the package’s number and status, pending.

A week later, “has Fjordline signed?” leads to get_package_status, and once everybody has signed, download_signed_document gives the address of the signed PDF.

Each tool call is an ordinary JSON-RPC request. This is what the agent sends and receives in step 1, trimmed:

Terminal window
curl -X POST 'https://api.doxtly.com/mcp' \
-H "Authorization: Bearer $DOXTLY_API_KEY:$DOXTLY_API_SECRET" \
-H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' \
-H 'MCP-Protocol-Version: 2025-11-25' \
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"list_templates","arguments":{"search":{"name":"NDA"}}}}'
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"content": [{ "type": "text", "text": "{\"items\":[{\"id\":\"01a1aaf4-d8ea-7da1-92d1-a8e53781bbe1\",\"name\":\"Mutual NDA\", ...}" }],
"structuredContent": {
"items": [
{ "id": "01a1aaf4-d8ea-7da1-92d1-a8e53781bbe1", "name": "Mutual NDA", "type": "word", "version": 3 }
],
"meta": { "total": 1, "page": 1, "perPage": 20, "totalPages": 1, "hasMore": false, "hasPrevious": false }
},
"isError": false
}
}

structuredContent is exactly what the endpoint answers, here List templates, so everything on the API’s pages about fields and filters holds for the tools too. A list the endpoint answers as a bare array comes as {"items": [...]}, and an endpoint that answers with no content comes as {"done": true}.

A tool appears to the agent only when the key has every permission in its row. Endpoint is where its arguments and its answer are described.

Tool What it does Key permissions Endpoint
list_templates Lists templates get_templates Templates
get_template_fields Reads the data a template is filled with read_template Templates
generate_document Generates a PDF from a template and gives the address to download it generate_document, get_generated_files, download_generated_file Generated files
list_generated_files Lists the generated documents kept get_generated_files Generated files
download_generated_file Gives a generated document and the address to download it read_generated_file, download_generated_file Generated files
list_packages Lists packages, filtered by status or title get_document_packages Packages
list_document_package_types Lists the document types packages are filed under get_document_package_types Packages
get_package_status Reads a package, its parties and documents read_document_package Packages
create_and_send_package Creates a package from templates, sets its parties and sends it create_document_package, update_draft_package, send_document_package Packages
download_signed_document Gives the documents of a package and the address of each signed PDF read_document_package, download_package_document Packages
resend_signing_request Sends a party their signing request again resend_signing_request Packages
void_package Voids a package being signed void_document_package Packages
list_forms Lists forms get_forms Forms
list_submissions Lists form submissions get_submissions Form submissions
get_submission Reads one submission with every answer read_submission Form submissions
send_form_link Sends a form’s link by email, SMS or WhatsApp send_form_link Forms
list_interactive_documents Lists interactive documents get_interactive_documents Interactive documents
send_interactive_document_link Sends an interactive document’s link send_interactive_document_link Interactive documents
find_contacts Finds contacts by any field get_contacts Contacts
save_contact Adds a contact, or changes one when contactId is given create_contact or update_contact Contacts
send_personal_link Sends a contact a personal link to a form or an interactive document send_personal_link Personal links
list_workflows Lists workflows get_workflows Workflows
list_workflow_executions Lists workflow runs get_workflow_executions Runs
get_workflow_execution Reads a run and each of its steps read_workflow_execution Runs
list_cloud_storages Lists the connected drives get_cloud_files Cloud files
list_cloud_files Lists the files and folders of a drive get_cloud_files Cloud files

A key with create_contact but without update_contact sees save_contact, but changing a contact is refused. send_personal_link also needs the right to send the link of what it opens, as the endpoint does.

create_and_send_package runs the four steps of the usual path one after another. If a step after the first is refused, the draft stays and the error names it as draftId: finish it in the app or delete it.

A tool never returns a file’s content. generate_document, download_generated_file and download_signed_document give an address in the API, downloadUrl, which needs the same key: in Claude Code, Cursor or a terminal the agent downloads it with curl and the key’s headers. A document not signed by everyone yet has downloadUrl null.

  • A tool the key doesn’t allow is answered as an unknown tool, a JSON-RPC error with code -32602, even if the agent remembers it from an earlier list.
  • A refusal of the endpoint is a tool result with isError: true and, in its text, {"status": ..., "error": ...}: the error the endpoint answered. An id from another organization is 404, a missing permission 403, invalid data 422 with what is wrong with each field. The agent reads it and can correct itself.
  • Without a valid key the server answers 401 with WWW-Authenticate: Bearer. An organization whose plan doesn’t include the API is answered 403.
  • 120 tool calls a minute per key. More than an agent’s task takes, fewer than an agent stuck in a loop would make. Past that, a call is answered with an error result that says how many seconds to wait. Each endpoint’s own limits apply as well.
  • Requests of up to 1 MB. A tool takes no files.

The server follows MCP’s Streamable HTTP transport without sessions and answers in plain JSON. It speaks both the 2025-11-25 revision with the initialize handshake, and earlier ones, and the stateless 2026-07-28 revision.

The connectors of claude.ai, Claude Desktop and ChatGPT sign in with OAuth, which Doxtly doesn’t offer. Use a client that takes a header: Claude Code, Cursor, VS Code or Codex. Claude’s connectors accept a header only in a beta open to some organizations, and ChatGPT not at all.