API reference / MCP server

MCP server

Connect AI agents to DocMind through the Model Context Protocol. The server uses a DocMind API key, so every tool call is scoped to exactly one organization.

Overview

The DocMind MCP server is hosted at https://api.docmind.wistfare.com/mcp. MCP clients connect over Streamable HTTP and send a DocMind API key as a bearer token on every request.

Organization bindingAPI keys belong to one organization. Agents should call docmind_whoami first and confirm the returned organization before processing customer documents.

Configure

Configure your MCP client:

MCP client config
{
  "mcpServers": {
    "docmind": {
      "url": "https://api.docmind.wistfare.com/mcp",
      "headers": {
        "Authorization": "Bearer sk_live_or_sk_test_..."
      }
    }
  }
}

For Codex, add the remote server to your Codex MCP configuration:

Codex config.toml
[mcp_servers.docmind]
enabled = true
url = "https://api.docmind.wistfare.com/mcp"
bearer_token_env_var = "DOCMIND_API_KEY"

[mcp_servers.docmind.http_headers]
DOCMIND_API_KEY = "sk_live_or_sk_test_..."

Tools

NAMETYPEDESCRIPTION
docmind_whoamitoolReturns the bound organization, auth method, key id and scope.
docmind_statustoolChecks DocMind API health.
docmind_list_templatestoolLists templates. Requires full scope.
docmind_get_templatetoolReads a template including dynamic table columns. Requires full scope.
docmind_create_templatetoolCreates a template from dynamic fields. Requires full scope.
docmind_detect_template_fieldstoolDetects fields and table columns from a PDF, PNG or JPG sample. Requires full scope and credits.
docmind_extract_documenttoolRuns a template against a PDF, PNG or JPG, with an optional customer reference. Works with full or extract_only scope.
docmind_get_extractiontoolRetrieves one extraction. Works with full or extract_only scope.
docmind_list_extractionstoolLists recent extractions. Works with full or extract_only scope.
docmind_get_billingtoolReads balance, usage and page rates. Requires full scope.

File inputs

Document tools accept exactly one file source:

  • file_url for a URL to a PDF, PNG or JPG. Use this for files up to 80 MB.
  • file_base64 for raw base64 or a data URL. Inline uploads are limited to 20 MB.

Agent flow

  • Call docmind_whoami and confirm the organization.
  • Use a known template_id or call docmind_list_templates with a full key.
  • Call docmind_extract_document with a signed file URL or base64 payload. Pass reference to link the scan to your own case, claim, or workflow id.
  • Read fields.values for scalar fields, JSON object fields, and arrays for dynamic tables.
  • Use docmind_get_extraction if the first call times out before completion.