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_urlfor a URL to a PDF, PNG or JPG. Use this for files up to 80 MB.file_base64for raw base64 or a data URL. Inline uploads are limited to 20 MB.
Agent flow
- Call
docmind_whoamiand confirm the organization. - Use a known
template_idor calldocmind_list_templateswith a full key. - Call
docmind_extract_documentwith a signed file URL or base64 payload. Passreferenceto link the scan to your own case, claim, or workflow id. - Read
fields.valuesfor scalar fields, JSON object fields, and arrays for dynamic tables. - Use
docmind_get_extractionif the first call times out before completion.